From: Boris Brezillon <boris.brezillon@bootlin.com>
To: Eric Anholt <eric@anholt.net>
Cc: dri-devel@lists.freedesktop.org,
Boris Brezillon <boris.brezillon@bootlin.com>,
stable@vger.kernel.org
Subject: [PATCH 2/2] drm/vc4: Set ->legacy_cursor_update to false when doing non-async updates
Date: Tue, 13 Nov 2018 10:49:14 +0100 [thread overview]
Message-ID: <20181113094914.22353-2-boris.brezillon@bootlin.com> (raw)
In-Reply-To: <20181113094914.22353-1-boris.brezillon@bootlin.com>
drm_atomic_helper_setup_commit() auto-completes commit->flip_done when
state->legacy_cursor_update is true, but we now for sure that we want
a sync update when we call drm_atomic_helper_setup_commit() from
vc4_atomic_commit().
Explicitly set state->legacy_cursor_update to false to prevent this
auto-completion.
Fixes: 184d3cf4f738 ("drm/vc4: Use wait_for_flip_done() instead of wait_for_vblanks()")
Cc: <stable@vger.kernel.org>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
---
drivers/gpu/drm/vc4/vc4_kms.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c
index 127468785f74..1f94b9affe4b 100644
--- a/drivers/gpu/drm/vc4/vc4_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_kms.c
@@ -214,6 +214,12 @@ static int vc4_atomic_commit(struct drm_device *dev,
return 0;
}
+ /* We know for sure we don't want an async update here. Set
+ * state->legacy_cursor_update to false to prevent
+ * drm_atomic_helper_setup_commit() from auto-completing
+ * commit->flip_done.
+ */
+ state->legacy_cursor_update = false;
ret = drm_atomic_helper_setup_commit(state, nonblock);
if (ret)
return ret;
--
2.17.1
next prev parent reply other threads:[~2018-11-13 9:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 9:49 [PATCH 1/2] drm/vc4: Fix NULL pointer dereference in the async update path Boris Brezillon
2018-11-13 9:49 ` Boris Brezillon [this message]
2018-11-13 21:18 ` [PATCH 2/2] drm/vc4: Set ->legacy_cursor_update to false when doing non-async updates Eric Anholt
2018-11-13 21:24 ` [PATCH 1/2] drm/vc4: Fix NULL pointer dereference in the async update path Eric Anholt
2018-11-13 22:18 ` Boris Brezillon
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=20181113094914.22353-2-boris.brezillon@bootlin.com \
--to=boris.brezillon@bootlin.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eric@anholt.net \
--cc=stable@vger.kernel.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