[RFC] Common DRM execution context

Christian König ckoenig.leichtzumerken at gmail.com
Tue Apr 26 13:22:03 UTC 2022


Hello everyone,

as mentioned a couple of times in various discussions it would be rather helpful if DRM has an execution context component similar to TTMs execbuf util.

In contrast to the TTM component this implementation works on the GEM level instead and also doesn't use a double linked list but rather an xarray to track all prepared GEM objects.

Additionally to that an object oriented approach is used to describe the state which makes initializing and cleaning up the object much easier to handle (no external state, just use init/fini and that's it).

Since we now doesn't have nor need a linked list of all the objects to lock a bunch of macros are provided to aid driver developers to correctly prepare all the buffer objects. See the documentation in drm_exec.c for further details.

As prove of concept the new component is then used inside amdgpu to replace TTMs execbuf util.

Please comment and/or review,
Christian.




More information about the amd-gfx mailing list