Skip to contentSkip to conversation

drm/xe: Add missing cursor offsets

PATCH In review Maarten Lankhorst 2 participants 2 messages Mar 1, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/xe: Add missing cursor offsets

Missed this when implementing display support. This allows the cursor to work properly on any pipe other than A.

---
 drivers/gpu/drm/xe/regs/xe_regs.h | 4 ++++
 drivers/gpu/drm/xe/xe_pci.c       | 6 ++++++
 2 files changed, 10 insertions(+)
drivers/gpu/drm/xe/regs/xe_regs.h +4 -0
index 2e7fbdedb5eb..c1c829c23df1 100644
@@ -69,6 +69,10 @@
 #define PIPE_D_OFFSET				0x73000
 #define PIPE_DSI0_OFFSET			0x7b000
 #define PIPE_DSI1_OFFSET			0x7b800
+#define CURSOR_A_OFFSET				0x70080
+#define CURSOR_B_OFFSET				0x71080
+#define CURSOR_C_OFFSET				0x72080
+#define CURSOR_D_OFFSET				0x73080
 
 #define SOFTWARE_FLAGS_SPR33			_MMIO(0x4f084)
 
drivers/gpu/drm/xe/xe_pci.c +6 -0
index 11dc0de66101..a0802c288a94 100644
@@ -95,6 +95,12 @@ struct xe_device_desc {
 			[TRANSCODER_DSI_0] = PIPE_DSI0_OFFSET, \
 			[TRANSCODER_DSI_1] = PIPE_DSI1_OFFSET, \
 		}, \
+		.cursor_offsets = { \
+			[PIPE_A] = CURSOR_A_OFFSET, \
+			[PIPE_B] = CURSOR_B_OFFSET, \
+			[PIPE_C] = CURSOR_C_OFFSET, \
+			[PIPE_D] = CURSOR_D_OFFSET, \
+		}, \
 		.trans_offsets = { \
 			[TRANSCODER_A] = TRANSCODER_A_OFFSET, \
 			[TRANSCODER_B] = TRANSCODER_B_OFFSET, \
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 29 lines · Maarten Lankhorst

Missed this when implementing display support. This allows the cursor to work properly on any pipe other than A.

---
drivers/gpu/drm/xe/regs/xe_regs.h | 4 ++++
drivers/gpu/drm/xe/xe_pci.c | 6 ++++++

2 files changed, 10 insertions(+)
drivers/gpu/drm/xe/regs/xe_regs.h +4 -0
index 2e7fbdedb5eb..c1c829c23df1 100644
@@ -69,6 +69,10 @@
 #define PIPE_D_OFFSET				0x73000
 #define PIPE_DSI0_OFFSET			0x7b000
 #define PIPE_DSI1_OFFSET			0x7b800
+#define CURSOR_A_OFFSET				0x70080
+#define CURSOR_B_OFFSET				0x71080
+#define CURSOR_C_OFFSET				0x72080
+#define CURSOR_D_OFFSET				0x73080
 
 #define SOFTWARE_FLAGS_SPR33			_MMIO(0x4f084)
 
drivers/gpu/drm/xe/xe_pci.c +0 -0
index 11dc0de66101..a0802c288a94 100644

drivers/gpu/drm/xe/xe_pci.c struct xe_device_desc { · line 103

Quoted 9 lines
drivers/gpu/drm/xe/xe_pci.c +6 -0
@@ -95,6 +95,12 @@ struct xe_device_desc {
 			[TRANSCODER_DSI_0] = PIPE_DSI0_OFFSET, \
 			[TRANSCODER_DSI_1] = PIPE_DSI1_OFFSET, \
 		}, \
+		.cursor_offsets = { \
+			[PIPE_A] = CURSOR_A_OFFSET, \
+			[PIPE_B] = CURSOR_B_OFFSET, \
+			[PIPE_C] = CURSOR_C_OFFSET, \
+			[PIPE_D] = CURSOR_D_OFFSET, \
+		}, \

but I started moving all of the display's specific from this device desc to another one in display/. Would that be ok?

Lucas De Marchi

Quoted 6 lines
drivers/gpu/drm/xe/xe_pci.c +0 -0
 		.trans_offsets = { \
 			[TRANSCODER_A] = TRANSCODER_A_OFFSET, \
 			[TRANSCODER_B] = TRANSCODER_B_OFFSET, \
Signature · 1 line
2.34.1