Switch reference counting to GEM instead of TTM
Danilo Krummrich
dakr at kernel.org
Tue Jul 16 13:12:11 UTC 2024
Hi Christian,
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.
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.
I will have a closer look later on.
- Danilo
>
> Netx step is to completely remove the TTM refcounting.
>
> Please review and/or comment.
>
> Cheers,
> Christian.
>
>
More information about the dri-devel
mailing list