aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_overlay.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915/intel_overlay.c')
-rw-r--r--drivers/gpu/drm/i915/intel_overlay.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_overlay.c b/drivers/gpu/drm/i915/intel_overlay.c
index cc86b3e0849d..484058216e9d 100644
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -937,19 +937,20 @@ static void update_pfit_vscale_ratio(struct intel_overlay *overlay)
937{ 937{
938 struct drm_device *dev = overlay->dev; 938 struct drm_device *dev = overlay->dev;
939 drm_i915_private_t *dev_priv = dev->dev_private; 939 drm_i915_private_t *dev_priv = dev->dev_private;
940 u32 ratio;
941 u32 pfit_control = I915_READ(PFIT_CONTROL); 940 u32 pfit_control = I915_READ(PFIT_CONTROL);
941 u32 ratio;
942 942
943 /* XXX: This is not the same logic as in the xorg driver, but more in 943 /* XXX: This is not the same logic as in the xorg driver, but more in
944 * line with the intel documentation for the i965 */ 944 * line with the intel documentation for the i965
945 if (!IS_I965G(dev) && (pfit_control & VERT_AUTO_SCALE)) { 945 */
946 ratio = I915_READ(PFIT_AUTO_RATIOS) >> PFIT_VERT_SCALE_SHIFT; 946 if (!IS_I965G(dev)) {
947 } else { /* on i965 use the PGM reg to read out the autoscaler values */ 947 if (pfit_control & VERT_AUTO_SCALE)
948 ratio = I915_READ(PFIT_PGM_RATIOS); 948 ratio = I915_READ(PFIT_AUTO_RATIOS);
949 if (IS_I965G(dev))
950 ratio >>= PFIT_VERT_SCALE_SHIFT_965;
951 else 949 else
952 ratio >>= PFIT_VERT_SCALE_SHIFT; 950 ratio = I915_READ(PFIT_PGM_RATIOS);
951 ratio >>= PFIT_VERT_SCALE_SHIFT;
952 } else { /* on i965 use the PGM reg to read out the autoscaler values */
953 ratio = I915_READ(PFIT_PGM_RATIOS) >> PFIT_VERT_SCALE_SHIFT_965;
953 } 954 }
954 955
955 overlay->pfit_vscale_ratio = ratio; 956 overlay->pfit_vscale_ratio = ratio;