]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/i915/de: Simplify intel_de_read8()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 8 Dec 2025 18:26:28 +0000 (20:26 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 23 Jan 2026 03:20:27 +0000 (05:20 +0200)
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>
drivers/gpu/drm/i915/display/intel_de.h

index a7ce3b875e06c6bfae0cd44ce83d8176ab2e8929..5c1b37d300459e9c82fdff2b3609b98836be90c6 100644 (file)
@@ -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;
-
-       intel_dmc_wl_get(display, reg);
-
-       val = intel_uncore_read8(__to_uncore(display), reg);
+       /* 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_put(display, reg);
-
-       return val;
+       return intel_uncore_read8(__to_uncore(display), reg);
 }
 
 static inline u64