Don Cheadle worked for years to get his Miles Davis biopic, Miles Ahead, made. Part of the uphill battle was that he not only wanted to star as Davis, he wanted to write and direct as well. Well his long slog to the finish line paid off, as Cheadle makes his feature film directorial debut with Miles Ahead, in which he stars and also co-wrote (with Steve Baigelman, who also worked on the James Brown biopic, Get On Up). Cheadle got his movie made his way, and it’s pretty damn good. Miles Ahead takes an unconventional approach to the biography genre, but the risks mostly pay off. And Cheadle gives a top-notch performance as Miles Davis.

Miles Ahead picks up in the late 1970s, a fallow period for the real Miles Davis. Cheadle takes this creative tundra and invents a story about Davis trying to recover a stolen session tape from his music label, who is anxious-bordering-on-hostile about getting new music from their recording star. Most of the actual story of Miles Ahead is complete bullsh*t, and it gives the film an impressionistic quality that is right in line with Davis’s improvisational jazz. Cheadle proves deft at balancing the “modern” story with impressions from Davis’s past, particularly those surrounding his marriage to actress Frances Taylor (Emayatzy Corinealdi, Hand of God).

Cheadle treats Davis’s musical ability as something worthy of awe, but he doesn’t stand in awe of the man behind the trumpet. He does not shy away from portraying Davis’s cruelty and brutality toward Frances, or from drawing parallels between the control that made him a masterful stage presence and how that same control spun out in his personal life. He also doesn’t seek to rationalize Davis’s cocaine addiction as any kind of artistic “price” for his genius. Davis is just a junkie who also happens to be a gifted musician.

The result is a surprisingly sharp and tough depiction of Davis, and not your usual musician-biopic whitewash of difficult people and histories. And Cheadle is phenomenal in the role—he was born to play Miles Davis, affecting a growly voice and reasonably mimicking Davis’s famous embouchure. It’s a very alive performance, which stands up to Chadwick Boseman’s blazing turn as James Brown in Get On Up (that movie underserved Boseman—can we get a do-over and let Cheadle direct him as Brown?), and completely casts down Joaquin Phoenix’s Johnny Cash, which is your typically spit-shined take on difficult musicians. By not hiding or excusing the worst of Davis’s personality, Cheadle opens up a larger room for him to fill as a performer.

The only real weakness in the film comes from, surprisingly, Ewan McGregor. It’s not that he isn’t good, it’s just that his part feels very tacked-on and non-essential to the Miles story. Indeed, he’s playing an invented Rolling Stone journalist, Dave, who hopes to score an interview with the reclusive, basically retired Davis. The interview format gives Davis someone to talk to and reminisce at, but Dave feels more like a plot device than a real character. It probably would have worked out fine for Davis to just talk to himself in a drug-fueled haze, but that may have been a bridge too far for audiences, so the journalist was invented as a compromise.

Miles Ahead is a really solid biopic that benefits from blatantly making sh*t up about its subject. The 1970s tape-recovery plot is straight out of a Blaxploitation flick and gets a little screwy by the end, but it doesn’t derail what is overall a well-crafted portrait of a difficult artist. Davis had a lot of personal problems, none of which Cheadle shies from, but he was undeniably a genius. Due respect is paid to his accomplishments as a musician, while still acknowledging that he was not a very likeable dude offstage. Cheadle is as good as he’s ever been as an actor, and he has a knack for behind-the-camera work, too. Miles Ahead is not an actor’s indulgence. As a filmmaker, Don Cheadle is the real deal.