mirror of https://gitee.com/openkylin/linux.git
drm/i915/lvds: Disable panel-fitter on gen4 for 1:1 scale factors
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
c4e7a41467
commit
257e48f147
|
@ -269,14 +269,13 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
||||||
u32 scaled_width = adjusted_mode->hdisplay * mode->vdisplay;
|
u32 scaled_width = adjusted_mode->hdisplay * mode->vdisplay;
|
||||||
u32 scaled_height = mode->hdisplay * adjusted_mode->vdisplay;
|
u32 scaled_height = mode->hdisplay * adjusted_mode->vdisplay;
|
||||||
|
|
||||||
pfit_control |= PFIT_ENABLE;
|
|
||||||
/* 965+ is easy, it does everything in hw */
|
/* 965+ is easy, it does everything in hw */
|
||||||
if (scaled_width > scaled_height)
|
if (scaled_width > scaled_height)
|
||||||
pfit_control |= PFIT_SCALING_PILLAR;
|
pfit_control |= PFIT_ENABLE | PFIT_SCALING_PILLAR;
|
||||||
else if (scaled_width < scaled_height)
|
else if (scaled_width < scaled_height)
|
||||||
pfit_control |= PFIT_SCALING_LETTER;
|
pfit_control |= PFIT_ENABLE | PFIT_SCALING_LETTER;
|
||||||
else
|
else if (adjusted_mode->hdisplay != mode->hdisplay)
|
||||||
pfit_control |= PFIT_SCALING_AUTO;
|
pfit_control |= PFIT_ENABLE | PFIT_SCALING_AUTO;
|
||||||
} else {
|
} else {
|
||||||
u32 scaled_width = adjusted_mode->hdisplay * mode->vdisplay;
|
u32 scaled_width = adjusted_mode->hdisplay * mode->vdisplay;
|
||||||
u32 scaled_height = mode->hdisplay * adjusted_mode->vdisplay;
|
u32 scaled_height = mode->hdisplay * adjusted_mode->vdisplay;
|
||||||
|
@ -323,13 +322,17 @@ static bool intel_lvds_mode_fixup(struct drm_encoder *encoder,
|
||||||
* Full scaling, even if it changes the aspect ratio.
|
* Full scaling, even if it changes the aspect ratio.
|
||||||
* Fortunately this is all done for us in hw.
|
* Fortunately this is all done for us in hw.
|
||||||
*/
|
*/
|
||||||
pfit_control |= PFIT_ENABLE;
|
if (mode->vdisplay != adjusted_mode->vdisplay ||
|
||||||
if (INTEL_INFO(dev)->gen >= 4)
|
mode->hdisplay != adjusted_mode->hdisplay) {
|
||||||
pfit_control |= PFIT_SCALING_AUTO;
|
pfit_control |= PFIT_ENABLE;
|
||||||
else
|
if (INTEL_INFO(dev)->gen >= 4)
|
||||||
pfit_control |= (VERT_AUTO_SCALE | HORIZ_AUTO_SCALE |
|
pfit_control |= PFIT_SCALING_AUTO;
|
||||||
VERT_INTERP_BILINEAR |
|
else
|
||||||
HORIZ_INTERP_BILINEAR);
|
pfit_control |= (VERT_AUTO_SCALE |
|
||||||
|
VERT_INTERP_BILINEAR |
|
||||||
|
HORIZ_AUTO_SCALE |
|
||||||
|
HORIZ_INTERP_BILINEAR);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue