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.koe...@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursu...@intel.com>
Suggested-by: Tvrtko Ursulin <tvrtko.ursu...@linux.intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasire...@intel.com>

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.koe...@amd.com>.

Thanks!

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

Regards,

Tvrtko

Reply via email to