]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/i915/mchbar: Use intel_de_read*() for MCHBAR register accesses
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 31 Mar 2026 15:42:58 +0000 (18:42 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 1 Apr 2026 14:07:18 +0000 (17:07 +0300)
Replace the naked intel_uncore_read*() with intel_de_read*()
in the MCHBAR code.

v2: Rebase due to intel_uncore_read64_2x32()

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-12-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_mchbar.c

index a404fa38c9bdbcc3747b9c4115a0096e08cccea4..16fcfe1e93ec2c7e5d049d47aec71703675b1b16 100644 (file)
@@ -7,10 +7,10 @@
 
 #include <drm/drm_print.h>
 
+#include "intel_de.h"
 #include "intel_display_core.h"
 #include "intel_mchbar.h"
 #include "intel_mchbar_regs.h"
-#include "intel_uncore.h"
 
 static bool has_mchbar_mirror(struct intel_display *display)
 {
@@ -59,28 +59,21 @@ static void assert_is_mchbar_reg(struct intel_display *display, i915_reg_t reg)
 
 u16 intel_mchbar_read16(struct intel_display *display, i915_reg_t reg)
 {
-       struct intel_uncore *uncore = to_intel_uncore(display->drm);
-
        assert_is_mchbar_reg(display, reg);
 
-       return intel_uncore_read16(uncore, reg);
+       return intel_de_read16(display, reg);
 }
 
 u32 intel_mchbar_read(struct intel_display *display, i915_reg_t reg)
 {
-       struct intel_uncore *uncore = to_intel_uncore(display->drm);
-
        assert_is_mchbar_reg(display, reg);
 
-       return intel_uncore_read(uncore, reg);
+       return intel_de_read(display, reg);
 }
 
 u64 intel_mchbar_read64_2x32(struct intel_display *display, i915_reg_t reg)
 {
-       struct intel_uncore *uncore = to_intel_uncore(display->drm);
-       i915_reg_t upper_reg = _MMIO(i915_mmio_reg_offset(reg) + 4);
-
        assert_is_mchbar_reg(display, reg);
 
-       return intel_uncore_read64_2x32(uncore, reg, upper_reg);
+       return intel_de_read64_2x32(display, reg);
 }