From: Kumar, Mahesh Date: Wed, 17 May 2017 11:58:24 +0000 (+0530) Subject: drm/i915/skl: Fail the flip if no FB for WM calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7b75119c8bb9bde34f0cc36690094f8928a4c491;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915/skl: Fail the flip if no FB for WM calculation Fail the flip if no FB is present but plane_state is set as visible. Above is not a valid combination so instead of continue fail the flip. Signed-off-by: Mahesh Kumar Reviewed-by: Matt Roper Reviewed-by: Maarten Lankhorst Signed-off-by: Matt Roper Link: http://patchwork.freedesktop.org/patch/msgid/20170517115831.13830-6-mahesh1.kumar@intel.com --- diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index ab056952cfa4..f494af358874 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -4408,7 +4408,8 @@ skl_compute_wm_level(const struct drm_i915_private *dev_priv, if (!intel_pstate) intel_pstate = to_intel_plane_state(plane->state); - WARN_ON(!intel_pstate->base.fb); + if (WARN_ON(!intel_pstate->base.fb)) + return -EINVAL; ddb_blocks = skl_ddb_entry_size(&ddb->plane[pipe][intel_plane->id]);