History

drm/etnaviv: submit support for in-fences

Loosely based on commit f0a42bb5423a ("drm/msm: submit support for in-fences"). Unfortunately, struct drm_etnaviv_gem_submit doesn't have a flags field yet, so we have to extend the structure and trust that drm_ioctl will clear the flags for us if an older userspace only submits part of the struct.

Philipp Zabel committed 9 years ago

Commit 9ad59fe1 parent bcdfb5e6 files · +46 −3Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/drm/etnaviv_drm.h+6−0
@@ -154,6 +154,10 @@ struct drm_etnaviv_gem_submit_bo { · 153 unmodified lines
154 * one or more cmdstream buffers. This allows for conditional execution154 * one or more cmdstream buffers. This allows for conditional execution
155 * (context-restore), and IB buffers needed for per tile/bin draw cmds.155 * (context-restore), and IB buffers needed for per tile/bin draw cmds.
156 */156 */
157#define ETNA_SUBMIT_NO_IMPLICIT 0x0001
158#define ETNA_SUBMIT_FENCE_FD_IN 0x0002
159#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | \
160 ETNA_SUBMIT_FENCE_FD_IN)
157#define ETNA_PIPE_3D 0x00161#define ETNA_PIPE_3D 0x00
158#define ETNA_PIPE_2D 0x01162#define ETNA_PIPE_2D 0x01
159#define ETNA_PIPE_VG 0x02163#define ETNA_PIPE_VG 0x02
@@ -167,6 +171,8 @@ struct drm_etnaviv_gem_submit { · 7 unmodified lines
167 __u64 bos; /* in, ptr to array of submit_bo's */171 __u64 bos; /* in, ptr to array of submit_bo's */
168 __u64 relocs; /* in, ptr to array of submit_reloc's */172 __u64 relocs; /* in, ptr to array of submit_reloc's */
169 __u64 stream; /* in, ptr to cmdstream */173 __u64 stream; /* in, ptr to cmdstream */
174 __u32 flags; /* in, mask of ETNA_SUBMIT_x */
175 __s32 fence_fd; /* in, fence fd (see ETNA_SUBMIT_FENCE_FD_IN) */
170};176};
171 177
172/* The normal way to synchronize with the GPU is just to CPU_PREP on178/* The normal way to synchronize with the GPU is just to CPU_PREP on

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t