hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/include/uapi/drm/etnaviv_drm.h
....@@ -73,6 +73,7 @@
7373 #define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18
7474 #define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19
7575 #define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a
76
+#define ETNAVIV_PARAM_SOFTPIN_START_ADDR 0x1b
7677
7778 #define ETNA_MAX_PIPES 4
7879
....@@ -148,6 +149,11 @@
148149 * then patching the cmdstream for this entry is skipped. This can
149150 * avoid kernel needing to map/access the cmdstream bo in the common
150151 * case.
152
+ * If the submit is a softpin submit (ETNA_SUBMIT_SOFTPIN) the 'presumed'
153
+ * field is interpreted as the fixed location to map the bo into the gpu
154
+ * virtual address space. If the kernel is unable to map the buffer at
155
+ * this location the submit will fail. This means userspace is responsible
156
+ * for the whole gpu virtual address management.
151157 */
152158 #define ETNA_SUBMIT_BO_READ 0x0001
153159 #define ETNA_SUBMIT_BO_WRITE 0x0002
....@@ -177,9 +183,11 @@
177183 #define ETNA_SUBMIT_NO_IMPLICIT 0x0001
178184 #define ETNA_SUBMIT_FENCE_FD_IN 0x0002
179185 #define ETNA_SUBMIT_FENCE_FD_OUT 0x0004
186
+#define ETNA_SUBMIT_SOFTPIN 0x0008
180187 #define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \
181188 ETNA_SUBMIT_FENCE_FD_IN | \
182
- ETNA_SUBMIT_FENCE_FD_OUT)
189
+ ETNA_SUBMIT_FENCE_FD_OUT| \
190
+ ETNA_SUBMIT_SOFTPIN)
183191 #define ETNA_PIPE_3D 0x00
184192 #define ETNA_PIPE_2D 0x01
185193 #define ETNA_PIPE_VG 0x02