From: Thomas Zimmermann <tzimmermann@suse.de>
To: kraxel@redhat.com, daniel@ffwll.ch, sam@ravnborg.org, airlied@redhat.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org
Subject: [PATCH 1/3] drm/mgag200: Pin displayed cursor BO to video memory
Date: Tue, 23 Jul 2019 09:54:23 +0200 [thread overview]
Message-ID: <20190723075425.24028-2-tzimmermann@suse.de> (raw)
In-Reply-To: <20190723075425.24028-1-tzimmermann@suse.de>
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>
Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/mgag200/mgag200_cursor.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.22.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev parent reply other threads:[~2019-07-23 7:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-23 7:54 [PATCH 0/3] Fixes for mgag200 cursors Thomas Zimmermann
2019-07-23 7:54 ` Thomas Zimmermann [this message]
2019-07-23 7:54 ` [PATCH 2/3] drm/mgag200: Set cursor scanout address to correct BO Thomas Zimmermann
2019-07-23 7:54 ` [PATCH 3/3] drm/mgag200: Don't unpin the current cursor image's buffer Thomas Zimmermann
2019-07-23 8:40 ` [PATCH 0/3] Fixes for mgag200 cursors Sam Ravnborg
2019-07-24 11:24 ` Thomas Zimmermann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190723075425.24028-2-tzimmermann@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kraxel@redhat.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox