On Thu, 13 Nov 2025, Ville Syrjälä <[email protected]> wrote: > On Thu, Nov 13, 2025 at 03:37:50PM +0200, Jani Nikula wrote: >> The sole user of the remaining functions in intel_gmch.[ch] is in >> display. Move them under display. >> >> This allows us to remove the compat soc/intel_gmch.h from xe. >> >> Signed-off-by: Jani Nikula <[email protected]> >> --- >> drivers/gpu/drm/i915/Makefile | 5 +---- >> drivers/gpu/drm/i915/{soc => display}/intel_gmch.c | 3 +-- >> drivers/gpu/drm/i915/{soc => display}/intel_gmch.h | 0 >> drivers/gpu/drm/i915/display/intel_vga.c | 3 +-- >> drivers/gpu/drm/xe/compat-i915-headers/soc/intel_gmch.h | 6 ------ >> 5 files changed, 3 insertions(+), 14 deletions(-) >> rename drivers/gpu/drm/i915/{soc => display}/intel_gmch.c (95%) >> rename drivers/gpu/drm/i915/{soc => display}/intel_gmch.h (100%) >> delete mode 100644 drivers/gpu/drm/xe/compat-i915-headers/soc/intel_gmch.h >> >> diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile >> index 90588d5bb908..98822c98d960 100644 >> --- a/drivers/gpu/drm/i915/Makefile >> +++ b/drivers/gpu/drm/i915/Makefile >> @@ -57,10 +57,6 @@ i915-y += \ >> vlv_iosf_sb.o \ >> vlv_suspend.o >> >> -# core peripheral code >> -i915-y += \ >> - soc/intel_gmch.o >> - >> # core library code >> i915-y += \ >> i915_memcpy.o \ >> @@ -280,6 +276,7 @@ i915-y += \ >> display/intel_flipq.o \ >> display/intel_frontbuffer.o \ >> display/intel_global_state.o \ >> + display/intel_gmch.o \ > > I think I'd just stick the stuff into intel_vga.c since > that's where the vgaarb registration is as well.
Moving this directly to intel_vga.c requires a bunch of in-flight modifications, because currently it's not compiled for xe, and there's a dummy implementation of intel_gmch_vga_set_decode(). Or I have to wrap #ifdef I915 around it or something. See "[PATCH] drm/xe: use the same vga decode code as i915". If that regresses, it's trivial to revert that, but if I do that as part of moving the function to intel_vga.c, it's all mixed up. Having this in intel_vga.c is the pleasing end result, but none of the paths there are pleasing. Pick your poison, I guess. BR, Jani. -- Jani Nikula, Intel
