From: Boris Brezillon <boris.brezillon@collabora.com>
This will let us set the affinity (L2 caches and tiler units that can
process a job) in future commits.
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Adrián Larumbe <adrian.larumbe@collabora.com>
---
drivers/gpu/drm/panfrost/panfrost_regs.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_regs.h b/drivers/gpu/drm/panfrost/panfrost_regs.h
index 2b8f1617b836..a63cd65b344a 100644
--- a/drivers/gpu/drm/panfrost/panfrost_regs.h
+++ b/drivers/gpu/drm/panfrost/panfrost_regs.h
@@ -253,6 +253,7 @@
#define JS_AFFINITY_NEXT_LO(n) (JS_BASE + ((n) * JS_SLOT_STRIDE) + 0x50)
#define JS_AFFINITY_NEXT_HI(n) (JS_BASE + ((n) * JS_SLOT_STRIDE) + 0x54)
#define JS_CONFIG_NEXT(n) (JS_BASE + ((n) * JS_SLOT_STRIDE) + 0x58)
+#define JS_XAFFINITY_NEXT(n) (JS_BASE + ((n) * JS_SLOT_STRIDE) + 0x5c)
#define JS_COMMAND_NEXT(n) (JS_BASE + ((n) * JS_SLOT_STRIDE) + 0x60)
#define JS_FLUSH_ID_NEXT(n) (JS_BASE + ((n) * JS_SLOT_STRIDE) + 0x70)
@@ -267,6 +268,11 @@
#define JS_CONFIG_DISABLE_DESCRIPTOR_WR_BK BIT(15)
#define JS_CONFIG_THREAD_PRI(n) ((n) << 16)
+/* Possible values of JS_XAFFINITY and JS_XAFFINITY_NEXT registers */
+#define JS_XAFFINITY_ENABLE BIT(0)
+#define JS_XAFFINITY_TILER_MASK(x) (((u32)(x) & GENMASK(7, 0)) << 8)
+#define JS_XAFFINITY_L2_MASK(x) (((u32)(x) & GENMASK(15, 0)) << 16)
+
#define JS_COMMAND_NOP 0x00
#define JS_COMMAND_START 0x01
#define JS_COMMAND_SOFT_STOP 0x02 /* Gently stop processing a job chain */
--
2.50.0