[PATCH] drm: Don't allow legacy cursor updates to stall others or be stalled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxx>
---
 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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux