Home Home > GIT Browse > packaging
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2018-08-05 07:08:08 +0200
committerKernel Build Daemon <kbuild@suse.de>2018-08-05 07:08:08 +0200
commitf869490588e1f3d160bba75d5181b4662d7ad39b (patch)
treebfe50c7c6fc923aa85681a263fa104e9352be299
parent7160ebe8c96fceba51e6d7de997ddb42bb4c85f1 (diff)
parentc3cb984dfaedcf3d310ff6508884e125bde4cb67 (diff)
Merge branch 'SLE15' into openSUSE-15.0
-rw-r--r--patches.drivers/drm-atomic-Check-for-busy-planes-connectors-before-s15
-rw-r--r--patches.drivers/drm-atomic-Check-old_plane_state-crtc-in-drm_atomic_44
-rw-r--r--patches.drivers/drm-atomic-Initialize-variables-in-drm_atomic_helper48
-rw-r--r--patches.drivers/drm-atomic-Make-async-plane-update-checks-work-as-in206
-rw-r--r--patches.drivers/drm-re-enable-error-handling40
-rw-r--r--patches.drivers/drm-vc4-Reset-x-y-_scaling-1-when-dealing-with-unipl40
-rw-r--r--series.conf5
7 files changed, 391 insertions, 7 deletions
diff --git a/patches.drivers/drm-atomic-Check-for-busy-planes-connectors-before-s b/patches.drivers/drm-atomic-Check-for-busy-planes-connectors-before-s
index c253a749da..6ddaf533bc 100644
--- a/patches.drivers/drm-atomic-Check-for-busy-planes-connectors-before-s
+++ b/patches.drivers/drm-atomic-Check-for-busy-planes-connectors-before-s
@@ -23,12 +23,12 @@ Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Acked-by: Takashi Iwai <tiwai@suse.de>
---
- drivers/gpu/drm/drm_atomic_helper.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
+ drivers/gpu/drm/drm_atomic_helper.c | 19 +++++++++----------
+ 1 file changed, 9 insertions(+), 10 deletions(-)
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
-@@ -1795,16 +1795,16 @@ int drm_atomic_helper_setup_commit(struc
+@@ -1771,16 +1771,16 @@ int drm_atomic_helper_setup_commit(struc
}
for_each_oldnew_connector_in_state(state, conn, old_conn_state, new_conn_state, i) {
@@ -49,13 +49,14 @@ Acked-by: Takashi Iwai <tiwai@suse.de>
commit = crtc_or_fake_commit(state, old_conn_state->crtc);
if (!commit)
return -ENOMEM;
-@@ -1813,17 +1813,17 @@ int drm_atomic_helper_setup_commit(struc
+@@ -1789,18 +1789,17 @@ int drm_atomic_helper_setup_commit(struc
}
for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
-- /* commit tracked through new_crtc_state->commit, no need to do it explicitly */
-- if (new_plane_state->crtc)
-- continue;
+- /*
+- * Unlike connectors, always track planes explicitly for
+- * async pageflip support.
+- */
-
/* Userspace is not allowed to get ahead of the previous
* commit with nonblocking ones. */
diff --git a/patches.drivers/drm-atomic-Check-old_plane_state-crtc-in-drm_atomic_ b/patches.drivers/drm-atomic-Check-old_plane_state-crtc-in-drm_atomic_
new file mode 100644
index 0000000000..abed359f6f
--- /dev/null
+++ b/patches.drivers/drm-atomic-Check-old_plane_state-crtc-in-drm_atomic_
@@ -0,0 +1,44 @@
+From 603ba2dfb338b307aebe95fe344c479a59b3a175 Mon Sep 17 00:00:00 2001
+From: Boris Brezillon <boris.brezillon@bootlin.com>
+Date: Tue, 24 Jul 2018 15:32:15 +0200
+Subject: [PATCH] drm/atomic: Check old_plane_state->crtc in drm_atomic_helper_async_check()
+Git-commit: 603ba2dfb338b307aebe95fe344c479a59b3a175
+Patch-mainline: v4.18-rc8
+References: bsc#1051510
+
+Async plane update is supposed to work only when updating the FB or FB
+position of an already enabled plane. That does not apply to requests
+where the plane was previously disabled or assigned to a different
+CTRC.
+
+Check old_plane_state->crtc value to make sure async plane update is
+allowed.
+
+Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+Link: https://patchwork.freedesktop.org/patch/msgid/20180724133215.31917-1-boris.brezillon@bootlin.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/drm_atomic_helper.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
+index 130da5195f3b..ff858b890045 100644
+--- a/drivers/gpu/drm/drm_atomic_helper.c
++++ b/drivers/gpu/drm/drm_atomic_helper.c
+@@ -1527,7 +1527,8 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
+ if (n_planes != 1)
+ return -EINVAL;
+
+- if (!new_plane_state->crtc)
++ if (!new_plane_state->crtc ||
++ old_plane_state->crtc != new_plane_state->crtc)
+ return -EINVAL;
+
+ funcs = plane->helper_private;
+--
+2.18.0
+
diff --git a/patches.drivers/drm-atomic-Initialize-variables-in-drm_atomic_helper b/patches.drivers/drm-atomic-Initialize-variables-in-drm_atomic_helper
new file mode 100644
index 0000000000..2c2939f664
--- /dev/null
+++ b/patches.drivers/drm-atomic-Initialize-variables-in-drm_atomic_helper
@@ -0,0 +1,48 @@
+From de2d8db395c32d121d02871819444b631f73e0b6 Mon Sep 17 00:00:00 2001
+From: Boris Brezillon <boris.brezillon@bootlin.com>
+Date: Tue, 24 Jul 2018 15:33:00 +0200
+Subject: [PATCH] drm/atomic: Initialize variables in drm_atomic_helper_async_check() to make gcc happy
+Git-commit: de2d8db395c32d121d02871819444b631f73e0b6
+Patch-mainline: v4.18-rc8
+References: bsc#1051510
+
+drm_atomic_helper_async_check() declares the plane, old_plane_state and
+new_plane_state variables to iterate over all planes of the atomic
+state and make sure only one plane is enabled.
+
+Unfortunately gcc is not smart enough to figure out that the check on
+n_planes is enough to guarantee that plane, new_plane_state and
+old_plane_state are initialized.
+
+Explicitly initialize those variables to NULL to make gcc happy.
+
+Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+Reviewed-by: Sean Paul <seanpaul@chromium.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/20180724133300.32023-1-boris.brezillon@bootlin.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/drm_atomic_helper.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
+index ff858b890045..81e32199d3ef 100644
+--- a/drivers/gpu/drm/drm_atomic_helper.c
++++ b/drivers/gpu/drm/drm_atomic_helper.c
+@@ -1510,8 +1510,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
+ {
+ struct drm_crtc *crtc;
+ struct drm_crtc_state *crtc_state;
+- struct drm_plane *plane;
+- struct drm_plane_state *old_plane_state, *new_plane_state;
++ struct drm_plane *plane = NULL;
++ struct drm_plane_state *old_plane_state = NULL;
++ struct drm_plane_state *new_plane_state = NULL;
+ const struct drm_plane_helper_funcs *funcs;
+ int i, n_planes = 0;
+
+--
+2.18.0
+
diff --git a/patches.drivers/drm-atomic-Make-async-plane-update-checks-work-as-in b/patches.drivers/drm-atomic-Make-async-plane-update-checks-work-as-in
new file mode 100644
index 0000000000..c211b793b7
--- /dev/null
+++ b/patches.drivers/drm-atomic-Make-async-plane-update-checks-work-as-in
@@ -0,0 +1,206 @@
+From 669c9215afea4e3684ef13e54e6908e9ae34f0ae Mon Sep 17 00:00:00 2001
+From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Date: Mon, 4 Sep 2017 12:48:38 +0200
+Subject: [PATCH] drm/atomic: Make async plane update checks work as intended, v2.
+Git-commit: 669c9215afea4e3684ef13e54e6908e9ae34f0ae
+Patch-mainline: v4.15-rc1
+References: bsc#1051510
+
+By always keeping track of the last commit in plane_state, we know
+whether there is an active update on the plane or not. With that
+information we can reject the fast update, and force the slowpath
+to be used as was originally intended.
+
+We cannot use plane_state->crtc->state here, because this only mentions
+the most recent commit for the crtc, but not the planes that were part
+of it. We specifically care about what the last commit involving this
+plane is, which can only be tracked with a pointer in the plane state.
+
+Changes since v1:
+- Clean up the whole function here, instead of partially earlier.
+- Add mention in the commit message why we need commit in plane_state.
+- Swap plane->state in intel_legacy_cursor_update, instead of
+ reassigning all variables. With this commit We know that the cursor
+ is not part of any active commits so this hack can be removed.
+
+Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
+Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
+Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.com>
+Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
+Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-7-maarten.lankhorst@linux.intel.com
+[mlankhorst: Amend commit for merge conflicts with drm-intel]
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/drm_atomic_helper.c | 53 +++++++++--------------------------
+ drivers/gpu/drm/i915/intel_display.c | 23 +++++++++------
+ include/drm/drm_plane.h | 5 +--
+ 3 files changed, 32 insertions(+), 49 deletions(-)
+
+--- a/drivers/gpu/drm/drm_atomic_helper.c
++++ b/drivers/gpu/drm/drm_atomic_helper.c
+@@ -1387,35 +1387,31 @@ int drm_atomic_helper_async_check(struct
+ {
+ struct drm_crtc *crtc;
+ struct drm_crtc_state *crtc_state;
+- struct drm_crtc_commit *commit;
+- struct drm_plane *__plane, *plane = NULL;
+- struct drm_plane_state *__plane_state, *plane_state = NULL;
++ struct drm_plane *plane;
++ struct drm_plane_state *old_plane_state, *new_plane_state;
+ const struct drm_plane_helper_funcs *funcs;
+- int i, j, n_planes = 0;
++ int i, n_planes = 0;
+
+ for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
+ if (drm_atomic_crtc_needs_modeset(crtc_state))
+ return -EINVAL;
+ }
+
+- for_each_new_plane_in_state(state, __plane, __plane_state, i) {
++ for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i)
+ n_planes++;
+- plane = __plane;
+- plane_state = __plane_state;
+- }
+
+ /* FIXME: we support only single plane updates for now */
+- if (!plane || n_planes != 1)
++ if (n_planes != 1)
+ return -EINVAL;
+
+- if (!plane_state->crtc)
++ if (!new_plane_state->crtc)
+ return -EINVAL;
+
+ funcs = plane->helper_private;
+ if (!funcs->atomic_async_update)
+ return -EINVAL;
+
+- if (plane_state->fence)
++ if (new_plane_state->fence)
+ return -EINVAL;
+
+ /*
+@@ -1423,31 +1419,11 @@ int drm_atomic_helper_async_check(struct
+ * the plane. This prevents our async update's changes from getting
+ * overridden by a previous synchronous update's state.
+ */
+- for_each_new_crtc_in_state(state, crtc, crtc_state, i) {
+- if (plane->crtc != crtc)
+- continue;
+-
+- spin_lock(&crtc->commit_lock);
+- commit = list_first_entry_or_null(&crtc->commit_list,
+- struct drm_crtc_commit,
+- commit_entry);
+- if (!commit) {
+- spin_unlock(&crtc->commit_lock);
+- continue;
+- }
+- spin_unlock(&crtc->commit_lock);
+-
+- if (!crtc->state->state)
+- continue;
+-
+- for_each_plane_in_state(crtc->state->state, __plane,
+- __plane_state, j) {
+- if (__plane == plane)
+- return -EINVAL;
+- }
+- }
++ if (old_plane_state->commit &&
++ !try_wait_for_completion(&old_plane_state->commit->hw_done))
++ return -EBUSY;
+
+- return funcs->atomic_async_check(plane, plane_state);
++ return funcs->atomic_async_check(plane, new_plane_state);
+ }
+ EXPORT_SYMBOL(drm_atomic_helper_async_check);
+
+@@ -1813,9 +1789,10 @@ int drm_atomic_helper_setup_commit(struc
+ }
+
+ for_each_oldnew_plane_in_state(state, plane, old_plane_state, new_plane_state, i) {
+- /* commit tracked through new_crtc_state->commit, no need to do it explicitly */
+- if (new_plane_state->crtc)
+- continue;
++ /*
++ * Unlike connectors, always track planes explicitly for
++ * async pageflip support.
++ */
+
+ /* Userspace is not allowed to get ahead of the previous
+ * commit with nonblocking ones. */
+--- a/drivers/gpu/drm/i915/intel_display.c
++++ b/drivers/gpu/drm/i915/intel_display.c
+@@ -12995,6 +12995,14 @@ intel_legacy_cursor_update(struct drm_pl
+ goto slow;
+
+ old_plane_state = plane->state;
++ /*
++ * Don't do an async update if there is an outstanding commit modifying
++ * the plane. This prevents our async update's changes from getting
++ * overridden by a previous synchronous update's state.
++ */
++ if (old_plane_state->commit &&
++ !try_wait_for_completion(&old_plane_state->commit->hw_done))
++ goto slow;
+
+ /*
+ * If any parameters change that may affect watermarks,
+@@ -13054,19 +13062,12 @@ intel_legacy_cursor_update(struct drm_pl
+ }
+
+ old_fb = old_plane_state->fb;
+- old_vma = to_intel_plane_state(old_plane_state)->vma;
+
+ i915_gem_track_fb(intel_fb_obj(old_fb), intel_fb_obj(fb),
+ intel_plane->frontbuffer_bit);
+
+ /* Swap plane state */
+- new_plane_state->fence = old_plane_state->fence;
+- new_plane_state->commit = old_plane_state->commit;
+- *to_intel_plane_state(old_plane_state) = *to_intel_plane_state(new_plane_state);
+- new_plane_state->fence = NULL;
+- new_plane_state->commit = NULL;
+- new_plane_state->fb = old_fb;
+- to_intel_plane_state(new_plane_state)->vma = NULL;
++ plane->state = new_plane_state;
+
+ if (plane->state->visible) {
+ trace_intel_update_plane(plane, to_intel_crtc(crtc));
+@@ -13078,13 +13079,17 @@ intel_legacy_cursor_update(struct drm_pl
+ intel_plane->disable_plane(intel_plane, to_intel_crtc(crtc));
+ }
+
++ old_vma = fetch_and_zero(&to_intel_plane_state(old_plane_state)->vma);
+ if (old_vma)
+ intel_unpin_fb_vma(old_vma);
+
+ out_unlock:
+ mutex_unlock(&dev_priv->drm.struct_mutex);
+ out_free:
+- intel_plane_destroy_state(plane, new_plane_state);
++ if (ret)
++ intel_plane_destroy_state(plane, new_plane_state);
++ else
++ intel_plane_destroy_state(plane, old_plane_state);
+ return ret;
+
+ slow:
+--- a/include/drm/drm_plane.h
++++ b/include/drm/drm_plane.h
+@@ -124,9 +124,10 @@ struct drm_plane_state {
+ bool visible;
+
+ /**
+- * @commit: Tracks the pending commit to prevent use-after-free conditions.
++ * @commit: Tracks the pending commit to prevent use-after-free conditions,
++ * and for async plane updates.
+ *
+- * Is only set when @crtc is NULL.
++ * May be NULL.
+ */
+ struct drm_crtc_commit *commit;
+
diff --git a/patches.drivers/drm-re-enable-error-handling b/patches.drivers/drm-re-enable-error-handling
new file mode 100644
index 0000000000..5ba2b6f2cf
--- /dev/null
+++ b/patches.drivers/drm-re-enable-error-handling
@@ -0,0 +1,40 @@
+From d530b5f1ca0bb66958a2b714bebe40a1248b9c15 Mon Sep 17 00:00:00 2001
+From: Nicholas Mc Guire <hofrat@osadl.org>
+Date: Sat, 14 Jul 2018 14:32:12 +0200
+Subject: [PATCH] drm: re-enable error handling
+Git-commit: d530b5f1ca0bb66958a2b714bebe40a1248b9c15
+Patch-mainline: v4.18-rc8
+References: bsc#1051510
+
+drm_legacy_ctxbitmap_next() returns idr_alloc() which can return
+-ENOMEM, -EINVAL or -ENOSPC none of which are -1 . but the call sites
+of drm_legacy_ctxbitmap_next() seem to be assuming that the error case
+would be -1 (original return of drm_ctxbitmap_next() prior to 2.6.23
+was actually -1). Thus reenable error handling by checking for < 0.
+
+Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
+Fixes: 62968144e673 ("drm: convert drm context code to use Linux idr")
+Signed-off-by: Sean Paul <seanpaul@chromium.org>
+Link: https://patchwork.freedesktop.org/patch/msgid/1531571532-22733-1-git-send-email-hofrat@osadl.org
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/drm_context.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/gpu/drm/drm_context.c b/drivers/gpu/drm/drm_context.c
+index 3c4000facb36..f973d287696a 100644
+--- a/drivers/gpu/drm/drm_context.c
++++ b/drivers/gpu/drm/drm_context.c
+@@ -372,7 +372,7 @@ int drm_legacy_addctx(struct drm_device *dev, void *data,
+ ctx->handle = drm_legacy_ctxbitmap_next(dev);
+ }
+ DRM_DEBUG("%d\n", ctx->handle);
+- if (ctx->handle == -1) {
++ if (ctx->handle < 0) {
+ DRM_DEBUG("Not enough free contexts.\n");
+ /* Should this return -EBUSY instead? */
+ return -ENOMEM;
+--
+2.18.0
+
diff --git a/patches.drivers/drm-vc4-Reset-x-y-_scaling-1-when-dealing-with-unipl b/patches.drivers/drm-vc4-Reset-x-y-_scaling-1-when-dealing-with-unipl
new file mode 100644
index 0000000000..027fbedf9d
--- /dev/null
+++ b/patches.drivers/drm-vc4-Reset-x-y-_scaling-1-when-dealing-with-unipl
@@ -0,0 +1,40 @@
+From a6a00918d4ad8718c3ccde38c02cec17f116b2fd Mon Sep 17 00:00:00 2001
+From: Boris Brezillon <boris.brezillon@bootlin.com>
+Date: Tue, 24 Jul 2018 15:36:01 +0200
+Subject: [PATCH] drm/vc4: Reset ->{x, y}_scaling[1] when dealing with uniplanar formats
+Git-commit: a6a00918d4ad8718c3ccde38c02cec17f116b2fd
+Patch-mainline: v4.18-rc8
+References: bsc#1051510
+
+This is needed to ensure ->is_unity is correct when the plane was
+previously configured to output a multi-planar format with scaling
+enabled, and is then being reconfigured to output a uniplanar format.
+
+Fixes: fc04023fafec ("drm/vc4: Add support for YUV planes.")
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
+Reviewed-by: Eric Anholt <eric@anholt.net>
+Link: https://patchwork.freedesktop.org/patch/msgid/20180724133601.32114-1-boris.brezillon@bootlin.com
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/gpu/drm/vc4/vc4_plane.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
+index 1d34619eb3fe..a951ec75d01f 100644
+--- a/drivers/gpu/drm/vc4/vc4_plane.c
++++ b/drivers/gpu/drm/vc4/vc4_plane.c
+@@ -320,6 +320,9 @@ static int vc4_plane_setup_clipping_and_scaling(struct drm_plane_state *state)
+ vc4_state->x_scaling[0] = VC4_SCALING_TPZ;
+ if (vc4_state->y_scaling[0] == VC4_SCALING_NONE)
+ vc4_state->y_scaling[0] = VC4_SCALING_TPZ;
++ } else {
++ vc4_state->x_scaling[1] = VC4_SCALING_NONE;
++ vc4_state->y_scaling[1] = VC4_SCALING_NONE;
+ }
+
+ vc4_state->is_unity = (vc4_state->x_scaling[0] == VC4_SCALING_NONE &&
+--
+2.18.0
+
diff --git a/series.conf b/series.conf
index 22658bed01..01edd9c832 100644
--- a/series.conf
+++ b/series.conf
@@ -8920,6 +8920,7 @@
patches.drivers/drm-atomic-Return-commit-in-drm_crtc_commit_get-for-
patches.drivers/drm-atomic-Move-drm_crtc_commit-to-drm_crtc_state-v4
patches.drivers/drm-atomic-Fix-freeing-connector-plane-state-too-ear
+ patches.drivers/drm-atomic-Make-async-plane-update-checks-work-as-in
patches.drivers/drm-sun4i-tcon-Unconditionally-reset-the-TCON
patches.drivers/drm-Make-syncobj-import-export-functions-static
patches.drivers/drm-Drop-drm_get_link_status_name
@@ -15352,6 +15353,10 @@
patches.fixes/nvme-if_ready-checks-to-fail-io-to-deleting-controll.patch
patches.drivers/virtio_balloon-fix-another-race-between-migration-an
patches.suse/cpufreq-intel_pstate-Limit-the-scope-of-HWP-dynamic-.patch
+ patches.drivers/drm-re-enable-error-handling
+ patches.drivers/drm-atomic-Check-old_plane_state-crtc-in-drm_atomic_
+ patches.drivers/drm-atomic-Initialize-variables-in-drm_atomic_helper
+ patches.drivers/drm-vc4-Reset-x-y-_scaling-1-when-dealing-with-unipl
# jejb/scsi for-next
patches.drivers/scsi-ipr-Format-HCAM-overlay-ID-0x41.patch