diff options
author | Rob Clark <robdclark@chromium.org> | 2020-08-17 15:01:31 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-09-12 10:45:56 -0700 |
commit | 69a9313b6617745bd841e1357e894abc85b9573d (patch) | |
tree | 60ae1d3c2fcfef490658d41d44fcbe221b93252a /drivers/gpu/drm/msm/msm_gpu.h | |
parent | 2fc7b1561fbe502f7a08f3df7e0d0cecee985966 (diff) | |
download | lwn-69a9313b6617745bd841e1357e894abc85b9573d.tar.gz lwn-69a9313b6617745bd841e1357e894abc85b9573d.zip |
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>
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index 37cffac4cbe3..da1ae2263047 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -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 |