On Mon, 08 Dec 2025, Ville Syrjala <[email protected]> wrote: > From: Ville Syrjälä <[email protected]> > > intel_de_read8() is only needed for VGA register MMIO access > by the CRT code on gen2/3. Remove the redundant wakelock stuff, > and add a platform check to make sure this won't get used on > any platform where MMIO VGA register accesses don't work. > > Signed-off-by: Ville Syrjälä <[email protected]>
Not a fan of adding the extra dep on drm_print.h as I've tried hard to remove it from headers all over the place to uncover the implicit dependencies. Oh well, maybe this will be addressed in the upcoming mmio series? Reviewed-by: Jani Nikula <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_de.h | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_de.h > b/drivers/gpu/drm/i915/display/intel_de.h > index a7ce3b875e06..5c1b37d30045 100644 > --- a/drivers/gpu/drm/i915/display/intel_de.h > +++ b/drivers/gpu/drm/i915/display/intel_de.h > @@ -6,6 +6,8 @@ > #ifndef __INTEL_DE_H__ > #define __INTEL_DE_H__ > > +#include <drm/drm_print.h> > + > #include "intel_display_core.h" > #include "intel_dmc_wl.h" > #include "intel_dsb.h" > @@ -34,15 +36,10 @@ intel_de_read(struct intel_display *display, i915_reg_t > reg) > static inline u8 > intel_de_read8(struct intel_display *display, i915_reg_t reg) > { > - u8 val; > + /* this is only used on VGA registers (possible on pre-g4x) */ > + drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || > display->platform.g4x); > > - intel_dmc_wl_get(display, reg); > - > - val = intel_uncore_read8(__to_uncore(display), reg); > - > - intel_dmc_wl_put(display, reg); > - > - return val; > + return intel_uncore_read8(__to_uncore(display), reg); > } > > static inline u64 -- Jani Nikula, Intel
