On Sun, Nov 28, 2021 at 01:09:26PM +0200, Andi Shyti wrote:
Starting from a patch from Matt to_root_gt() returns the reference to the root tile in order to abstract the root tile from th callers. Being the root tile identified as tile '0', embed the id in the name so that i915->gt becomes i915->gt0. The renaming has been mostly done with the following command and some manual fixes. sed -i -e sed -i 's/\&i915\->gt\./\&to_root_gt(i915)\->/g' \ -e sed -i 's/\&dev_priv\->gt\./\&to_root_gt(dev_priv)\->/g' \ -e 's/\&dev_priv\->gt/to_root_gt(dev_priv)/g' \ -e 's/\&i915\->gt/to_root_gt(i915)/g' \ -e 's/dev_priv\->gt\./to_root_gt(dev_priv)\->/g' \ -e 's/i915\->gt\./to_root_gt(i915)\->/g' \ `find drivers/gpu/drm/i915/ -name *.[ch]` Two small changes have been added to this commit: 1. intel_reset_gpu() in intel_display.c retreives the gt from to_scanout_gt() 2. in set_scheduler_caps() the gt is taken from the engine and not from i915.
Ideally the non-automatic changes should be in separate patches, before the ones that can be done by automation. Because then it becomes easier to apply the final result without conflicts. This is quite a big diff to merge in one go. Looking at the pending patches from Michal however I see he had similar changes, split in sensible chunks.. Could you split your version like that? at least gt/gem and display would be good to have separate. Or sync with Michal on how to proceed with these versions Here are his patches: drm/i915: Remove i915->ggtt drm/i915: Use to_gt() helper for GGTT accesses drm/i915: Use to_gt() helper drm/i915/gvt: Use to_gt() helper drm/i915/gem: Use to_gt() helper drm/i915/gt: Use to_gt() helper drm/i915/display: Use to_gt() helper drm/i915: Introduce to_gt() helper This first patch also removed the `struct intel_gt *gt = to_gt(pool)`, that would otherwise be a leftover in drivers/gpu/drm/i915/gt/intel_gt_buffer_pool.c thanks Lucas De Marchi