[PATCH 02/10] INTEL_DII: drm/i915/color: Use new helper function

Borah, Chaitanya Kumar chaitanya.kumar.borah at intel.com
Wed Sep 14 12:47:55 UTC 2022


drm_color_add_gamma_mode_range function has been refactored
to drm_color_add_gamma_degamma_mode_range to support both
gamma and degamma ranges.

Signed-off-by: Borah, Chaitanya Kumar <chaitanya.kumar.borah at intel.com>
---
 drivers/gpu/drm/i915/display/intel_color.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_color.c b/drivers/gpu/drm/i915/display/intel_color.c
index 7ecf32a0375050..4dd5c5c8fd5727 100644
--- a/drivers/gpu/drm/i915/display/intel_color.c
+++ b/drivers/gpu/drm/i915/display/intel_color.c
@@ -3215,12 +3215,14 @@ void intel_color_init(struct intel_crtc *crtc)
 		if (DISPLAY_VER(dev_priv) >= 13) {
 			dev_priv->color_funcs = &xelpd_color_funcs;
 			drm_color_create_gamma_mode_property(&crtc->base, 2);
-			drm_color_add_gamma_mode_range(&crtc->base,
-						       "no gamma", NULL, 0);
-			drm_color_add_gamma_mode_range(&crtc->base,
-						       "logarithmic gamma",
-							xelpd_logarithmic_gamma,
-							sizeof(xelpd_logarithmic_gamma));
+			drm_color_add_gamma_degamma_mode_range(&crtc->base,
+							       "no gamma", NULL, 0,
+							       LUT_TYPE_GAMMA);
+			drm_color_add_gamma_degamma_mode_range(&crtc->base,
+							       "logarithmic gamma",
+							       xelpd_logarithmic_gamma,
+							       sizeof(xelpd_logarithmic_gamma),
+							       LUT_TYPE_GAMMA);
 			drm_crtc_attach_gamma_mode_property(&crtc->base);
 		} else if (DISPLAY_VER(dev_priv) >= 11) {
 			dev_priv->color_funcs = &icl_color_funcs;
-- 
2.25.1



More information about the Intel-gfx-trybot mailing list