From: Maarten Lankhorst Date: Tue, 11 Jul 2017 14:33:11 +0000 (+0200) Subject: drm/tilcdc: Handle drm_atomic_helper_swap_state failure X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fad9e43a331c46d5e011c415117ee7b949454a86;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/tilcdc: 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 Cc: Jyri Sarha Cc: Tomi Valkeinen Link: http://patchwork.freedesktop.org/patch/msgid/20170711143314.2148-10-maarten.lankhorst@linux.intel.com Reviewed-by: Sean Paul Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index d67e18983a7d..049d2f5a1ee4 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -108,7 +108,11 @@ static int tilcdc_commit(struct drm_device *dev, if (ret) return ret; - drm_atomic_helper_swap_state(state, true); + ret = drm_atomic_helper_swap_state(state, true); + if (ret) { + drm_atomic_helper_cleanup_planes(dev, state); + return ret; + } /* * Everything below can be run asynchronously without the need to grab