diff mbox series

[v3,5/7] drm/i915: Attach gamma mode property

Message ID 1555064463-18479-6-git-send-email-uma.shankar@intel.com (mailing list archive)
State New, archived
Headers show
Series Add Multi Segment Gamma Support | expand

Commit Message

Shankar, Uma April 12, 2019, 10:21 a.m. UTC
Attach the gamma mode property to allow userspace
set the gamma mode and provide the luts for the
same.

v2: Enabled just 1 property interface for gamma_mode,
as suggested by Ville.

Signed-off-by: Uma Shankar <uma.shankar@intel.com>
---
 drivers/gpu/drm/i915/intel_color.c   | 3 +++
 drivers/gpu/drm/i915/intel_display.c | 3 +++
 2 files changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index d4ce1ed..edf5ff8 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -1884,6 +1884,9 @@  void intel_color_init(struct intel_crtc *crtc)
 	} else {
 		if (INTEL_GEN(dev_priv) >= 11) {
 			dev_priv->display.color_check = icl_color_check;
+
+			drm_crtc_attach_gamma_mode_property(&crtc->base);
+
 			/* don't advertize the >= 1.0 entries */
 			degamma_lut_size = 0;
 			gamma_lut_size = ILK_LUT_SIZE_10BIT;
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index f29a348..3e47935 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -15680,6 +15680,9 @@  int intel_modeset_init(struct drm_device *dev)
 		      INTEL_INFO(dev_priv)->num_pipes,
 		      INTEL_INFO(dev_priv)->num_pipes > 1 ? "s" : "");
 
+	if (INTEL_GEN(dev_priv) >= 11)
+		drm_color_create_gamma_mode_property(&dev_priv->drm, 4);
+
 	for_each_pipe(dev_priv, pipe) {
 		ret = intel_crtc_init(dev_priv, pipe);
 		if (ret) {