Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Kubecek <mkubecek@suse.cz>2019-10-02 07:33:57 +0200
committerMichal Kubecek <mkubecek@suse.cz>2019-10-02 07:33:57 +0200
commit035ce9b6a8a7d73a71cbd228c0e3911fc461c704 (patch)
tree7e0889fde201a7e6393f937b78f4519e11181a6f
parent636b69679bde21a8881741c426655483b1d85391 (diff)
parent6389bb6fdfab89f406b719d1c65e6a09a646ef31 (diff)
Merge branch 'users/tzimmermann/SLE15-SP2/for-next' into SLE15-SP2
Pull DRM fixes from Thomas Zimmermann.
-rw-r--r--patches.suse/0001-drm-mgag200-add-in-missing-around-if-block.patch41
-rw-r--r--patches.suse/0002-drm-mgag200-Pin-displayed-cursor-BO-to-video-memory.patch39
-rw-r--r--patches.suse/0003-drm-mgag200-Set-cursor-scanout-address-to-correct-BO.patch39
-rw-r--r--patches.suse/0004-drm-mgag200-Don-t-unpin-the-current-cursor-image-s-b.patch39
-rw-r--r--series.conf4
5 files changed, 162 insertions, 0 deletions
diff --git a/patches.suse/0001-drm-mgag200-add-in-missing-around-if-block.patch b/patches.suse/0001-drm-mgag200-add-in-missing-around-if-block.patch
new file mode 100644
index 0000000000..0016e7931f
--- /dev/null
+++ b/patches.suse/0001-drm-mgag200-add-in-missing-around-if-block.patch
@@ -0,0 +1,41 @@
+From e61576c4b9ff59aea2719e3681c4a8809998555e Mon Sep 17 00:00:00 2001
+From: Colin Ian King <colin.king@canonical.com>
+Date: Fri, 14 Jun 2019 15:39:11 +0100
+Subject: drm/mgag200: add in missing { } around if block
+Git-commit: e61576c4b9ff59aea2719e3681c4a8809998555e
+Patch-mainline: v5.4-rc1
+References: bsc#1152472
+
+There is an if block that is missing the { } curly brackets. Add
+these in.
+
+Addresses-Coverity: ("Structurally dead code")
+Fixes: 94dc57b10399 ("drm/mgag200: Rewrite cursor handling")
+Signed-off-by: Colin Ian King <colin.king@canonical.com>
+Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
+Link: https://patchwork.freedesktop.org/patch/msgid/20190614143911.21806-1-colin.king@canonical.com
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/gpu/drm/mgag200/mgag200_cursor.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/mgag200/mgag200_cursor.c b/drivers/gpu/drm/mgag200/mgag200_cursor.c
+index f0c61a92351c..117eaedec7aa 100644
+--- a/drivers/gpu/drm/mgag200/mgag200_cursor.c
++++ b/drivers/gpu/drm/mgag200/mgag200_cursor.c
+@@ -99,10 +99,11 @@ 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);
+- if (ret)
++ if (ret) {
+ dev_err(&dev->pdev->dev,
+ "failed to pin cursor buffer: %d\n", ret);
+ goto err_drm_gem_vram_kunmap_src;
++ }
+ dst = drm_gem_vram_kmap(pixels_next, true, NULL);
+ if (IS_ERR(dst)) {
+ ret = PTR_ERR(dst);
+--
+2.23.0
+
diff --git a/patches.suse/0002-drm-mgag200-Pin-displayed-cursor-BO-to-video-memory.patch b/patches.suse/0002-drm-mgag200-Pin-displayed-cursor-BO-to-video-memory.patch
new file mode 100644
index 0000000000..8bb57c48cb
--- /dev/null
+++ b/patches.suse/0002-drm-mgag200-Pin-displayed-cursor-BO-to-video-memory.patch
@@ -0,0 +1,39 @@
+From a0fd72d2c95b56c78feec0867f2077b5ff5991e6 Mon Sep 17 00:00:00 2001
+From: Thomas Zimmermann <tzimmermann@suse.de>
+Date: Tue, 23 Jul 2019 09:54:23 +0200
+Subject: drm/mgag200: Pin displayed cursor BO to video memory
+Git-commit: a0fd72d2c95b56c78feec0867f2077b5ff5991e6
+Patch-mainline: v5.4-rc1
+References: bsc#1152472
+
+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
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ 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.23.0
+
diff --git a/patches.suse/0003-drm-mgag200-Set-cursor-scanout-address-to-correct-BO.patch b/patches.suse/0003-drm-mgag200-Set-cursor-scanout-address-to-correct-BO.patch
new file mode 100644
index 0000000000..14cb817193
--- /dev/null
+++ b/patches.suse/0003-drm-mgag200-Set-cursor-scanout-address-to-correct-BO.patch
@@ -0,0 +1,39 @@
+From cf578c8c8e0b1fcd7c7de649effaf2c7625433c5 Mon Sep 17 00:00:00 2001
+From: Thomas Zimmermann <tzimmermann@suse.de>
+Date: Tue, 23 Jul 2019 09:54:24 +0200
+Subject: drm/mgag200: Set cursor scanout address to correct BO
+Git-commit: cf578c8c8e0b1fcd7c7de649effaf2c7625433c5
+Patch-mainline: v5.4-rc1
+References: bsc#1152472
+
+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@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-3-tzimmermann@suse.de
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ 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.23.0
+
diff --git a/patches.suse/0004-drm-mgag200-Don-t-unpin-the-current-cursor-image-s-b.patch b/patches.suse/0004-drm-mgag200-Don-t-unpin-the-current-cursor-image-s-b.patch
new file mode 100644
index 0000000000..1140a2ad5d
--- /dev/null
+++ b/patches.suse/0004-drm-mgag200-Don-t-unpin-the-current-cursor-image-s-b.patch
@@ -0,0 +1,39 @@
+From a9c342ab77ab6e8ab662105335ae1e44e01271d4 Mon Sep 17 00:00:00 2001
+From: Thomas Zimmermann <tzimmermann@suse.de>
+Date: Tue, 23 Jul 2019 09:54:25 +0200
+Subject: drm/mgag200: Don't unpin the current cursor image's buffer.
+Git-commit: a9c342ab77ab6e8ab662105335ae1e44e01271d4
+Patch-mainline: v5.4-rc1
+References: bsc#1152472
+
+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>
+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-4-tzimmermann@suse.de
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ 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.23.0
+
diff --git a/series.conf b/series.conf
index 872b1ba822..0bf708ca35 100644
--- a/series.conf
+++ b/series.conf
@@ -97,8 +97,12 @@
patches.suse/0001-ipmi-move-message-error-checking-to-avoid-deadlock.patch
patches.suse/0001-drm-lima-Mark-64-bit-number-as-ULL.patch
patches.suse/0002-drm-lima-Reduce-the-amount-of-logs-on-deferred-probe.patch
+ patches.suse/0001-drm-mgag200-add-in-missing-around-if-block.patch
patches.suse/0004-drm-panel-make-drm_panel.h-self-contained.patch
patches.suse/0001-video-ssd1307fb-Start-page-range-at-page_offset.patch
+ patches.suse/0002-drm-mgag200-Pin-displayed-cursor-BO-to-video-memory.patch
+ patches.suse/0003-drm-mgag200-Set-cursor-scanout-address-to-correct-BO.patch
+ patches.suse/0004-drm-mgag200-Don-t-unpin-the-current-cursor-image-s-b.patch
patches.suse/0005-drm-bridge-sii902x-fix-missing-reference-to-mclk-clo.patch
patches.suse/0001-drm-syncobj-fix-leaking-dma_fence-in-drm_syncobj_que.patch
patches.suse/0002-drm-mali-dp-Mark-expected-switch-fall-through.patch