drm/msm/gpu: Increase the pm runtime autosuspend for 5xx
Experimentation shows that resuming power quickly after suspending ends up forcing a system hang for unknown reasons on 5xx targets. To avoid cycling the power too much (especially during init) turn up the autosuspend time for a5xx to 250ms and use pm_runtime_put_autosuspend() when applicable. Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
parent
6666e1a66f
commit
64709686db
|
@ -35,6 +35,7 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_PFP] = "a300_pfp.fw",
|
||||
},
|
||||
.gmem = SZ_256K,
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a3xx_gpu_init,
|
||||
}, {
|
||||
.rev = ADRENO_REV(3, 0, 6, 0),
|
||||
|
@ -45,6 +46,7 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_PFP] = "a300_pfp.fw",
|
||||
},
|
||||
.gmem = SZ_128K,
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a3xx_gpu_init,
|
||||
}, {
|
||||
.rev = ADRENO_REV(3, 2, ANY_ID, ANY_ID),
|
||||
|
@ -55,6 +57,7 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_PFP] = "a300_pfp.fw",
|
||||
},
|
||||
.gmem = SZ_512K,
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a3xx_gpu_init,
|
||||
}, {
|
||||
.rev = ADRENO_REV(3, 3, 0, ANY_ID),
|
||||
|
@ -65,6 +68,7 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_PFP] = "a330_pfp.fw",
|
||||
},
|
||||
.gmem = SZ_1M,
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a3xx_gpu_init,
|
||||
}, {
|
||||
.rev = ADRENO_REV(4, 2, 0, ANY_ID),
|
||||
|
@ -75,6 +79,7 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_PFP] = "a420_pfp.fw",
|
||||
},
|
||||
.gmem = (SZ_1M + SZ_512K),
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a4xx_gpu_init,
|
||||
}, {
|
||||
.rev = ADRENO_REV(4, 3, 0, ANY_ID),
|
||||
|
@ -85,6 +90,7 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_PFP] = "a420_pfp.fw",
|
||||
},
|
||||
.gmem = (SZ_1M + SZ_512K),
|
||||
.inactive_period = DRM_MSM_INACTIVE_PERIOD,
|
||||
.init = a4xx_gpu_init,
|
||||
}, {
|
||||
.rev = ADRENO_REV(5, 3, 0, 2),
|
||||
|
@ -96,6 +102,11 @@ static const struct adreno_info gpulist[] = {
|
|||
[ADRENO_FW_GPMU] = "a530v3_gpmu.fw2",
|
||||
},
|
||||
.gmem = SZ_1M,
|
||||
/*
|
||||
* Increase inactive period to 250 to avoid bouncing
|
||||
* the GDSC which appears to make it grumpy
|
||||
*/
|
||||
.inactive_period = 250,
|
||||
.quirks = ADRENO_QUIRK_TWO_PASS_USE_WFI |
|
||||
ADRENO_QUIRK_FAULT_DETECT_MASK,
|
||||
.init = a5xx_gpu_init,
|
||||
|
@ -158,7 +169,7 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
|
|||
mutex_lock(&dev->struct_mutex);
|
||||
ret = msm_gpu_hw_init(gpu);
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
pm_runtime_put_sync(&pdev->dev);
|
||||
pm_runtime_put_autosuspend(&pdev->dev);
|
||||
if (ret) {
|
||||
dev_err(dev->dev, "gpu hw init failed: %d\n", ret);
|
||||
return NULL;
|
||||
|
|
|
@ -565,7 +565,8 @@ int adreno_gpu_init(struct drm_device *drm, struct platform_device *pdev,
|
|||
|
||||
adreno_get_pwrlevels(&pdev->dev, gpu);
|
||||
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev, DRM_MSM_INACTIVE_PERIOD);
|
||||
pm_runtime_set_autosuspend_delay(&pdev->dev,
|
||||
adreno_gpu->info->inactive_period);
|
||||
pm_runtime_use_autosuspend(&pdev->dev);
|
||||
pm_runtime_enable(&pdev->dev);
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ struct adreno_info {
|
|||
enum adreno_quirks quirks;
|
||||
struct msm_gpu *(*init)(struct drm_device *dev);
|
||||
const char *zapfw;
|
||||
u32 inactive_period;
|
||||
};
|
||||
|
||||
const struct adreno_info *adreno_info(struct adreno_rev rev);
|
||||
|
|
Loading…
Reference in New Issue