diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-12-24 12:56:03 +0900 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-03-11 13:14:33 -0500 |
commit | 870d4e2e6b40f911049a5286d605814d2401741d (patch) | |
tree | deb9c32319856d1f4c4d21f13e7dd0742d358b5c /hw | |
parent | af87ab62878334ee9d4e75c472fc80178329b4dd (diff) |
xfree86/modes: Check for CRTC transforms in xf86_use_hw_cursor(_argb) (v2)
We currently don't handle transforms for the HW cursor image, so return
FALSE to signal a software cursor must be used if a transform is in use
on any CRTC.
v2: Check crtc->transformPresent instead of crtc->transform_in_use. The
latter is TRUE for rotation as well, which we handle correctly.
Reviewed-by: Keith Packard <keithp@keithp.com>
(cherry picked from commit a4ffa8721debb34bd36fd4624890d9c26886c618)
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xfree86/modes/xf86Cursors.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/hw/xfree86/modes/xf86Cursors.c b/hw/xfree86/modes/xf86Cursors.c index d3baf0d7e..5df1ab73a 100644 --- a/hw/xfree86/modes/xf86Cursors.c +++ b/hw/xfree86/modes/xf86Cursors.c @@ -515,6 +515,7 @@ xf86_use_hw_cursor(ScreenPtr screen, CursorPtr cursor) ScrnInfoPtr scrn = xf86ScreenToScrn(screen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CursorInfoPtr cursor_info = xf86_config->cursor_info; + int c; cursor = RefCursor(cursor); if (xf86_config->cursor) @@ -525,6 +526,16 @@ xf86_use_hw_cursor(ScreenPtr screen, CursorPtr cursor) cursor->bits->height > cursor_info->MaxHeight) return FALSE; + for (c = 0; c < xf86_config->num_crtc; c++) { + xf86CrtcPtr crtc = xf86_config->crtc[c]; + + if (!crtc->enabled) + continue; + + if (crtc->transformPresent) + return FALSE; + } + return TRUE; } |