Switch reference counting to GEM instead of TTM
Danilo Krummrich
dakr at kernel.org
Tue Jul 16 13:24:17 UTC 2024
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.
- 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.
>
> 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