aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Roper <matthew.d.roper@intel.com>2016-05-12 10:06:10 -0400
committerMatt Roper <matthew.d.roper@intel.com>2016-05-13 10:36:04 -0400
commit6b6bada7d476b586d85b1f9df43125804877e09f (patch)
treec83b9c3ae4ef9be12dca6f7f17b1d9bb84e45e62
parent734fa01f3a17ac80d2d53cee0b05b246c03df0e4 (diff)
drm/i915/gen9: Reject display updates that exceed wm limitations (v2)
If we can't find any valid level 0 watermark values for the requested atomic transaction, reject the configuration before we try to start programming the hardware. v2: - Add extra debugging output when we reject level 0 watermarks so that we can more easily debug how/why they were rejected. Cc: Lyude Paul <cpaul@redhat.com> Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-17-git-send-email-matthew.d.roper@intel.com
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index f9dff5e2e0e7..fcf925b31575 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -3306,7 +3306,22 @@ static int skl_compute_plane_wm(const struct drm_i915_private *dev_priv,
3306 3306
3307 if (res_blocks >= ddb_allocation || res_lines > 31) { 3307 if (res_blocks >= ddb_allocation || res_lines > 31) {
3308 *enabled = false; 3308 *enabled = false;
3309 return 0; 3309
3310 /*
3311 * If there are no valid level 0 watermarks, then we can't
3312 * support this display configuration.
3313 */
3314 if (level) {
3315 return 0;
3316 } else {
3317 DRM_DEBUG_KMS("Requested display configuration exceeds system watermark limitations\n");
3318 DRM_DEBUG_KMS("Plane %d.%d: blocks required = %u/%u, lines required = %u/31\n",
3319 to_intel_crtc(cstate->base.crtc)->pipe,
3320 skl_wm_plane_id(to_intel_plane(pstate->plane)),
3321 res_blocks, ddb_allocation, res_lines);
3322
3323 return -EINVAL;
3324 }
3310 } 3325 }
3311 3326
3312 *out_blocks = res_blocks; 3327 *out_blocks = res_blocks;