On 8/4/2026 3:19 AM, Michał Grzelak wrote:
XE2LPD_DE_CAP_3DLUT_MASK is defined but never used.

Check DE_CAP with the mask whether 3D LUT is disabled for LNL+. Reset
has_3dlut if that is the case.

Bspec: 71161
Cc: Chaitanya Kumar Borah <[email protected]>
Cc: <[email protected]>
Fixes: 6d181a288e64 ("drm/i915/xe2lpd: update the dsc feature capability")

For this one you can actually add the Fixes tag with 65db7a1f9cf7 ("drm/i915/color: Add 3D LUT to color pipeline"), because this would make sense for NVL+ platforms where the CAP bit is used.

As for stable branches, you would need all the patches that adds the infrastructure for has_3dlut to land together. Not sure what is the best way to do it.

Other than that, changes makes sense.

Signed-off-by: Michał Grzelak <[email protected]>
---
  drivers/gpu/drm/i915/display/intel_display_device.c | 4 ++++
  drivers/gpu/drm/i915/display/intel_display_regs.h   | 1 +
  2 files changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_display_device.c 
b/drivers/gpu/drm/i915/display/intel_display_device.c
index a2bea5ac59cf..d4e52e627b34 100644
--- a/drivers/gpu/drm/i915/display/intel_display_device.c
+++ b/drivers/gpu/drm/i915/display/intel_display_device.c
@@ -1940,6 +1940,10 @@ static void 
__intel_display_device_info_runtime_init(struct intel_display *displ
        if (DISPLAY_VER(display) >= 20) {
                u32 cap = intel_de_read(display, XE2LPD_DE_CAP);
+ if (REG_FIELD_GET(XE2LPD_DE_CAP_3DLUT_MASK, cap) ==
+                   XE2LPD_DE_CAP_3DLUT_REMOVED)
+                       display_runtime->has_3dlut = 0;
+
                if (REG_FIELD_GET(XE2LPD_DE_CAP_DSC_MASK, cap) ==
                    XE2LPD_DE_CAP_DSC_REMOVED)
                        display_runtime->has_dsc = 0;
diff --git a/drivers/gpu/drm/i915/display/intel_display_regs.h 
b/drivers/gpu/drm/i915/display/intel_display_regs.h
index 740331ead20a..78b9e6008828 100644
--- a/drivers/gpu/drm/i915/display/intel_display_regs.h
+++ b/drivers/gpu/drm/i915/display/intel_display_regs.h
@@ -1773,6 +1773,7 @@
#define XE2LPD_DE_CAP _MMIO(0x41100)
  #define   XE2LPD_DE_CAP_3DLUT_MASK    REG_GENMASK(31, 30)
+#define   XE2LPD_DE_CAP_3DLUT_REMOVED  1
  #define   XE2LPD_DE_CAP_DSC_MASK      REG_GENMASK(29, 28)
  #define   XE2LPD_DE_CAP_DSC_REMOVED   1
  #define   XE2LPD_DE_CAP_SCALER_MASK   REG_GENMASK(27, 26)

Reply via email to