[Intel-gfx] [v5 1/6] drm/i915: Check for Null for color lut callbacks

Uma Shankar uma.shankar at intel.com
Tue Jan 8 07:37:28 UTC 2019


Check if de-gamma/gamma lut callback is assigned before
calling the same.

Signed-off-by: Uma Shankar <uma.shankar at intel.com>
---
 drivers/gpu/drm/i915/intel_color.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_color.c b/drivers/gpu/drm/i915/intel_color.c
index 37fd9dd..4ff4db6 100644
--- a/drivers/gpu/drm/i915/intel_color.c
+++ b/drivers/gpu/drm/i915/intel_color.c
@@ -602,7 +602,8 @@ void intel_color_load_luts(struct intel_crtc_state *crtc_state)
 	struct drm_device *dev = crtc_state->base.crtc->dev;
 	struct drm_i915_private *dev_priv = to_i915(dev);
 
-	dev_priv->display.load_luts(crtc_state);
+	if (dev_priv->display.load_luts)
+		dev_priv->display.load_luts(crtc_state);
 }
 
 int intel_color_check(struct intel_crtc_state *crtc_state)
-- 
1.9.1



More information about the Intel-gfx mailing list