summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-07-23 09:54:23 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-07-24 09:47:43 +0200
commita0fd72d2c95b56c78feec0867f2077b5ff5991e6 (patch)
treedaa199b1594db9f9a164da17119458aa70d62986
parentde6786bee48e6f29846b7b220ecfea32364117d4 (diff)
drm/mgag200: Pin displayed cursor BO to video memory
The cursor BO has to be pinned to video ram while it's being displayed. With the current code, the BO might be pinned to system memory instead. The patch fixes this problem. 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-2-tzimmermann@suse.de
-rw-r--r--drivers/gpu/drm/mgag200/mgag200_cursor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/mgag200/mgag200_cursor.c b/drivers/gpu/drm/mgag200/mgag200_cursor.c
index 13f32df7e357..a19975931c6d 100644
--- a/drivers/gpu/drm/mgag200/mgag200_cursor.c
+++ b/drivers/gpu/drm/mgag200/mgag200_cursor.c
@@ -99,7 +99,7 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc,
}
/* Pin and map up-coming buffer to write colour indices */
- ret = drm_gem_vram_pin(pixels_next, 0);
+ ret = drm_gem_vram_pin(pixels_next, DRM_GEM_VRAM_PL_FLAG_VRAM);
if (ret) {
dev_err(&dev->pdev->dev,
"failed to pin cursor buffer: %d\n", ret);