[PATCH 4/6] drm/amdgpu: Add UAPI for disabling implicit sync per submission.

Faith Ekstrand faith at gfxstrand.net
Fri Aug 9 17:59:19 UTC 2024


On Wed, Aug 7, 2024 at 8:09 PM Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
wrote:

> Per submission flag because:
>
> 1) Slightly simpler & more flexible than per context flag.
> 2) We'd need to extend the per-BO struct if we want to put
>    it there.
> 3) Doing it per BO is annoying implementation wise as we
>    disassociate it from the BO list before doing the fences.
> 4) I don't really anticipate an usecase for doing it per BO.
>    (e.g. I don't think we need to selectively do implicit in
>     radv and I don't see radeonsi tracking READ vs. WRITE at
>     this point.)
>
> Signed-off-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
> ---
>  include/uapi/drm/amdgpu_drm.h | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index 96e32dafd4f0..d91fa707575c 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -610,6 +610,12 @@ struct drm_amdgpu_gem_va {
>  #define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL  0x09
>  #define AMDGPU_CHUNK_ID_CP_GFX_SHADOW   0x0a
>
> +
> +#define AMDGPU_CS_FLAGS_MASK       0x1
> +/* Disable implicit sync on BOs wrt other
> + * submissions. */
> +#define AMDGPU_CS_NO_IMPLICIT_SYNC 1
>

In my UAPI patch, I also threw a comment on the BO flag documenting that
it's not a great thing to use.  Some sort of documentation for future
generations would be nice

Otherwise, the UAPI is

Reviewed-by: Faith Ekstrand <faith.ekstrand at collabora.com>


> +
>  struct drm_amdgpu_cs_chunk {
>         __u32           chunk_id;
>         __u32           length_dw;
> --
> 2.45.2
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20240809/da2ffa2d/attachment.htm>


More information about the amd-gfx mailing list