* [PATCH v2 06/12] drm/mediatek: Handle drm_atomic_helper_swap_state failure [not found] <20170711143314.2148-1-maarten.lankhorst@linux.intel.com> @ 2017-07-11 14:33 ` Maarten Lankhorst 2017-07-12 10:00 ` Philipp Zabel 0 siblings, 1 reply; 2+ messages in thread From: Maarten Lankhorst @ 2017-07-11 14:33 UTC (permalink / raw) To: linux-arm-kernel 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 <maarten.lankhorst@linux.intel.com> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: linux-arm-kernel at lists.infradead.org Cc: linux-mediatek at lists.infradead.org --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 56f802d0a51c..9a130c84c861 100644 --- 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) -- 2.11.0 ^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2 06/12] drm/mediatek: Handle drm_atomic_helper_swap_state failure 2017-07-11 14:33 ` [PATCH v2 06/12] drm/mediatek: Handle drm_atomic_helper_swap_state failure Maarten Lankhorst @ 2017-07-12 10:00 ` Philipp Zabel 0 siblings, 0 replies; 2+ messages in thread From: Philipp Zabel @ 2017-07-12 10:00 UTC (permalink / raw) To: linux-arm-kernel On Tue, 2017-07-11 at 16:33 +0200, Maarten Lankhorst wrote: > 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 <maarten.lankhorst@linux.intel.com> > Cc: CK Hu <ck.hu@mediatek.com> > Cc: Philipp Zabel <p.zabel@pengutronix.de> > Cc: linux-arm-kernel at lists.infradead.org > Cc: linux-mediatek at lists.infradead.org > --- > drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c > index 56f802d0a51c..9a130c84c861 100644 > --- 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) Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> regards Philipp ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-07-12 10:00 UTC | newest] Thread overview: 2+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20170711143314.2148-1-maarten.lankhorst@linux.intel.com> 2017-07-11 14:33 ` [PATCH v2 06/12] drm/mediatek: Handle drm_atomic_helper_swap_state failure Maarten Lankhorst 2017-07-12 10:00 ` Philipp Zabel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).