Re: [PATCH v2] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding

2021-05-24 Thread tiantao (H)
在 2021/5/24 20:05, Inki Dae 写道: 21. 5. 22. 오전 12:31에 Daniel Vetter 이(가) 쓴 글: On Fri, May 21, 2021 at 05:06:06PM +0800, Tian Tao wrote: use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. It would be good to explain why: Apparently get_sync increments th

Re: [PATCH v2] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding

2021-05-24 Thread Inki Dae
21. 5. 22. 오전 12:31에 Daniel Vetter 이(가) 쓴 글: > On Fri, May 21, 2021 at 05:06:06PM +0800, Tian Tao wrote: >> use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and >> pm_runtime_put_noidle. > > It would be good to explain why: Apparently get_sync increments the > refcount even if it

Re: [PATCH v2] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding

2021-05-21 Thread Daniel Vetter
On Fri, May 21, 2021 at 05:06:06PM +0800, Tian Tao wrote: > use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and > pm_runtime_put_noidle. It would be good to explain why: Apparently get_sync increments the refcount even if it fails, which ususally leads to leaks. With that or simila

[PATCH v2] drm/exynos: Use pm_runtime_resume_and_get() to replace open coding

2021-05-21 Thread Tian Tao
use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and pm_runtime_put_noidle. Signed-off-by: Tian Tao --- v2: drop unnecessary change about if condition. --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu