diff mbox series

drm/i915: Drop rpm wakeref on error in debugfs/i915_drop_caches_set

Message ID 20181018092025.24076-1-joonas.lahtinen@linux.intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915: Drop rpm wakeref on error in debugfs/i915_drop_caches_set | expand

Commit Message

Joonas Lahtinen Oct. 18, 2018, 9:20 a.m. UTC
Use single exit point to drop rpm wakeref in case of an error.

Fixes: 9d3eb2c33f03 ("drm/i915: Hold rpm wakeref for debugfs/i915_drop_caches_set")
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Chris Wilson Oct. 18, 2018, 9:22 a.m. UTC | #1
Quoting Joonas Lahtinen (2018-10-18 10:20:25)
> Use single exit point to drop rpm wakeref in case of an error.
> 
> Fixes: 9d3eb2c33f03 ("drm/i915: Hold rpm wakeref for debugfs/i915_drop_caches_set")
> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>

Mea culpa,
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-Chris
Joonas Lahtinen Oct. 18, 2018, 3:44 p.m. UTC | #2
Pushed, because I need to get this cherry picked and included in PR.

Thanks for the review.

Regards, Joonas

Quoting Patchwork (2018-10-18 13:12:43)
> == Series Details ==
> 
> Series: drm/i915: Drop rpm wakeref on error in debugfs/i915_drop_caches_set
> URL   : https://patchwork.freedesktop.org/series/51169/
> State : success
> 
> == Summary ==
> 
> = CI Bug Log - changes from CI_DRM_5005 -> Patchwork_10501 =
> 
> == Summary - SUCCESS ==
> 
>   No regressions found.
> 
>   External URL: https://patchwork.freedesktop.org/api/1.0/series/51169/revisions/1/mbox/
> 
> == Known issues ==
> 
>   Here are the changes found in Patchwork_10501 that come from known issues:
> 
>   === IGT changes ===
> 
>     ==== Issues hit ====
> 
>     igt@gem_exec_suspend@basic-s3:
>       fi-blb-e6850:       PASS -> INCOMPLETE (fdo#107718)
> 
>     igt@kms_pipe_crc_basic@read-crc-pipe-b-frame-sequence:
>       fi-byt-clapper:     PASS -> FAIL (fdo#103191, fdo#107362)
> 
>     
>   fdo#103191 https://bugs.freedesktop.org/show_bug.cgi?id=103191
>   fdo#107362 https://bugs.freedesktop.org/show_bug.cgi?id=107362
>   fdo#107718 https://bugs.freedesktop.org/show_bug.cgi?id=107718
> 
> 
> == Participating hosts (42 -> 40) ==
> 
>   Additional (1): fi-icl-u2 
>   Missing    (3): fi-ilk-m540 fi-byt-squawks fi-bsw-cyan 
> 
> 
> == Build changes ==
> 
>     * Linux: CI_DRM_5005 -> Patchwork_10501
> 
>   CI_DRM_5005: 7a27ee6b5f714f6852abb0098990a05675bd9d55 @ git://anongit.freedesktop.org/gfx-ci/linux
>   IGT_4683: 7766b1e2348b32cc8ed58a972c6fd53b20279549 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
>   Patchwork_10501: 73d7e2448ed86f49b5f56ee10a08fe6da41a9d46 @ git://anongit.freedesktop.org/gfx-ci/linux
> 
> 
> == Linux commits ==
> 
> 73d7e2448ed8 drm/i915: Drop rpm wakeref on error in debugfs/i915_drop_caches_set
> 
> == Logs ==
> 
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_10501/issues.html
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 2e01159f365d..5b37d5f8e132 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4197,7 +4197,7 @@  i915_drop_caches_set(void *data, u64 val)
 	if (val & (DROP_ACTIVE | DROP_RETIRE | DROP_RESET_SEQNO)) {
 		ret = mutex_lock_interruptible(&i915->drm.struct_mutex);
 		if (ret)
-			return ret;
+			goto out;
 
 		if (val & DROP_ACTIVE)
 			ret = i915_gem_wait_for_idle(i915,
@@ -4244,6 +4244,7 @@  i915_drop_caches_set(void *data, u64 val)
 	if (val & DROP_FREED)
 		i915_gem_drain_freed_objects(i915);
 
+out:
 	intel_runtime_pm_put(i915);
 
 	return ret;