On Wed, Aug 7, 2024 at 8:09 PM Bas Nieuwenhuizen <bas@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxx>
---
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@xxxxxxxxxxxxx>
+
struct drm_amdgpu_cs_chunk {
__u32 chunk_id;
__u32 length_dw;
--
2.45.2