Re: Switch reference counting to GEM instead of TTM

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

 



Am 16.07.24 um 15:24 schrieb Danilo Krummrich:
On 7/16/24 3:12 PM, Danilo Krummrich wrote:
Hi Christian,


Forgot to say, please also add driver maintainers and related
mailing lists, dri-devel gets a lot of messages and I saw this
series by chance.

Ah, yes good point.


- Danilo

On 7/16/24 2:35 PM, Christian König wrote:
Hello everyone,

to make use of drm_exec it is necessary to have TTM drivers actually use
the GEM reference count instead of the TTM one.

This patch set is a start to do that. It switches all uses of
ttm_bo_get/put to the GEM counterpart and then makes ttm_bo_get private
to TTM.

That makes a lot of sense.

But I think for at least some drivers it requires a bit more than just
replacing ttm_bo_{get, put} with drm_gem_object_{get, put}.

I gave this a quick shot on Nouveau, and as is, it creates a refcount
underflow for the GEM object's reference count.

Crap, I thought I got all of those.


At a first glance this seems to happen because some of the previous ttm_bo_put() calls intend to compensate for the initial refcount of a ttm_buffer_object.

Mhm, there should be only one left of those.




I will have a closer look later on.

Thanks,
Christian.


- Danilo


Netx step is to completely remove the TTM refcounting.

Please review and/or comment.

Cheers,
Christian.






[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