aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaarten Lankhorst <[email protected]>2017-07-11 16:33:10 +0200
committerDaniel Vetter <[email protected]>2017-07-26 13:22:42 +0200
commit424624ea683459facc954684fa416f524eb20e9a (patch)
treebc8982bda712f4ee0d624903048d3db07d10f6a3
parent771f14c5ccfb2b106e04110a2b250c46bb6b06df (diff)
drm/tegra: Handle drm_atomic_helper_swap_state failure
drm_atomic_helper_swap_state() will be changed to interruptible waiting in the next few commits, so all drivers have to be changed to handling failure. Signed-off-by: Maarten Lankhorst <[email protected]> Cc: Thierry Reding <[email protected]> Cc: Jonathan Hunter <[email protected]> Cc: [email protected] Link: http://patchwork.freedesktop.org/patch/msgid/[email protected] Reviewed-by: Daniel Vetter <[email protected]> Reviewed-by: Sean Paul <[email protected]> Signed-off-by: Daniel Vetter <[email protected]>
-rw-r--r--drivers/gpu/drm/tegra/drm.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c
index ad3d124a972d..3ba659a5940d 100644
--- a/drivers/gpu/drm/tegra/drm.c
+++ b/drivers/gpu/drm/tegra/drm.c
@@ -100,7 +100,12 @@ static int tegra_atomic_commit(struct drm_device *drm,
* the software side now.
*/
- drm_atomic_helper_swap_state(state, true);
+ err = drm_atomic_helper_swap_state(state, true);
+ if (err) {
+ mutex_unlock(&tegra->commit.lock);
+ drm_atomic_helper_cleanup_planes(drm, state);
+ return err;
+ }
drm_atomic_state_get(state);
if (nonblock)