summaryrefslogtreecommitdiff
path: root/src/radeon_cursor.c
diff options
context:
space:
mode:
authorAlex Deucher <alexdeucher@gmail.com>2009-04-22 18:42:36 -0400
committerAlex Deucher <alexdeucher@gmail.com>2009-04-23 11:49:23 -0400
commit0da80f34b5aa5999d2030ffbc5187328fa4e4ae5 (patch)
treefdd5f60373d83a06f0f906f73147d2d07b24da61 /src/radeon_cursor.c
parent1a7b982457ead5f21c6e62a409ca0dbf86005607 (diff)
radeon: minor cleanup and warning fix
Diffstat (limited to 'src/radeon_cursor.c')
-rw-r--r--src/radeon_cursor.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 30bee508..980b81f4 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -194,6 +194,7 @@ void
radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
{
ScrnInfoPtr pScrn = crtc->scrn;
+ RADEONEntPtr pRADEONEnt = RADEONEntPriv(pScrn);
RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
int crtc_id = radeon_crtc->crtc_id;
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -208,9 +209,7 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
if (yorigin >= CURSOR_HEIGHT) yorigin = CURSOR_HEIGHT - 1;
if (IS_AVIVO_VARIANT) {
- xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn);
int w = CURSOR_WIDTH;
- int i;
/* avivo cursor spans the full fb width */
if (crtc->rotatedData == NULL) {
@@ -218,15 +217,8 @@ radeon_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y)
y += crtc->y;
}
- for (i = 0; i < xf86_config->num_crtc; i++) {
- xf86CrtcPtr crtc = xf86_config->crtc[i];
- RADEONCrtcPrivatePtr radeon_crtc = crtc->driver_private;
-
- if (!radeon_crtc->enabled)
- break;
- }
-
- if (i == xf86_config->num_crtc) {
+ if (pRADEONEnt->Controller[0]->enabled &&
+ pRADEONEnt->Controller[1]->enabled) {
int cursor_end, frame_end;
cursor_end = x - xorigin + w;