Skip to content

Commit 1a426d6

Browse files
committed
drm/i915: Handle invalid ilk pipe watermarks correctly.
This function returns an int, but when ilk_validate_pipe_wm fails it returns false, which is 0 (success). As a result invalid watermarks are applied, while they should have been rejected. Fix this by returning -EINVAL. Fixes: ed4a6a7 ("drm/i915: Add two-stage ILK-style watermark programming (v11)") Cc: Matt Roper <[email protected]> Signed-off-by: Maarten Lankhorst <[email protected]> Link: http://patchwork.freedesktop.org/patch/msgid/1456918563-28696-1-git-send-email-maarten.lankhorst@linux.intel.com Reviewed-by: Matt Roper <[email protected]>
1 parent 933bfb4 commit 1a426d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/intel_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2345,7 +2345,7 @@ static int ilk_compute_pipe_wm(struct intel_crtc *intel_crtc,
23452345
pipe_wm->linetime = hsw_compute_linetime_wm(dev, cstate);
23462346

23472347
if (!ilk_validate_pipe_wm(dev, pipe_wm))
2348-
return false;
2348+
return -EINVAL;
23492349

23502350
ilk_compute_wm_reg_maximums(dev, 1, &max);
23512351

0 commit comments

Comments
 (0)