drm/i915/gen9: fail the modeset instead of WARNing on unsupported config
authorPaulo Zanoni <[email protected]>
Thu, 22 Sep 2016 21:00:35 +0000 (18:00 -0300)
committerPaulo Zanoni <[email protected]>
Mon, 26 Sep 2016 19:55:08 +0000 (16:55 -0300)
Now that this code is part of the compute stage we can return -EINVAL
to prevent the modeset instead of giving a WARN and trying anyway.

v2:
 - Fix typo (Paul Menzel).
 - Add MISSING_CASE() (Ville, Maarten).

Reported-by: Lyude <[email protected]>
Reviewed-by: Maarten Lankhorst <[email protected]>
Signed-off-by: Paulo Zanoni <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/i915/intel_pm.c

index d5e77382697f1f182d1a73f5ec128474686509dd..5b47888c49a7811b6c5fbd562ac1c4f6c4778c79 100644 (file)
@@ -3580,11 +3580,12 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
                case 2:
                        y_min_scanlines = 8;
                        break;
-               default:
-                       WARN(1, "Unsupported pixel depth for rotation");
                case 4:
                        y_min_scanlines = 4;
                        break;
+               default:
+                       MISSING_CASE(cpp);
+                       return -EINVAL;
                }
        } else {
                y_min_scanlines = 4;