[PATCH 5/6] drm/amdgpu: add timeline support in amdgpu CS

Nicolai Hähnle nhaehnle at gmail.com
Wed Sep 26 08:44:14 UTC 2018


>   static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index 1ceec56de015..412359b446f1 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -517,6 +517,8 @@ struct drm_amdgpu_gem_va {
>   #define AMDGPU_CHUNK_ID_SYNCOBJ_IN      0x04
>   #define AMDGPU_CHUNK_ID_SYNCOBJ_OUT     0x05
>   #define AMDGPU_CHUNK_ID_BO_HANDLES      0x06
> +#define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT    0x07
> +#define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL  0x08
>   
>   struct drm_amdgpu_cs_chunk {
>   	__u32		chunk_id;
> @@ -592,6 +594,14 @@ struct drm_amdgpu_cs_chunk_sem {
>   	__u32 handle;
>   };
>   
> +struct drm_amdgpu_cs_chunk_syncobj {
> +       __u32 handle;
> +       __u32 pad;
> +       __u64 point;
> +       __u64 flags;
> +};

Sure it's nice to be forward-looking, but can't we just put the flags 
into the padding?

Cheers,
Nicolai


> +
> +
>   #define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ	0
>   #define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD	1
>   #define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD	2
> 


-- 
Lerne, wie die Welt wirklich ist,
Aber vergiss niemals, wie sie sein sollte.


More information about the amd-gfx mailing list