From: Paulo Zanoni Date: Thu, 22 Sep 2016 21:00:35 +0000 (-0300) Subject: drm/i915/gen9: fail the modeset instead of WARNing on unsupported config X-Git-Tag: v4.10-rc1~154^2~44^2~155 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=86a462bcad329ca9232547857d466cc3012d7c2e;p=karo-tx-linux.git drm/i915/gen9: fail the modeset instead of WARNing on unsupported config 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 Reviewed-by: Maarten Lankhorst Signed-off-by: Paulo Zanoni Link: http://patchwork.freedesktop.org/patch/msgid/1474578035-424-10-git-send-email-paulo.r.zanoni@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index d5e77382697f..5b47888c49a7 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -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;