| #
d1dc0c08 |
| 05-May-2026 |
Jani Nikula <jani.nikula@intel.com> |
drm/i915/display: define and use intel_reg_{offset, equal, valid}() helpers
Add display specific helpers for getting the register offset, checking for equality and validity. Add them as static inlin
drm/i915/display: define and use intel_reg_{offset, equal, valid}() helpers
Add display specific helpers for getting the register offset, checking for equality and validity. Add them as static inlines for increased type safety.
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/7fe12d4e5465778209ccf29359767a197b031dd9.1777972548.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
show more ...
|
| #
e892c68b |
| 05-May-2026 |
Jani Nikula <jani.nikula@intel.com> |
drm/i915/display: add typedef for intel_reg_t and use it
Add a typedef alias intel_reg_t for i915_reg_t, and use it exclusively in display code. The goal is to eventually define a distinct type for
drm/i915/display: add typedef for intel_reg_t and use it
Add a typedef alias intel_reg_t for i915_reg_t, and use it exclusively in display code. The goal is to eventually define a distinct type for display, but for now just use an alias.
In a handful of places include intel_display_reg_defs.h instead of i915_reg_defs.h to get the definition, and isolate the i915_reg_defs.h include there.
Reviewed-by: Michał Grzelak <michal.grzelak@intel.com> Acked-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/f5bb0122143c39ce7f9ce8a1605a7637e569f7f8.1777972548.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
show more ...
|
| #
d54377e4 |
| 07-Apr-2026 |
Jani Nikula <jani.nikula@intel.com> |
drm/i915/mchbar: include intel_mchbar_regs.h from intel_mchbar.h
As an exception to the rule of not including unnecessary headers from headers, include intel_mchbar_regs.h from intel_mchbar.h. In or
drm/i915/mchbar: include intel_mchbar_regs.h from intel_mchbar.h
As an exception to the rule of not including unnecessary headers from headers, include intel_mchbar_regs.h from intel_mchbar.h. In order to use the interfaces in intel_mchbar.h you will always have to include the registers anyway, so the includes are in pairs everywhere. There is zero asymmetry. Simplify.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/e44dc2daf3fc39d02c3f598c323caa3c08a54304.1775590536.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
show more ...
|
| #
86435ca5 |
| 31-Mar-2026 |
Ville Syrjälä <ville.syrjala@linux.intel.com> |
drm/i915/mchbar: Use intel_de_read*() for MCHBAR register accesses
Replace the naked intel_uncore_read*() with intel_de_read*() in the MCHBAR code.
v2: Rebase due to intel_uncore_read64_2x32()
Rev
drm/i915/mchbar: Use intel_de_read*() for MCHBAR register accesses
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
show more ...
|
| #
84b03668 |
| 31-Mar-2026 |
Ville Syrjälä <ville.syrjala@linux.intel.com> |
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
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
show more ...
|
| #
81dbca71 |
| 31-Mar-2026 |
Ville Syrjälä <ville.syrjala@linux.intel.com> |
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
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
show more ...
|