Skip to content

Commit

Permalink
drm/i915: Don't trim cursor addresses to 11 bits
Browse files Browse the repository at this point in the history
We can safely assume that cursor addresses will not extend beyond the
addressable screen dimensions; setting the additional bits is harmless in
any case.

Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
  • Loading branch information
Keith Packard authored and Eric Anholt committed Jun 5, 2009
1 parent cb66c69 commit 2245fda
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/i915/intel_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2012,16 +2012,16 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
uint32_t adder;

if (x < 0) {
temp |= (CURSOR_POS_SIGN << CURSOR_X_SHIFT);
temp |= CURSOR_POS_SIGN << CURSOR_X_SHIFT;
x = -x;
}
if (y < 0) {
temp |= (CURSOR_POS_SIGN << CURSOR_Y_SHIFT);
temp |= CURSOR_POS_SIGN << CURSOR_Y_SHIFT;
y = -y;
}

temp |= ((x & CURSOR_POS_MASK) << CURSOR_X_SHIFT);
temp |= ((y & CURSOR_POS_MASK) << CURSOR_Y_SHIFT);
temp |= x << CURSOR_X_SHIFT;
temp |= y << CURSOR_Y_SHIFT;

adder = intel_crtc->cursor_addr;
I915_WRITE((pipe == 0) ? CURAPOS : CURBPOS, temp);
Expand Down

0 comments on commit 2245fda

Please sign in to comment.