Commit 541de4c9 authored by Archit Taneja's avatar Archit Taneja Committed by Rob Clark

drm/msm/adreno: Prevent unclocked access when retrieving timestamps

msm_gpu's get_timestamp() op (called by the MSM_GET_PARAM ioctl) can
result in register accesses. We need our power domain and clocks to
be active for that. Make sure they are enabled here.
Signed-off-by: default avatarArchit Taneja <architt@codeaurora.org>
Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
parent cdbc78ba
...@@ -48,8 +48,15 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value) ...@@ -48,8 +48,15 @@ int adreno_get_param(struct msm_gpu *gpu, uint32_t param, uint64_t *value)
*value = adreno_gpu->base.fast_rate; *value = adreno_gpu->base.fast_rate;
return 0; return 0;
case MSM_PARAM_TIMESTAMP: case MSM_PARAM_TIMESTAMP:
if (adreno_gpu->funcs->get_timestamp) if (adreno_gpu->funcs->get_timestamp) {
return adreno_gpu->funcs->get_timestamp(gpu, value); int ret;
pm_runtime_get_sync(&gpu->pdev->dev);
ret = adreno_gpu->funcs->get_timestamp(gpu, value);
pm_runtime_put_autosuspend(&gpu->pdev->dev);
return ret;
}
return -EINVAL; return -EINVAL;
default: default:
DBG("%s: invalid param: %u", gpu->name, param); DBG("%s: invalid param: %u", gpu->name, param);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment