summaryrefslogtreecommitdiff
path: root/src/drmmode_display.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drmmode_display.c')
-rw-r--r--src/drmmode_display.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3769e44c..3c873dc0 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -860,7 +860,20 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode,
}
}
- if (drmmode_can_use_hw_cursor(crtc))
+ /* Compute index of this CRTC into xf86_config->crtc */
+ for (i = 0; i < xf86_config->num_crtc; i++) {
+ if (xf86_config->crtc[i] != crtc)
+ continue;
+
+ if (!crtc->enabled || drmmode_can_use_hw_cursor(crtc))
+ info->hwcursor_disabled &= ~(1 << i);
+ else
+ info->hwcursor_disabled |= 1 << i;
+
+ break;
+ }
+
+ if (!info->hwcursor_disabled)
xf86_reload_cursors(pScreen);
done: