projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f6e3d6
)
drm/vc4: Fix refcounting of runtime PM get if it errors out.
author
Eric Anholt
<eric@anholt.net>
Mon, 17 Apr 2017 16:26:03 +0000
(09:26 -0700)
committer
Eric Anholt
<eric@anholt.net>
Tue, 18 Apr 2017 19:31:14 +0000
(12:31 -0700)
We were returning without decrementing if the error happened, meaning
that at the next submit we wouldn't try to bring up the power domain.
Signed-off-by: Eric Anholt <eric@anholt.net>
Link:
http://patchwork.freedesktop.org/patch/msgid/20170417162603.12726-1-eric@anholt.net
Reviewed-by: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/vc4/vc4_gem.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/vc4/vc4_gem.c
b/drivers/gpu/drm/vc4/vc4_gem.c
index a1a01044263ccad8620d1f91f5d9e8fcab348629..12fb70ef31702759b8bc39d927d9ae48b3e44091 100644
(file)
--- a/
drivers/gpu/drm/vc4/vc4_gem.c
+++ b/
drivers/gpu/drm/vc4/vc4_gem.c
@@
-1010,13
+1010,16
@@
vc4_submit_cl_ioctl(struct drm_device *dev, void *data,
}
mutex_lock(&vc4->power_lock);
- if (vc4->power_refcount++ == 0)
+ if (vc4->power_refcount++ == 0)
{
ret = pm_runtime_get_sync(&vc4->v3d->pdev->dev);
- mutex_unlock(&vc4->power_lock);
- if (ret < 0) {
- kfree(exec);
- return ret;
+ if (ret < 0) {
+ mutex_unlock(&vc4->power_lock);
+ vc4->power_refcount--;
+ kfree(exec);
+ return ret;
+ }
}
+ mutex_unlock(&vc4->power_lock);
exec->args = args;
INIT_LIST_HEAD(&exec->unref_list);