summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panfrost/panfrost_regs.h
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2021-08-24 13:30:27 -0400
committerSteven Price <steven.price@arm.com>2021-08-25 15:40:19 +0100
commitbd7ffbc3ca12629aeb66fb9e28cf42b7f37e3e3b (patch)
tree8c9b9d98b29efb37abdd40f1f2f916ac9096221c /drivers/gpu/drm/panfrost/panfrost_regs.h
parenta77b58825d7221d4a45c47881c35a47ba003aa73 (diff)
downloadlwn-bd7ffbc3ca12629aeb66fb9e28cf42b7f37e3e3b.tar.gz
lwn-bd7ffbc3ca12629aeb66fb9e28cf42b7f37e3e3b.zip
drm/panfrost: Clamp lock region to Bifrost minimum
When locking a region, we currently clamp to a PAGE_SIZE as the minimum lock region. While this is valid for Midgard, it is invalid for Bifrost, where the minimum locking size is 8x larger than the 4k page size. Add a hardware definition for the minimum lock region size (corresponding to KBASE_LOCK_REGION_MIN_SIZE_LOG2 in kbase) and respect it. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Tested-by: Chris Morgan <macromorgan@hotmail.com> Reviewed-by: Steven Price <steven.price@arm.com> Reviewed-by: Rob Herring <robh@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Steven Price <steven.price@arm.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210824173028.7528-4-alyssa.rosenzweig@collabora.com
Diffstat (limited to 'drivers/gpu/drm/panfrost/panfrost_regs.h')
-rw-r--r--drivers/gpu/drm/panfrost/panfrost_regs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
index 1940ff86e49a..6c5a11ef1ee8 100644
--- a/drivers/gpu/drm/panfrost/panfrost_regs.h
+++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
@@ -316,6 +316,8 @@
#define AS_FAULTSTATUS_ACCESS_TYPE_READ (0x2 << 8)
#define AS_FAULTSTATUS_ACCESS_TYPE_WRITE (0x3 << 8)
+#define AS_LOCK_REGION_MIN_SIZE (1ULL << 15)
+
#define gpu_write(dev, reg, data) writel(data, dev->iomem + reg)
#define gpu_read(dev, reg) readl(dev->iomem + reg)