diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-01-15 16:48:46 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2016-01-18 18:46:52 +0900 |
commit | 9483a3d777919b224f70c3b4d01e4b320a57db31 (patch) | |
tree | 266a983188e79a67f89ded576c32180b3e0b7369 | |
parent | b16856b25086ffb27365ac2249b8da921066ce62 (diff) |
Fix RandR CRTC transforms
Currently, Xorg will only transform the cursor as of the first time the
cursor image changes after a transform is set.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=80678
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | src/drmmode_display.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 9880ee37..0424dbd2 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -673,7 +673,6 @@ drmmode_set_mode_major(xf86CrtcPtr crtc, DisplayModePtr mode, crtc->x = x; crtc->y = y; crtc->rotation = rotation; - crtc->transformPresent = FALSE; output_ids = calloc(sizeof(uint32_t), xf86_config->num_output); if (!output_ids) { @@ -839,6 +838,19 @@ drmmode_load_cursor_argb (xf86CrtcPtr crtc, CARD32 *image) ptr[i] = cpu_to_le32(image[i]); } +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0) + +static Bool drmmode_load_cursor_argb_check(xf86CrtcPtr crtc, CARD32 * image) +{ + /* Fall back to SW cursor if the CRTC is transformed */ + if (crtc->transformPresent) + return FALSE; + + drmmode_load_cursor_argb(crtc, image); + return TRUE; +} + +#endif static void drmmode_hide_cursor (xf86CrtcPtr crtc) @@ -995,6 +1007,9 @@ static xf86CrtcFuncsRec drmmode_crtc_funcs = { .show_cursor = drmmode_show_cursor, .hide_cursor = drmmode_hide_cursor, .load_cursor_argb = drmmode_load_cursor_argb, +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,15,99,903,0) + .load_cursor_argb_check = drmmode_load_cursor_argb_check, +#endif .gamma_set = drmmode_crtc_gamma_set, .shadow_create = drmmode_crtc_shadow_create, |