Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 217922
b: refs/heads/master
c: 446d218
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson committed Sep 8, 2010
1 parent 2962917 commit bb78262
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7340ea7dcf32227a77ed9df154fc2b2f00ad2fb1
refs/heads/master: 446d2183af68c0fd2772f5ef97a033efe69904a5
19 changes: 10 additions & 9 deletions trunk/drivers/gpu/drm/i915/intel_overlay.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,19 +937,20 @@ static void update_pfit_vscale_ratio(struct intel_overlay *overlay)
{
struct drm_device *dev = overlay->dev;
drm_i915_private_t *dev_priv = dev->dev_private;
u32 ratio;
u32 pfit_control = I915_READ(PFIT_CONTROL);
u32 ratio;

/* XXX: This is not the same logic as in the xorg driver, but more in
* line with the intel documentation for the i965 */
if (!IS_I965G(dev) && (pfit_control & VERT_AUTO_SCALE)) {
ratio = I915_READ(PFIT_AUTO_RATIOS) >> PFIT_VERT_SCALE_SHIFT;
} else { /* on i965 use the PGM reg to read out the autoscaler values */
ratio = I915_READ(PFIT_PGM_RATIOS);
if (IS_I965G(dev))
ratio >>= PFIT_VERT_SCALE_SHIFT_965;
* line with the intel documentation for the i965
*/
if (!IS_I965G(dev)) {
if (pfit_control & VERT_AUTO_SCALE)
ratio = I915_READ(PFIT_AUTO_RATIOS);
else
ratio >>= PFIT_VERT_SCALE_SHIFT;
ratio = I915_READ(PFIT_PGM_RATIOS);
ratio >>= PFIT_VERT_SCALE_SHIFT;
} else { /* on i965 use the PGM reg to read out the autoscaler values */
ratio = I915_READ(PFIT_PGM_RATIOS) >> PFIT_VERT_SCALE_SHIFT_965;
}

overlay->pfit_vscale_ratio = ratio;
Expand Down

0 comments on commit bb78262

Please sign in to comment.