Re: [PATCH v2] drm/vc4: Fix pm_runtime_get_sync() usage

2022-04-20 Thread Maxime Ripard
On Wed, Apr 20, 2022 at 04:05:35PM +0800, Miaoqian Lin wrote: > > On 2022/4/20 15:51, Maxime Ripard wrote: > > On Wed, Apr 20, 2022 at 12:49:48AM +, Miaoqian Lin wrote: > >> If the device is already in a runtime PM enabled state > >> pm_runtime_get_sync() will return 1, so a test for negative

Re: [PATCH v2] drm/vc4: Fix pm_runtime_get_sync() usage

2022-04-20 Thread Miaoqian Lin
On 2022/4/20 15:51, Maxime Ripard wrote: > On Wed, Apr 20, 2022 at 12:49:48AM +, Miaoqian Lin wrote: >> If the device is already in a runtime PM enabled state >> pm_runtime_get_sync() will return 1, so a test for negative >> value should be used to check for errors. >> >> Also, we need to cal

Re: [PATCH v2] drm/vc4: Fix pm_runtime_get_sync() usage

2022-04-20 Thread Maxime Ripard
On Wed, Apr 20, 2022 at 12:49:48AM +, Miaoqian Lin wrote: > If the device is already in a runtime PM enabled state > pm_runtime_get_sync() will return 1, so a test for negative > value should be used to check for errors. > > Also, we need to call pm_runtime_put_noidle() when pm_runtime_get_syn

[PATCH v2] drm/vc4: Fix pm_runtime_get_sync() usage

2022-04-19 Thread Miaoqian Lin
If the device is already in a runtime PM enabled state pm_runtime_get_sync() will return 1, so a test for negative value should be used to check for errors. Also, we need to call pm_runtime_put_noidle() when pm_runtime_get_sync() fails, so use pm_runtime_resume_and_get() instead. this function wil