diff mbox series

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

Message ID 20250110-dpst-v7-11-605cb0271162@intel.com (mailing list archive)
State New
Headers show
Series Display Global Histogram | expand

Commit Message

Arun R Murthy Jan. 9, 2025, 7:45 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 619aa363724602d4084184bfdf5766b71aed1b9f..8c1527ae348083c9d8af7cbbbe188ed18afb0a43 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 486992a2caadebf2d3deb200b01d2d0d26b26cb0..dfa0b214a54b5336d45e965282b7d8017f68bafa 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7890,6 +7890,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 */