Freedreno Gallium3D Working To Lower Its Driver Overhead

Written by Michael Larabel in Mesa on 28 October 2018 at 06:48 AM EDT. 2 Comments
MESA
With the Freedreno Gallium3D driver's reverse-engineered, open-source 3D/OpenGL driver support for Qualcomm Adreno hardware in pretty darn good shape these days even for the latest-generation Adreno 600 series, the developers have begun working on more optimizations -- including a new effort trying to reduce the OpenGL driver's overhead.

Freedreno founder Rob Clark is spearheading the work on lowering the Freedreno Gallium3D driver's overhead. As part of that he realized the existing Freedreno libdrm code that sits between Mesa and the kernel DRM code was due for a redesign. Rob noted, "as the gallium driver is starting to make heavier use of CP_SET_DRAW_STATE state groups/objects, the over-head of tracking cmd buffers and relocs becomes too much. And for "streaming" state, which isn't ever reused (like uniform uploads) the overhead of allocating/freeing ringbuffer objects is too high."

So he took to redesigning this libdrm_freedreno code with some fundamental design improvements. But as the changes are breaking enough that he would need to add a brand new copy of the code to libdrm, he took to integrating the code directly into Mesa.

So as of the latest Mesa 18.3 Git, the Freedreno driver bundles in its own code to replace what previously was inside libdrm and that's no longer a build dependency for this driver. Integrating this code directly into Mesa also allows for re-using some of Mesa's hash table, allocator code, and other bits. This also allows Freedreno developers to more easily evolve the API rather than having to worry about API compatibility with an existing API. Some of the other Mesa developers have talked in the past about pulling in their libdrm driver bits into Mesa itself too.

As of this commit merged on Friday, the new Freedreno code is in place. That was followed by a lot of other fixes, clean-ups, and improvements in time for the Mesa 18.3 branching and feature freeze coming up in a few days.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week