summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_pm.c
diff options
context:
space:
mode:
authorKumar, Mahesh <mahesh1.kumar@intel.com>2017-05-17 17:28:24 +0530
committerMatt Roper <matthew.d.roper@intel.com>2017-05-17 14:32:44 -0700
commit7b75119c8bb9bde34f0cc36690094f8928a4c491 (patch)
tree2afe66290760221972576a7599e90639ddeba202 /drivers/gpu/drm/i915/intel_pm.c
parent7084b50bdd8f8b8fc232fb8642d83de913575baa (diff)
downloadop-kernel-dev-7b75119c8bb9bde34f0cc36690094f8928a4c491.zip
op-kernel-dev-7b75119c8bb9bde34f0cc36690094f8928a4c491.tar.gz
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 <mahesh1.kumar@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/20170517115831.13830-6-mahesh1.kumar@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_pm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index ab05695..f494af3 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]);
OpenPOWER on IntegriCloud