diff options
author | Sharat Masetty <smasetty@codeaurora.org> | 2020-11-25 12:30:14 +0530 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2020-11-29 11:03:04 -0800 |
commit | 40a72b0c7f99cf7b856dccca9624b81140955911 (patch) | |
tree | 49cbd0bbe3cbcd1b234ce1e9a82e85571738a2f4 /drivers/gpu/drm/msm/msm_gpu.h | |
parent | 9e0673c00cb0839fbe64e4ee4dbf150fd28483eb (diff) |
drm/msm: rearrange the gpu_rmw() function
The register read-modify-write construct is generic enough
that it can be used by other subsystems as needed, create
a more generic rmw() function and have the gpu_rmw() use
this new function.
Signed-off-by: Sharat Masetty <smasetty@codeaurora.org>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@chromium.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, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h index 786cfc285be0..d7cd02cd2109 100644 --- a/drivers/gpu/drm/msm/msm_gpu.h +++ b/drivers/gpu/drm/msm/msm_gpu.h @@ -256,10 +256,7 @@ static inline u32 gpu_read(struct msm_gpu *gpu, u32 reg) static inline void gpu_rmw(struct msm_gpu *gpu, u32 reg, u32 mask, u32 or) { - uint32_t val = gpu_read(gpu, reg); - - val &= ~mask; - gpu_write(gpu, reg, val | or); + msm_rmw(gpu->mmio + (reg << 2), mask, or); } static inline u64 gpu_read64(struct msm_gpu *gpu, u32 lo, u32 hi) |