[PATCH 6/8] drm/i915/display: Extract glk_read_csc()
Bhanuprakash Modem
bhanuprakash.modem at intel.com
Sat Mar 20 13:32:25 UTC 2021
For glk, add hw read out to create hw blob of ctm coeff values.
Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem at intel.com>
---
drivers/gpu/drm/i915/display/intel_color.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 5e581fb61a8c..3c2a74d4e4bf 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -963,6 +963,14 @@ static void glk_load_luts(const struct intel_crtc_state *crtc_state)
}
}
+static void glk_read_csc(struct intel_crtc_state *crtc_state)
+{
+ struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
+
+ if (crtc_state->csc_enable && !crtc_state->csc_mode)
+ crtc_state->hw.ctm = ilk_read_csc_matrix(crtc);
+}
+
/* ilk+ "12.4" interpolated format (high 10 bits) */
static u32 ilk_lut_12p4_udw(const struct drm_color_lut *color)
{
@@ -2274,6 +2282,7 @@ void intel_color_init(struct intel_crtc *crtc)
} else if (IS_CANNONLAKE(dev_priv) || IS_GEMINILAKE(dev_priv)) {
dev_priv->display.load_luts = glk_load_luts;
dev_priv->display.read_luts = glk_read_luts;
+ dev_priv->display.read_csc = glk_read_csc;
} else if (INTEL_GEN(dev_priv) >= 8) {
dev_priv->display.load_luts = bdw_load_luts;
dev_priv->display.read_csc = ilk_read_csc;
--
2.20.1
More information about the Intel-gfx-trybot
mailing list