Director Don Cheadle the 'Miles Ahead' press conference during the 66th Berlinale International Film Festival Berlin at Grand Hyatt Hotel on February 18, 2016 in Berlin, Germany.

Director Don Cheadle the ‘Miles Ahead’ press conference during the 66th Berlinale International Film Festival Berlin at Grand Hyatt Hotel on February 18, 2016 in Berlin, Germany.

*Don Cheadle said his passion project about Miles Davis wouldn’t have gotten off the ground without crowdfunding and a white co-star.

The 51-year-old actor produced, co-wrote and starred in “Miles Ahead,” a film depicting a defining period in the jazz musician’s life.

Getting financing had been a major hurdle he only cleared when he raised about $360,000 on website Indiegogo, which allows artists to collect donations for projects, and hired Scottish star Ewan McGregor.

He said it was “one of the realities of the business that we are in” that films with all-black casts are thought to have little chance of distribution outside the United States and thus don’t attract investment.

“There is a lot of apocryphal, not proven evidence that black films don’t sell overseas,” he told reporters at the Berlin film festival. “Having a white actor in this film turned out to actually be a financial imperative.”

Director Don Cheadle and actress Emayatzy Corinealdi attend the 'Miles Ahead' press conference during the 66th Berlinale International Film Festival Berlin at Grand Hyatt Hotel on February 18, 2016 in Berlin, Germany.

Director Don Cheadle and actress Emayatzy Corinealdi attend the ‘Miles Ahead’ press conference during the 66th Berlinale International Film Festival Berlin at Grand Hyatt Hotel on February 18, 2016 in Berlin, Germany.

Cheadle said it forced him to rework the script, which focuses on a period in the late 1970s in which Davis fell into a creative slump, to bring in a shady Rolling Stone reporter as a foil for the trumpet player.

“I think it works great, and particularly the fact that Ewan McGregor is the actor who is in it, I think he is fantastic in the movie. But that was a component of… allowing us to even have a budget to get the film made.”

Sony Pictures Classics will release “Miles Ahead” in the United States on April 1.