[PATCH v4 5/7] drm/msm/a6xx: Ensure CX collapse during gpu recovery

Philipp Zabel p.zabel at pengutronix.de
Thu Aug 18 08:54:38 UTC 2022


Hi Akhil,

On Wed, Aug 17, 2022 at 08:44:18PM +0530, Akhil P Oommen wrote:
> Because there could be transient votes from other drivers/tz/hyp which
> may keep the cx gdsc enabled, we should poll until cx gdsc collapses.
> We can use the reset framework to poll for cx gdsc collapse from gpucc
> clk driver.
> 
> This feature requires support from the platform's gpucc driver.
> 
> Signed-off-by: Akhil P Oommen <quic_akhilpo at quicinc.com>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at linaro.org>
> ---
> 
> (no changes since v3)
> 
> Changes in v3:
> - Use reset interface from gpucc driver to poll for cx gdsc collapse
>   https://patchwork.freedesktop.org/series/106860/
> 
>  drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 4 ++++
>  drivers/gpu/drm/msm/msm_gpu.c         | 4 ++++
>  drivers/gpu/drm/msm/msm_gpu.h         | 4 ++++
>  3 files changed, 12 insertions(+)
> 
[...]
> diff --git a/drivers/gpu/drm/msm/msm_gpu.c b/drivers/gpu/drm/msm/msm_gpu.c
> index 07e55a6..4a57627 100644
> --- a/drivers/gpu/drm/msm/msm_gpu.c
> +++ b/drivers/gpu/drm/msm/msm_gpu.c
[...]
> @@ -903,6 +904,9 @@ int msm_gpu_init(struct drm_device *drm, struct platform_device *pdev,
>  	if (IS_ERR(gpu->gpu_cx))
>  		gpu->gpu_cx = NULL;
>  
> +	gpu->cx_collapse = devm_reset_control_get_optional(&pdev->dev,
> +			"cx_collapse");

Please use devm_reset_control_get_optional_exclusive() instead.

With that,
Reviewed-by: Philipp Zabel <p.zabel at pengutronix.de>

regards
Philipp


More information about the dri-devel mailing list