aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun R Murthy <arun.r.murthy@intel.com>2015-10-19 13:33:10 +0530
committerMihai Serban <mihai.serban@intel.com>2016-01-07 17:54:55 +0200
commit4c1eec5b691331d512f2e279a7c8bb4640fc2e59 (patch)
tree2d9d627f33c0d1584a1fa73f18cfe96521eefd4f
parent5ac5503728482243b78ce6a798cd3fd5baefc185 (diff)
downloadminnowboard-v3.14-4c1eec5b691331d512f2e279a7c8bb4640fc2e59.tar.gz
SQUASHME! [VPG]: drm/i915: If pfit mode is auto and multiplane dont calculate
If user space requests to enable pfit in AUTO mode, dont use calculated mode if we are in multi plane, because in multiplane scenario pfit can be enabled only in AUTO mode. This patch tobe squashed with the below patch commit 4804b54d8cdc0ce2a0a6b31ca49b533b3b30924b Author: Arun R Murthy <arun.r.murthy@intel.com> Date: Tue Aug 11 14:29:54 2015 +0530 SQUASHME! [VPG]: calculate the aspect ratio for pfit Change-Id: I81ca802db196556fdbcaa3af218ca181859b4c01 Tracked-On: https://jira01.devtools.intel.com/browse/OAM-6119 Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 47b42afb74f..0be3ed2d5e3 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -10906,14 +10906,17 @@ int intel_set_disp_calc_flip(struct drm_mode_set_display *disp,
(((disp->panel_fitter.src_w - 1) << 16) |
(disp->panel_fitter.src_h - 1));
- if (((mode->hdisplay * disp->panel_fitter.src_h) /
- disp->panel_fitter.src_w) < mode->vdisplay)
+ if ((((mode->hdisplay * disp->panel_fitter.src_h) /
+ disp->panel_fitter.src_w) < mode->vdisplay) &&
+ dev_priv->maxfifo_enabled)
pfit_mode |= PFIT_SCALING_LETTER;
- else if (((mode->vdisplay * disp->panel_fitter.src_w) /
- disp->panel_fitter.src_h) < mode->hdisplay)
+ else if ((((mode->vdisplay * disp->panel_fitter.src_w) /
+ disp->panel_fitter.src_h) < mode->hdisplay) &&
+ dev_priv->maxfifo_enabled)
pfit_mode |= PFIT_SCALING_PILLAR;
- else if ((mode->hdisplay / mode->vdisplay) ==
+ else if (((mode->hdisplay / mode->vdisplay) ==
(disp->panel_fitter.src_w / disp->panel_fitter.src_h))
+ || !dev_priv->maxfifo_enabled)
pfit_mode |= PFIT_SCALING_AUTO;
/* Enable Panel fitter if any valid mode is set */