[Eoan][SRU][PATCH 2/4] drm/mgag200: Don't unpin the current cursor image's buffer.

Po-Hsu Lin po-hsu.lin at canonical.com
Mon Dec 30 03:15:19 UTC 2019


From: Thomas Zimmermann <tzimmermann at suse.de>

BugLink: https://bugs.launchpad.net/bugs/1851340

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 at suse.de>
Acked-by: Sam Ravnborg <sam at ravnborg.org>
Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Dave Airlie <airlied at redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190723075425.24028-4-tzimmermann@suse.de
(cherry picked from commit a9c342ab77ab6e8ab662105335ae1e44e01271d4)
Signed-off-by: Po-Hsu Lin <po-hsu.lin at canonical.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 f0c61a9..fd3af57 100644
--- a/drivers/gpu/drm/mgag200/mgag200_cursor.c
+++ b/drivers/gpu/drm/mgag200/mgag200_cursor.c
@@ -211,7 +211,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.7.4




More information about the kernel-team mailing list