summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2021-08-25 11:33:48 -0400
committerSteven Price <steven.price@arm.com>2021-08-26 09:42:48 +0100
commite9ae220d3f6f8f44250b83c6c332733fcae639fd (patch)
tree9a8b5d169d83296fa92a586667a17206e1d60dd3 /drivers/gpu/drm/panfrost/panfrost_perfcnt.c
parent08994edbb81f5185780b4111abf053cfab90fe88 (diff)
downloadlwn-e9ae220d3f6f8f44250b83c6c332733fcae639fd.tar.gz
lwn-e9ae220d3f6f8f44250b83c6c332733fcae639fd.zip
drm/panfrost: Use upper/lower_32_bits helpers
Use upper_32_bits/lower_32_bits helpers instead of open-coding them. This is easier to scan quickly compared to bitwise manipulation, and it is pleasingly symmetric. I noticed this when debugging lock_region, which had a particularly "creative" way of writing upper_32_bits. v2: Use helpers for one more call site and add review tag (Steven). Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Rob Herring <robh@kernel.org> (v1) Reviewed-by: Steven Price <steven.price@arm.com> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210825153348.4980-1-alyssa.rosenzweig@collabora.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_perfcnt.c')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_perfcnt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
index 5ab03d605f57..e116a4d9b8e5 100644
--- a/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
+++ b/drivers/gpu/drm/panfrost/panfrost_perfcnt.c
@@ -51,8 +51,8 @@ static int panfrost_perfcnt_dump_locked(struct panfrost_device *pfdev)
reinit_completion(&pfdev->perfcnt->dump_comp);
gpuva = pfdev->perfcnt->mapping->mmnode.start << PAGE_SHIFT;
- gpu_write(pfdev, GPU_PERFCNT_BASE_LO, gpuva);
- gpu_write(pfdev, GPU_PERFCNT_BASE_HI, gpuva >> 32);
+ gpu_write(pfdev, GPU_PERFCNT_BASE_LO, lower_32_bits(gpuva));
+ gpu_write(pfdev, GPU_PERFCNT_BASE_HI, upper_32_bits(gpuva));
gpu_write(pfdev, GPU_INT_CLEAR,
GPU_IRQ_CLEAN_CACHES_COMPLETED |
GPU_IRQ_PERFCNT_SAMPLE_COMPLETED);