Skip to contentSkip to conversation

drm/qxl: two one-liner fixes.

PATCH In review Gerd Hoffmann 2 participants 4 messages May 11, 2021

Subsystems (4)
lore
Share & tools
lore

Gerd Hoffmann

author maintainer
#0 lore raw

cover drm/qxl: two one-liner fixes.

Gerd Hoffmann (2):
drm/qxl: drop redundant code
drm/qxl: balance dumb_shadow_bo pin

 drivers/gpu/drm/qxl/qxl_display.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

PATCH 1/2 drm/qxl: drop redundant code

Not needed, qxl_io_destroy_primary() does that for us.

---
 drivers/gpu/drm/qxl/qxl_display.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/gpu/drm/qxl/qxl_display.c +1 -3
index a7637e79cb42..be5183733c1b 100644
@@ -677,10 +677,8 @@ static void qxl_primary_atomic_disable(struct drm_plane *plane,
 
 		if (bo->shadow)
 			bo = bo->shadow;
-		if (bo->is_primary) {
+		if (bo->is_primary)
 			qxl_io_destroy_primary(qdev);
-			bo->is_primary = false;
-		}
 	}
 }
 
Signature · 1 line
2.31.1
author maintainer
#2 lore raw

PATCH 2/2 drm/qxl: balance dumb_shadow_bo pin

In reply to Gerd Hoffmann

The shadow bo is created in pinned state, so we have to unpin it when dropping the reference. Otherwise ttm is unhappy and throws a WARN() on release.

---
 drivers/gpu/drm/qxl/qxl_display.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/qxl/qxl_display.c +1 -0
index be5183733c1b..9e0a1e836011 100644
@@ -801,6 +801,7 @@ static void qxl_prepare_shadow(struct qxl_device *qdev, struct qxl_bo *user_bo,
 	    qdev->dumb_shadow_bo->surf.width  != surf.width ||
 	    qdev->dumb_shadow_bo->surf.height != surf.height) {
 		if (qdev->dumb_shadow_bo) {
+			qxl_bo_unpin(qdev->dumb_shadow_bo);
 			drm_gem_object_put
 				(&qdev->dumb_shadow_bo->tbo.base);
 			qdev->dumb_shadow_bo = NULL;
Signature · 1 line
2.31.1
maintainer Acked-by on the v1 series
#3 lore raw
In reply to Gerd Hoffmann

Am 11.05.21 um 12:45 schrieb Gerd Hoffmann:

Quoted 9 lines

Gerd Hoffmann (2):
drm/qxl: drop redundant code
drm/qxl: balance dumb_shadow_bo pin

  drivers/gpu/drm/qxl/qxl_display.c | 5 ++---
  1 file changed, 2 insertions(+), 3 deletions(-)
Signature · 6 lines
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Felix Imendörffer