]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/de: Add intel_de_read16()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 31 Mar 2026 15:42:54 +0000 (18:42 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 1 Apr 2026 14:06:41 +0000 (17:06 +0300)
We'll need a replacement for intel_uncore_read16() in order to
untangle intel_mchbar_read16() from uncore. As with the 8 bit
counterpart this doesn't need to work on modern platforms
so we can forgo all the DMC wakelock stuff and whatnot.

Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patch.msgid.link/20260331154259.24600-8-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_de.c
drivers/gpu/drm/i915/display/intel_de.h

index d2a418da2d54bb141505df25c8c3b3a5006281a5..a96e83d76eaace9695e379addd3e4d5e15490277 100644 (file)
@@ -176,3 +176,11 @@ void intel_de_write8(struct intel_display *display, i915_reg_t reg, u8 val)
 
        intel_uncore_write8(__to_uncore(display), reg, val);
 }
+
+u16 intel_de_read16(struct intel_display *display, i915_reg_t reg)
+{
+       /* this is only used on MCHBAR registers on pre-SNB */
+       drm_WARN_ON(display->drm, DISPLAY_VER(display) >= 6);
+
+       return intel_uncore_read16(__to_uncore(display), reg);
+}
index f87b84ab9d6d62a1678d19fa60d3957b64bc7b68..3f9861b7a589eaf9c18b35c8f2ca01417ed10739 100644 (file)
@@ -19,6 +19,7 @@ static inline struct intel_uncore *__to_uncore(struct intel_display *display)
 
 u8 intel_de_read8(struct intel_display *display, i915_reg_t reg);
 void intel_de_write8(struct intel_display *display, i915_reg_t reg, u8 val);
+u16 intel_de_read16(struct intel_display *display, i915_reg_t reg);
 
 static inline u32
 intel_de_read(struct intel_display *display, i915_reg_t reg)