]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - drivers/gpu/drm/i915/intel_pm.c
drm/i915: Handle invalid ilk pipe watermarks correctly.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 2 Mar 2016 11:36:03 +0000 (12:36 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 3 Mar 2016 08:17:42 +0000 (09:17 +0100)
commit1a426d6116467e09954289ee8c273e1bcc003adc
tree5193f17015a0e8c67cbd662ff2cf55175869a86e
parent933bfb44b228f26e09364d122576c8e938588d4f
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: ed4a6a7ca853 ("drm/i915: Add two-stage ILK-style watermark programming (v11)")
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1456918563-28696-1-git-send-email-maarten.lankhorst@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
drivers/gpu/drm/i915/intel_pm.c