]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/i915/mchbar: WARN when accessing non-MCHBAR registers via intel_mchbar_read*()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 31 Mar 2026 15:42:51 +0000 (18:42 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 1 Apr 2026 14:03:16 +0000 (17:03 +0300)
commit84b0366809193fc6238e37c9839cd4b24db5e909
treecf0bc1cdba0eb210d39b76329215aa0f353d3dbf
parent03f8a13cc18c95bede16d55c08c0dda39f8e23fd
drm/i915/mchbar: WARN when accessing non-MCHBAR registers via intel_mchbar_read*()

The intel_mchbar_read*() functions should only be used for
accessing MCHBAR registers. Warn if someone tries to use
them for other registers.

I suppose we could even have a dedicated type for MCHBAR
registers. But that is true for many other special register
types as well, and so far we haven't bothered adding any
special types apart from i915_mcr_reg_t.

v2: Print the register offset (Jani)
    Mention i915_mcr_reg_t (Jani)

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