aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-05-30 23:42:29 -0400
committerEric Anholt <eric@anholt.net>2009-06-05 09:09:04 -0400
commit2245fda810f870dce9b030e6aa604320abba53a5 (patch)
treebe26cc026f98182ede2afe50929ac16645dc4412
parentcb66c692d1ae257f32dc7f6085cf9cb9f2f6bab8 (diff)
drm/i915: Don't trim cursor addresses to 11 bits
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>
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 05bd97e3e3e0..c5c45827ca01 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2012,16 +2012,16 @@ static int intel_crtc_cursor_move(struct drm_crtc *crtc, int x, int y)
2012 uint32_t adder; 2012 uint32_t adder;
2013 2013
2014 if (x < 0) { 2014 if (x < 0) {
2015 temp |= (CURSOR_POS_SIGN << CURSOR_X_SHIFT); 2015 temp |= CURSOR_POS_SIGN << CURSOR_X_SHIFT;
2016 x = -x; 2016 x = -x;
2017 } 2017 }
2018 if (y < 0) { 2018 if (y < 0) {
2019 temp |= (CURSOR_POS_SIGN << CURSOR_Y_SHIFT); 2019 temp |= CURSOR_POS_SIGN << CURSOR_Y_SHIFT;
2020 y = -y; 2020 y = -y;
2021 } 2021 }
2022 2022
2023 temp |= ((x & CURSOR_POS_MASK) << CURSOR_X_SHIFT); 2023 temp |= x << CURSOR_X_SHIFT;
2024 temp |= ((y & CURSOR_POS_MASK) << CURSOR_Y_SHIFT); 2024 temp |= y << CURSOR_Y_SHIFT;
2025 2025
2026 adder = intel_crtc->cursor_addr; 2026 adder = intel_crtc->cursor_addr;
2027 I915_WRITE((pipe == 0) ? CURAPOS : CURBPOS, temp); 2027 I915_WRITE((pipe == 0) ? CURAPOS : CURBPOS, temp);