drm/mgag200: Don't unpin the current cursor image's buffer.
authorThomas Zimmermann <tzimmermann@suse.de>
Tue, 23 Jul 2019 07:54:25 +0000 (09:54 +0200)
committerThomas Zimmermann <tzimmermann@suse.de>
Wed, 24 Jul 2019 07:48:30 +0000 (09:48 +0200)
Currently the displayed cursor buffer might be evicted from video memory.
Not unpinning the BO fixes this problem. At this point, pixels_current
also references the BO and it will be unpinned during the next cursor
update.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190723075425.24028-4-tzimmermann@suse.de
drivers/gpu/drm/mgag200/mgag200_cursor.c

index f11b862cbed9fa9120e2ec27b0f83e93d9982af3..289ce3e29032766d887f428d9bf30ad50d32e098 100644 (file)
@@ -213,7 +213,6 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc,
        mdev->cursor.pixels_current = pixels_next;
 
        drm_gem_vram_kunmap(pixels_next);
-       drm_gem_vram_unpin(pixels_next);
        drm_gem_vram_kunmap(gbo);
        drm_gem_vram_unpin(gbo);
        drm_gem_object_put_unlocked(obj);