Before exposing the property check if the number of scalers
is 2 as casf needs second scaler. If not then dont expose the
property.

Signed-off-by: Nemesa Garg <[email protected]>
---
 drivers/gpu/drm/i915/display/intel_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c 
b/drivers/gpu/drm/i915/display/intel_crtc.c
index 153ff4b4b52c..963e6c7d75b8 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -395,7 +395,7 @@ int intel_crtc_init(struct intel_display *display, enum 
pipe pipe)
 
        drm_WARN_ON(display->drm, drm_crtc_index(&crtc->base) != crtc->pipe);
 
-       if (HAS_CASF(display))
+       if (HAS_CASF(display) && crtc->num_scalers > 1)
                drm_crtc_create_sharpness_strength_property(&crtc->base);
 
        return 0;
-- 
2.25.1

Reply via email to