drm/msm/gpu: Add dev_to_gpu() helper

In a later patch, the drvdata will not directly be 'struct msm_gpu *',
so add a helper to reduce the churn.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Rob Clark
2020-08-17 15:01:31 -07:00
parent 2fc7b1561f
commit 69a9313b66
3 changed files with 12 additions and 9 deletions

View File

@@ -144,6 +144,11 @@ struct msm_gpu {
bool hw_apriv;
};
static inline struct msm_gpu *dev_to_gpu(struct device *dev)
{
return dev_get_drvdata(dev);
}
/* It turns out that all targets use the same ringbuffer size */
#define MSM_GPU_RINGBUFFER_SZ SZ_32K
#define MSM_GPU_RINGBUFFER_BLKSIZE 32