[PATCH 2/3] drm/mgag200: Set cursor scanout address to correct BO

Thomas Zimmermann tzimmermann at suse.de
Tue Jul 23 07:54:24 UTC 2019


The hardware requires the correct memory address of the buffer. Currently
the same BO's address is programmed unconditionally, so only every second
cursor update actually becomes visible.

Signed-off-by: Thomas Zimmermann <tzimmermann at suse.de>
Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
Cc: Gerd Hoffmann <kraxel at redhat.com>
Cc: Dave Airlie <airlied at 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 a19975931c6d..f11b862cbed9 100644
--- a/drivers/gpu/drm/mgag200/mgag200_cursor.c
+++ b/drivers/gpu/drm/mgag200/mgag200_cursor.c
@@ -112,7 +112,7 @@ int mga_crtc_cursor_set(struct drm_crtc *crtc,
 			"failed to kmap cursor updates: %d\n", ret);
 		goto err_drm_gem_vram_unpin_dst;
 	}
-	gpu_addr = drm_gem_vram_offset(pixels_2);
+	gpu_addr = drm_gem_vram_offset(pixels_next);
 	if (gpu_addr < 0) {
 		ret = (int)gpu_addr;
 		dev_err(&dev->pdev->dev,
-- 
2.22.0



More information about the dri-devel mailing list