projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0806f4e
)
drm/mediatek: Handle drm_atomic_helper_swap_state failure
author
Maarten Lankhorst
<
[email protected]
>
Tue, 11 Jul 2017 14:33:08 +0000
(16:33 +0200)
committer
Daniel Vetter
<
[email protected]
>
Wed, 26 Jul 2017 11:22:42 +0000
(13:22 +0200)
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: CK Hu <
[email protected]
>
Cc: Philipp Zabel <
[email protected]
>
Cc:
[email protected]
Cc:
[email protected]
Link:
http://patchwork.freedesktop.org/patch/msgid/
[email protected]
Reviewed-by: Philipp Zabel <
[email protected]
>
Reviewed-by: Sean Paul <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
drivers/gpu/drm/mediatek/mtk_drm_drv.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/mediatek/mtk_drm_drv.c
b/drivers/gpu/drm/mediatek/mtk_drm_drv.c
index be0741638f948493a25a3be623941b3455a0622c..b2596f35104b9c7edc2df395165c6bea8084e50f 100644
(file)
--- a/
drivers/gpu/drm/mediatek/mtk_drm_drv.c
+++ b/
drivers/gpu/drm/mediatek/mtk_drm_drv.c
@@
-109,7
+109,12
@@
static int mtk_atomic_commit(struct drm_device *drm,
mutex_lock(&private->commit.lock);
flush_work(&private->commit.work);
- drm_atomic_helper_swap_state(state, true);
+ ret = drm_atomic_helper_swap_state(state, true);
+ if (ret) {
+ mutex_unlock(&private->commit.lock);
+ drm_atomic_helper_cleanup_planes(drm, state);
+ return ret;
+ }
drm_atomic_state_get(state);
if (async)