[Intel-xe] Refcounting in drm_exec

Thomas Hellström thomas at shipmail.org
Thu Aug 31 15:12:02 UTC 2023


Hi, Christian, Danilo

Looking at the drm_exec code it seems we refcount *all* locked objects 
until drm_exec_fini(). Are callers supposed to be able to *rely* on 
this? I'm asking because refcounting appears only strictly necessary for 
contended- and prelocked objects, and callers would otherwise need to 
make sure they don't drop a locked object across the lock? It's going to 
be pretty hard to change this in the future if we want for added 
efficiency if people start to rely on it.

Also seems drm_exec_unlock_all() drops the prelocked object without 
unlocking. I'll put together a patch.

Thanks,

Thomas'



More information about the Intel-xe mailing list