]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/skl+: Fail the flip if ddb min requirement exceeds pipe allocation
authorKumar, Mahesh <mahesh1.kumar@intel.com>
Wed, 17 May 2017 11:58:26 +0000 (17:28 +0530)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 17 May 2017 21:32:57 +0000 (14:32 -0700)
commitee3bd89aaa263ac76bcdadd39c2323fb57dcd36f
tree1df6c492ba1eff60ab4009fd60f2f821b1ab57a9
parent2fb54cc2533536e4b01b759e19609296392edda4
drm/i915/skl+: Fail the flip if ddb min requirement exceeds pipe allocation

DDB minimum requirement of crtc configuration (cumulative of all the
enabled planes in crtc) may exceed the allocated DDB for crtc/pipe.
This patch make changes to fail the flip/ioctl if minimum requirement
for pipe exceeds the total ddb allocated to the pipe.
Previously it succeeded but making alloc_size a negative value. Which
will make subsequent calculations for plane ddb allocation bogus & may
lead to screen corruption or system hang.

Changes from V1:
 - Improve commit message as per Ander's comment
 - Remove extra parentheses (Ander)

Signed-off-by: Mahesh Kumar <mahesh1.kumar@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.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-8-mahesh1.kumar@intel.com
drivers/gpu/drm/i915/intel_pm.c