* [PATCH] drm: Clean up planes in atomic commit helper failure path
@ 2017-01-02 23:14 Laurent Pinchart
2017-01-04 9:04 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Laurent Pinchart @ 2017-01-02 23:14 UTC (permalink / raw)
To: dri-devel; +Cc: Daniel Vetter, Gustavo Padovan
If waiting for fences fails for blocking commits, planes must be cleaned
up before returning.
Cc: stable@vger.kernel.org
Fixes: f6ce410a59a4 ("drm/fence: allow fence waiting to be interrupted by userspace")
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index 2099868ee9f7..2bde19a64dd6 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1259,8 +1259,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
if (!nonblock) {
ret = drm_atomic_helper_wait_for_fences(dev, state, true);
- if (ret)
+ if (ret) {
+ drm_atomic_helper_cleanup_planes(dev, state);
return ret;
+ }
}
/*
--
Regards,
Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm: Clean up planes in atomic commit helper failure path
2017-01-02 23:14 [PATCH] drm: Clean up planes in atomic commit helper failure path Laurent Pinchart
@ 2017-01-04 9:04 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2017-01-04 9:04 UTC (permalink / raw)
To: Laurent Pinchart; +Cc: Daniel Vetter, Gustavo Padovan, dri-devel
On Tue, Jan 03, 2017 at 01:14:27AM +0200, Laurent Pinchart wrote:
> If waiting for fences fails for blocking commits, planes must be cleaned
> up before returning.
>
> Cc: stable@vger.kernel.org
> Fixes: f6ce410a59a4 ("drm/fence: allow fence waiting to be interrupted by userspace")
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Nice catch. Applied to drm-misc-fixes, will send a pull to Dave soonish.
-Daniel
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 2099868ee9f7..2bde19a64dd6 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -1259,8 +1259,10 @@ int drm_atomic_helper_commit(struct drm_device *dev,
>
> if (!nonblock) {
> ret = drm_atomic_helper_wait_for_fences(dev, state, true);
> - if (ret)
> + if (ret) {
> + drm_atomic_helper_cleanup_planes(dev, state);
> return ret;
> + }
> }
>
> /*
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-04 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-02 23:14 [PATCH] drm: Clean up planes in atomic commit helper failure path Laurent Pinchart
2017-01-04 9:04 ` Daniel Vetter
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).