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 <tzimmerm...@suse.de>
Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
Cc: Gerd Hoffmann <kra...@redhat.com>
Cc: Dave Airlie <airl...@redhat.com>
---
 drivers/gpu/drm/mgag200/mgag200_cursor.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/gpu/drm/mgag200/mgag200_cursor.c 
b/drivers/gpu/drm/mgag200/mgag200_cursor.c
index f11b862cbed9..289ce3e29032 100644
--- a/drivers/gpu/drm/mgag200/mgag200_cursor.c
+++ b/drivers/gpu/drm/mgag200/mgag200_cursor.c
@@ -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);
-- 
2.22.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to