From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Ben Skeggs <bskeggs@redhat.com>,
nouveau@lists.freedesktop.org,
"# v4 . 10+" <stable@vger.kernel.org>
Subject: [PATCH v2 01/12] drm/nouveau: Fix error handling in nv50_disp_atomic_commit
Date: Tue, 11 Jul 2017 16:33:03 +0200 [thread overview]
Message-ID: <20170711143314.2148-2-maarten.lankhorst@linux.intel.com> (raw)
In-Reply-To: <20170711143314.2148-1-maarten.lankhorst@linux.intel.com>
Make it more clear that post commit return ret is really return 0,
and add a missing drm_atomic_helper_cleanup_planes when
drm_atomic_helper_wait_for_fences fails.
Fixes: 839ca903f12e ("drm/nouveau/kms/nv50: transition to atomic interfaces internally")
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v4.10+
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
drivers/gpu/drm/nouveau/nv50_display.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c
index 42a85c14aea0..8fb55b96c40f 100644
--- a/drivers/gpu/drm/nouveau/nv50_display.c
+++ b/drivers/gpu/drm/nouveau/nv50_display.c
@@ -4119,7 +4119,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
if (!nonblock) {
ret = drm_atomic_helper_wait_for_fences(dev, state, true);
if (ret)
- goto done;
+ goto err_cleanup;
}
for_each_plane_in_state(state, plane, plane_state, i) {
@@ -4147,7 +4147,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
if (crtc->state->enable) {
if (!drm->have_disp_power_ref) {
drm->have_disp_power_ref = true;
- return ret;
+ return 0;
}
active = true;
break;
@@ -4158,7 +4158,10 @@ nv50_disp_atomic_commit(struct drm_device *dev,
pm_runtime_put_autosuspend(dev->dev);
drm->have_disp_power_ref = false;
}
+ goto done;
+err_cleanup:
+ drm_atomic_helper_cleanup_planes(dev, state);
done:
pm_runtime_put_autosuspend(dev->dev);
return ret;
--
2.11.0
next prev parent reply other threads:[~2017-07-11 14:33 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 14:33 [PATCH v2 00/12] drm/atomic: Make drm_atomic_helper_swap_state waiting interruptible Maarten Lankhorst
2017-07-11 14:33 ` Maarten Lankhorst [this message]
2017-07-14 14:28 ` [Intel-gfx] [PATCH v2 01/12] drm/nouveau: Fix error handling in nv50_disp_atomic_commit Daniel Vetter
2017-07-11 14:33 ` [PATCH v2 02/12] drm/atomic: Change drm_atomic_helper_swap_state to return an error Maarten Lankhorst
2017-07-14 14:30 ` [Intel-gfx] " Daniel Vetter
2017-07-14 14:55 ` Sean Paul
2017-07-11 14:33 ` [PATCH v2 04/12] drm/atmel-hlcdc: Handle drm_atomic_helper_swap_state failure Maarten Lankhorst
2017-07-11 14:33 ` [PATCH v2 05/12] drm/i915: " Maarten Lankhorst
2017-07-11 14:33 ` [PATCH v2 06/12] drm/mediatek: " Maarten Lankhorst
2017-07-12 10:00 ` Philipp Zabel
[not found] ` <20170711143314.2148-1-maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-11 14:33 ` [PATCH v2 03/12] drm/nouveau: " Maarten Lankhorst
2017-07-11 14:33 ` [PATCH v2 07/12] drm/msm: " Maarten Lankhorst
2017-07-14 15:02 ` [Intel-gfx] " Daniel Vetter
2017-07-11 14:33 ` [PATCH v2 08/12] drm/tegra: " Maarten Lankhorst
[not found] ` <20170711143314.2148-9-maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-14 15:03 ` [Intel-gfx] " Daniel Vetter
2017-07-11 14:33 ` [PATCH v2 09/12] drm/tilcdc: " Maarten Lankhorst
2017-07-27 7:49 ` Jyri Sarha
2017-07-27 10:25 ` Maarten Lankhorst
2017-07-11 14:33 ` [PATCH v2 10/12] drm/vc4: " Maarten Lankhorst
2017-07-14 15:04 ` [Intel-gfx] " Daniel Vetter
2017-07-11 14:33 ` [PATCH v2 11/12] drm/atomic: Add __must_check to drm_atomic_helper_swap_state Maarten Lankhorst
2017-07-14 15:05 ` Daniel Vetter
2017-07-11 14:33 ` [PATCH v2 12/12] drm/atomic: Allow drm_atomic_helper_swap_state to fail Maarten Lankhorst
2017-07-14 15:06 ` [Intel-gfx] " Daniel Vetter
2017-07-14 15:01 ` [PATCH v2 00/12] drm/atomic: Make drm_atomic_helper_swap_state waiting interruptible Sean Paul
2017-07-19 10:10 ` Maarten Lankhorst
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170711143314.2148-2-maarten.lankhorst@linux.intel.com \
--to=maarten.lankhorst@linux.intel.com \
--cc=bskeggs@redhat.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=nouveau@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox