diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-15 21:58:26 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-15 22:07:31 +0000 |
commit | 01114334dd893863ad4bbe72fc94a278aa36bfa5 (patch) | |
tree | 704c8024c623fcb7e44b81bbd58e5aaa24dde56b /src/sna/sna_display.c | |
parent | d1d14f20cfd6412adbd6f937f54c814c2a332e6f (diff) |
sna: Recompute the cursor after a modeset
As a modeset may adjust the rotation or the transform of the cursor, we
may need to recompute the cursor image afterwards.
Reported-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r-- | src/sna/sna_display.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c index 59ecfd37..24e36031 100644 --- a/src/sna/sna_display.c +++ b/src/sna/sna_display.c @@ -2878,6 +2878,13 @@ static void sna_crtc_randr(xf86CrtcPtr crtc) } else crtc->transform_in_use = sna_crtc->rotation != RR_Rotate_0; + /* Recompute the cursor after a potential change in transform */ + if (sna_crtc->cursor) { + assert(sna_crtc->cursor->ref > 0); + sna_crtc->cursor->ref--; + sna_crtc->cursor = NULL; + } + if (needs_transform) { sna_crtc->hwcursor = is_affine(&f_fb_to_crtc); sna_crtc->cursor_transform = |