dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
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 3/3] drm/mgag200: Don't unpin the current cursor image's buffer.
Date: Tue, 23 Jul 2019 09:54:25 +0200	[thread overview]
Message-ID: <20190723075425.24028-4-tzimmermann@suse.de> (raw)
In-Reply-To: <20190723075425.24028-1-tzimmermann@suse.de>

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>
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 | 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

  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 ` [PATCH 1/3] drm/mgag200: Pin displayed cursor BO to video memory Thomas Zimmermann
2019-07-23  7:54 ` [PATCH 2/3] drm/mgag200: Set cursor scanout address to correct BO Thomas Zimmermann
2019-07-23  7:54 ` Thomas Zimmermann [this message]
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-4-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