diff mbox series

[v8,11/14] drm/i915/crtc: Hook i915 IET LUT with the drm IET properties

Message ID 20250128-dpst-v8-11-871b94d777f8@intel.com (mailing list archive)
State New
Headers show
Series Display Global Histogram | expand

Commit Message

Arun R Murthy Jan. 28, 2025, 3:51 p.m. UTC
Upon drm getting the IET LUT value from the user through the IET_LUT
property, i915 driver will write the LUT table to the hardware
registers.

Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
---
 drivers/gpu/drm/i915/display/intel_crtc.c    | 3 +++
 drivers/gpu/drm/i915/display/intel_display.c | 2 ++
 2 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index b90017409a23de2a214ca43d32ba537998ea0f78..4e6c790f53ffe375e1b496fe48e9dc10e05bf11b 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -387,6 +387,9 @@  int intel_crtc_init(struct drm_i915_private *dev_priv, enum pipe pipe)
 	if (drm_crtc_create_histogram_property(&crtc->base,
 					       crtc->histogram->caps))
 		drm_err(&dev_priv->drm, "Failed to initialize histogram properties\n");
+	if (drm_crtc_create_iet_lut_property(&crtc->base,
+					     crtc->histogram->iet_caps))
+		drm_err(&dev_priv->drm, "Failed to initialize histogram properties\n");
 
 	intel_color_crtc_init(crtc);
 	intel_drrs_crtc_init(crtc);
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index c38a33ee90aef144931215254f178ba955f998b0..673012e716e448b4aef0db530f5eeb44edc14265 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7945,6 +7945,8 @@  static void intel_atomic_commit_tail(struct intel_atomic_state *state)
 			intel_histogram_update(crtc,
 					       (struct drm_histogram_config *)
 					       new_crtc_state->uapi.histogram_enable->data);
+		if (new_crtc_state->uapi.iet_lut_updated)
+			intel_histogram_set_iet_lut(crtc, new_crtc_state->uapi.iet_lut);
 	}
 
 	/* Underruns don't always raise interrupts, so check manually */