Re: [PATCH 1/2] drm/mm: Add an iterator to optimally walk over holes for an allocation (v3)

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

 




On 16/02/2022 10:36, Christian König wrote:
Am 15.02.22 um 23:23 schrieb Vivek Kasireddy:
This iterator relies on drm_mm_first_hole() and drm_mm_next_hole()
functions to identify suitable holes for an allocation of a given
size by efficiently traversing the rbtree associated with the given
allocator.

It replaces the for loop in drm_mm_insert_node_in_range() and can
also be used by drm drivers to quickly identify holes of a certain
size within a given range.

v2: (Tvrtko)
- Prepend a double underscore for the newly exported first/next_hole
- s/each_best_hole/each_suitable_hole/g
- Mask out DRM_MM_INSERT_ONCE from the mode before calling
   first/next_hole and elsewhere.

v3: (Tvrtko)
- Reduce the number of hunks by retaining the "mode" variable name

Cc: Christian König <christian.koenig@xxxxxxx>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxxxxxxx>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@xxxxxxxxx>

Of hand it looks like it does what the description says without any functional change, but I don't know the internals of drm_mm so well either.

Feel free to add an Acked-by: Christian König <christian.koenig@xxxxxxx>.

Thanks!

Can we merge this via the Intel tree as one series (one drm core plus one i915 patch)? Daniel?

Regards,

Tvrtko



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux