From: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> When computing normal watermarks in vlv_compute_wm(), if the value is bigger than system limitation, return EINVAL Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> Signed-off-by: Chi Ding <chix.ding@xxxxxxxxx> --- drivers/gpu/drm/i915/intel_pm.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 3e239af..3fb896a 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -1152,9 +1152,14 @@ static int vlv_compute_wm(struct intel_crtc *crtc) int wm = vlv_compute_wm_level(plane, crtc, state, level); int max_wm = plane->base.type == DRM_PLANE_TYPE_CURSOR ? 63 : 511; - /* hack */ - if (WARN_ON(level == 0 && wm > max_wm)) - wm = max_wm; + if (level == 0 && wm > max_wm) { + DRM_DEBUG_KMS("Requested display configuration " + "exceeds system watermark limitations\n"); + DRM_DEBUG_KMS("Plane %d.%d: blocks required = %u/%u\n", + crtc->pipe, + drm_plane_index(&plane->base), wm, max_wm); + return -EINVAL; + } if (wm > wm_state->fifo_size[wm_plane_id(plane)]) break; -- 1.8.0.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx