summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_atomic_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-11-19 17:38:07 (GMT)
committerDave Airlie <airlied@redhat.com>2014-11-20 01:35:19 (GMT)
commit6f75cea66c8dd043ced282016b21a639af176642 (patch)
tree97174a86fc4aab950c0318e481a42ccd5ebfe91a /drivers/gpu/drm/drm_atomic_helper.c
parentc7eb76f4931b505e57c6510133df19f4ec1ce3e5 (diff)
downloadlinux-6f75cea66c8dd043ced282016b21a639af176642.tar.xz
drm/atomic: Only destroy connector states with connection mutex held
Otherwise the connector might have been unplugged and destroyed while we didn't look. Yet another fallout from DP MST hotplugging that I didn't consider. To make sure we get this right add an appropriate WARN_ON to drm_atomic_state_clear (obviously only when we actually have a state to clear up). And reorder all the state_clear and backoff calls to make it work out properly. Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index fad2b93..0cd0546 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1217,8 +1217,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
/*
* Someone might have exchanged the framebuffer while we dropped locks
@@ -1285,8 +1285,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
/*
* Someone might have exchanged the framebuffer while we dropped locks
@@ -1462,8 +1462,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
/*
* Someone might have exchanged the framebuffer while we dropped locks
@@ -1528,8 +1528,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
goto retry;
}
@@ -1587,8 +1587,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
goto retry;
}
@@ -1646,8 +1646,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
goto retry;
}
@@ -1725,8 +1725,8 @@ fail:
return ret;
backoff:
- drm_atomic_legacy_backoff(state);
drm_atomic_state_clear(state);
+ drm_atomic_legacy_backoff(state);
/*
* Someone might have exchanged the framebuffer while we dropped locks