public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm: Don't allow legacy cursor updates to stall others or be stalled
@ 2016-08-23 10:48 Chris Wilson
  2016-08-23 10:57 ` Chris Wilson
  2016-08-23 11:26 ` Chris Wilson
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2016-08-23 10:48 UTC (permalink / raw)
  To: dri-devel; +Cc: Daniel Vetter, intel-gfx

Legacy cursor updates are entirely asynchronous with respect to all
other users of the atomic pipeline. They neither wait for any
outstanding flips, nor do they cause subsequent flips to be delayed. The
only ordering we do require is given by making the legacy cursor update
nonblocking (so the sequence of userspace calls from a process is
ordered from the pov of the client).

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/drm_atomic_helper.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 9abe0a242f96..9441fb9d9637 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1422,9 +1422,11 @@ int drm_atomic_helper_setup_commit(struct drm_atomic_state *state,
 
 		state->crtcs[i].commit = commit;
 
-		ret = stall_checks(crtc, nonblock);
-		if (ret)
-			return ret;
+		if (!state->legacy_cursor_update) {
+			ret = stall_checks(crtc, nonblock);
+			if (ret)
+				return ret;
+		}
 
 		/* Drivers only send out events when at least either current or
 		 * new CRTC state is active. Complete right away if everything
@@ -1989,7 +1991,7 @@ void drm_atomic_helper_swap_state(struct drm_atomic_state *state,
 		swap(state->crtcs[i].state, crtc->state);
 		crtc->state->state = NULL;
 
-		if (state->crtcs[i].commit) {
+		if (state->crtcs[i].commit && !state->legacy_cursor_update) {
 			spin_lock(&crtc->commit_lock);
 			list_add(&state->crtcs[i].commit->commit_entry,
 				 &crtc->commit_list);
-- 
2.9.3

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-23 11:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 10:48 [PATCH] drm: Don't allow legacy cursor updates to stall others or be stalled Chris Wilson
2016-08-23 10:57 ` Chris Wilson
2016-08-23 11:26 ` Chris Wilson
2016-08-23 11:35   ` Daniel Vetter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox