]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/i915/mchbar: Provide intel_mchbar_read*() abstraction
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 31 Mar 2026 15:42:49 +0000 (18:42 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 1 Apr 2026 14:02:36 +0000 (17:02 +0300)
commit81dbca71885df32b0683104d1f49065d792870e0
tree491aacef8e2b17588f3c057d0381fde1ccf9d2c9
parentbf64bcf4baab24944be3f6252192abb87af84686
drm/i915/mchbar: Provide intel_mchbar_read*() abstraction

MCHBAR registers are a bit special in that:
- we access them through the mirror
- the mirror is read only on HSW+
- the mirror requires the actual MCHBAR to be enabled in device 0:0.0
- the mirror is gone on MTL+

So I'd prefer to treat MCHBAR registers as a bit special in
the code as well, and do all accesses to them via dedicated
functions. Prodive such functions in the form of
intel_mchbar_read*().

v2: Put the function arguments on one line
    No intel_uncore_read64() on xe, use intel_uncore_read64_2x32()
    Name the new function intel_mchbar_read64_2x32() as well

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-3-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_mchbar.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_mchbar.h [new file with mode: 0644]
drivers/gpu/drm/xe/Makefile