summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_atomic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_atomic.c')
-rw-r--r--drivers/gpu/drm/drm_atomic.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
index c204ef32df16..9bb99e274d23 100644
--- a/drivers/gpu/drm/drm_atomic.c
+++ b/drivers/gpu/drm/drm_atomic.c
@@ -1296,14 +1296,39 @@ EXPORT_SYMBOL(drm_atomic_add_affected_planes);
*/
void drm_atomic_legacy_backoff(struct drm_atomic_state *state)
{
+ struct drm_device *dev = state->dev;
+ unsigned crtc_mask = 0;
+ struct drm_crtc *crtc;
int ret;
+ bool global = false;
+
+ drm_for_each_crtc(crtc, dev) {
+ if (crtc->acquire_ctx != state->acquire_ctx)
+ continue;
+
+ crtc_mask |= drm_crtc_mask(crtc);
+ crtc->acquire_ctx = NULL;
+ }
+
+ if (WARN_ON(dev->mode_config.acquire_ctx == state->acquire_ctx)) {
+ global = true;
+
+ dev->mode_config.acquire_ctx = NULL;
+ }
retry:
drm_modeset_backoff(state->acquire_ctx);
- ret = drm_modeset_lock_all_ctx(state->dev, state->acquire_ctx);
+ ret = drm_modeset_lock_all_ctx(dev, state->acquire_ctx);
if (ret)
goto retry;
+
+ drm_for_each_crtc(crtc, dev)
+ if (drm_crtc_mask(crtc) & crtc_mask)
+ crtc->acquire_ctx = state->acquire_ctx;
+
+ if (global)
+ dev->mode_config.acquire_ctx = state->acquire_ctx;
}
EXPORT_SYMBOL(drm_atomic_legacy_backoff);
ideo: Handle control pipe protocol STALLsGuennadi Liakhovetski2018-07-271-6/+46 * media: uvcvideo: Also validate buffers in BULK modeNicolas Dufresne2018-07-271-6/+4Star * treewide: kmalloc() -> kmalloc_array()Kees Cook2018-06-131-2/+2 * media: uvcvideo: Support realtek's UVC 1.5 deviceming_qian2018-05-281-6/+18 * media: uvcvideo: Fixed ktime_t to ns conversionJasmin Jessich2018-02-231-2/+3 * media: uvcvideo: Use parentheses around sizeof operandLaurent Pinchart2018-02-231-1/+1 * media: uvcvideo: Use internal kernel integer typesLaurent Pinchart2018-02-231-20/+20 * media: uvcvideo: Add a metadata device nodeGuennadi Liakhovetski2018-01-041-10/+124 * media: uvcvideo: Use ktime_t for timestampsArnd Bergmann2018-01-041-25/+12Star * media: uvcvideo: Use ktime_t for statsArnd Bergmann2018-01-041-7/+4Star * media: uvcvideo: Mark buffer error where overflowBaoyou Xie2017-12-081-0/+1 * media: uvcvideo: Remove duplicate & operationJaejoong Kim2017-12-081-2/+2 * [media] uvcvideo: annotate a switch fall throughMauro Carvalho Chehab2017-05-191-1/+1 * [media] media drivers: annotate fall-throughMauro Carvalho Chehab2017-05-191-1/+1 * [media] uvcvideo: Don't record timespec_subKieran Bingham2017-04-101-8/+2Star * [media] uvcvideo: Fix empty packet statisticKieran Bingham2017-04-101-1/+1 * [media] uvcvideo: (cosmetic) Remove a superfluous assignmentGuennadi Liakhovetski2017-01-311-2/+1Star * media: usb: uvc: remove unnecessary & operationFelipe Balbi2016-11-031-1/+1 * media: usb: uvc: make use of new usb_endpoint_maxp_mult()Felipe Balbi2016-11-011-1/+3 * [media] uvcvideo: Correct speed testingOliver Neukum2016-06-071-0/+1 * [media] uvcvideo: small cleanup in uvc_video_clock_update()Dan Carpenter2015-12-181-1/+1 * [media] media: videobuf2: Move timestamp to vb2_bufferJunghak Sung2015-12-181-10/+5Star * [media] media: videobuf2: Restructure vb2_bufferJunghak Sung2015-10-011-10/+10 * [media] uvcvideo: Disable hardware timestamps by defaultLaurent Pinchart2015-09-251-0/+3 * [media] uvcvideo: Fix incorrect bandwidth with Chicony device 04f2:b50bLaurent Pinchart2015-05-301-0/+8 * [media] uvcvideo: Remove extra commit on resume()Aviv Greenberg2015-01-271-3/+3 * [media] uvcvideo: Separate video and queue enable/disable operationsLaurent Pinchart2014-11-251-20/+2Star * [media] uvcvideo: Set buffer field to V4L2_FIELD_NONELaurent Pinchart2014-11-251-0/+1 * [media] v4l: uvcvideo: Fix buffer completion size checkLaurent Pinchart2014-10-211-1/+1 * [media] v4l2: uvcvideo: Allow using larger buffersGuennadi Liakhovetski2014-09-221-1/+1 * [media] uvcvideo: Work around buggy Logitech C920 firmwareWilliam Manley2014-09-221-0/+6 * [media] uvc: fix sparse warningHans Verkuil2014-09-03