[PATCH v2 04/15] drm/ttm: Export functions to initialize and finalize the ttm range manager standalone

Thomas Hellström thomas.hellstrom at linux.intel.com
Tue May 18 13:06:02 UTC 2021


On 5/18/21 1:51 PM, Christian König wrote:
> Am 18.05.21 um 10:26 schrieb Thomas Hellström:
>> i915 mock selftests are run without the device set up. In order to be 
>> able
>> to run the region related mock selftests, export functions in order 
>> for the
>> TTM range manager to be set up without a device to attach it to.
>
> From the code it looks good, but to be honest I don't think that this 
> makes much sense from the organizational point of view.
>
> If a self test exercises internals of TTM it should be moved into TTM 
> as well.

This particular selftest actually exercises i915 memory regions which is 
a level above TTM, but the memory regions are backed by TTM. Since they 
are mock selftests they don't have a TTM device. For the buddy allocator 
the situation would be the same, but there we have selftests that 
exercise the allocator standalone, and those would probably fit best 
into a TTM selftest infrastructure.

Although in this particular case, we could of course add a mock TTM 
device and be done. Pls let me know what you think.

/Thomas




More information about the dri-devel mailing list