Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/i915/de: Simplify intel_de_read8()

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ä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20251208182637.334-11-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>

+5 -8
+5 -8
drivers/gpu/drm/i915/display/intel_de.h
··· 6 6 #ifndef __INTEL_DE_H__ 7 7 #define __INTEL_DE_H__ 8 8 9 + #include <drm/drm_print.h> 10 + 9 11 #include "intel_display_core.h" 10 12 #include "intel_dmc_wl.h" 11 13 #include "intel_dsb.h" ··· 36 34 static inline u8 37 35 intel_de_read8(struct intel_display *display, i915_reg_t reg) 38 36 { 39 - u8 val; 37 + /* this is only used on VGA registers (possible on pre-g4x) */ 38 + drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 5 || display->platform.g4x); 40 39 41 - intel_dmc_wl_get(display, reg); 42 - 43 - val = intel_uncore_read8(__to_uncore(display), reg); 44 - 45 - intel_dmc_wl_put(display, reg); 46 - 47 - return val; 40 + return intel_uncore_read8(__to_uncore(display), reg); 48 41 } 49 42 50 43 static inline u64