The film is The Fisher King (1991), directed by Terry Gilliam.
Jeff Bridges plays Jack Lucas, a shock jock whose on-air comment inspires a mass shooting. Plagued by guilt, he seeks redemption by helping Parry (Robin Williams), a homeless man who believes he's the Fisher King from Arthurian legend. The film blends dark comedy, drama, and fantasy.