Re: Refcounting in drm_exec

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Thomas,

Am 31.08.23 um 17:12 schrieb Thomas Hellström:
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?

Yes, that's one of the motivations for this component.

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.

That's correct behavior.

The prelocked object is part of the locked objects array as well. So we just need to drop the reference.

This was actually a bug in one of the earlier versions.

Regards,
Christian.


Thanks,

Thomas'





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux