From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH v2 2/6] drm/atomic: Convert atomic ioctl locking to interruptible.
Date: Tue, 12 Sep 2017 15:37:45 +0200 [thread overview]
Message-ID: <20170912133749.6532-3-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20170912133749.6532-1-maarten.lankhorst@linux.intel.com>
Pass DRM_MODESET_ACQUIRE_INTERRUPTIBLE to acquire_init, and
handle drm_modeset_backoff which can now fail by returning the error.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
drivers/gpu/drm/drm_atomic.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index 75f5f74de9bf..366c56fe5f58 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -2234,7 +2234,7 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
(arg->flags & DRM_MODE_PAGE_FLIP_EVENT))
return -EINVAL;
- drm_modeset_acquire_init(&ctx, 0);
+ drm_modeset_acquire_init(&ctx, DRM_MODESET_ACQUIRE_INTERRUPTIBLE);
state = drm_atomic_state_alloc(dev);
if (!state)
@@ -2347,8 +2347,9 @@ int drm_mode_atomic_ioctl(struct drm_device *dev,
if (ret == -EDEADLK) {
drm_atomic_state_clear(state);
- drm_modeset_backoff(&ctx);
- goto retry;
+ ret = drm_modeset_backoff(&ctx);
+ if (!ret)
+ goto retry;
}
drm_atomic_state_put(state);
--
2.14.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-09-12 13:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-12 13:37 [PATCH v2 0/6] drm/atomic: Interruptible locks for everyone! Maarten Lankhorst
2017-09-12 13:37 ` [PATCH v2 1/6] drm/atomic: Prepare drm_modeset_lock infrastructure for interruptible waiting, v2 Maarten Lankhorst
2017-09-12 13:56 ` Emil Velikov
2017-09-13 7:56 ` Maarten Lankhorst
2017-09-12 13:37 ` Maarten Lankhorst [this message]
2017-09-12 13:37 ` [PATCH v2 3/6] drm/legacy: Convert cursor ioctl locking to interruptible Maarten Lankhorst
2017-09-12 13:37 ` [PATCH v2 4/6] drm/legacy: Convert setplane " Maarten Lankhorst
2017-09-12 13:37 ` [PATCH v2 5/6] drm/atomic: Convert pageflip " Maarten Lankhorst
2017-09-12 13:37 ` [PATCH v2 6/6] drm/crtc: Convert setcrtc " Maarten Lankhorst
2017-09-12 14:43 ` ✓ Fi.CI.BAT: success for drm/atomic: Interruptible locks for everyone! (rev3) Patchwork
2017-09-12 17:45 ` ✓ Fi.CI.IGT: " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2017-09-12 12:41 [PATCH v2 0/6] drm/atomic: Interruptible locks for everyone! Maarten Lankhorst
2017-09-12 12:41 ` [PATCH v2 2/6] drm/atomic: Convert atomic ioctl locking to interruptible Maarten Lankhorst
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=20170912133749.6532-3-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.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