[PATCH i-g-t v2 10/66] lib/xe_eudebug: Add support for user fence acking
Piatkowski, Dominik Karol
dominik.karol.piatkowski at intel.com
Thu Aug 1 11:34:26 UTC 2024
With issues addressed:
Reviewed-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
> -----Original Message-----
> From: Manszewski, Christoph <christoph.manszewski at intel.com>
> Sent: Tuesday, July 30, 2024 1:44 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Kempczynski, Zbigniew <zbigniew.kempczynski at intel.com>; Kamil
> Konieczny <kamil.konieczny at linux.intel.com>; Grzegorzek, Dominik
> <dominik.grzegorzek at intel.com>; Patelczyk, Maciej
> <maciej.patelczyk at intel.com>; Piatkowski, Dominik Karol
> <dominik.karol.piatkowski at intel.com>; Sikora, Pawel
> <pawel.sikora at intel.com>; Hajda, Andrzej <andrzej.hajda at intel.com>;
> Kolanupaka Naveena <kolanupaka.naveena at intel.com>; Kuoppala, Mika
> <mika.kuoppala at intel.com>; Mun, Gwan-gyeong <gwan-
> gyeong.mun at intel.com>
> Subject: [PATCH i-g-t v2 10/66] lib/xe_eudebug: Add support for user fence
> acking
>
> If the debugee uses user fences for synchronization, the debugger will recieve
Typo: receive
> a 'UFENCE_EVENT' and the fence won't be released untill the debugger acks it.
Typo: until
> Note that for the fence to release, both the job completion and debugger ack
> are required. Add a library function to ack user fences.
>
> Signed-off-by: Mika Kuoppala <mika.kuoppala at intel.com>
> Signed-off-by: Christoph Manszewski <christoph.manszewski at intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> ---
> lib/xe/xe_eudebug.c | 14 ++++++++++++++ lib/xe/xe_eudebug.h | 2 ++
> 2 files changed, 16 insertions(+)
>
> diff --git a/lib/xe/xe_eudebug.c b/lib/xe/xe_eudebug.c index
> 8164a2d50..af7cc5fc4 100644
> --- a/lib/xe/xe_eudebug.c
> +++ b/lib/xe/xe_eudebug.c
> @@ -2037,3 +2037,17 @@ void
> xe_eudebug_client_metadata_destroy(struct xe_eudebug_client *c, int fd,
>
> metadata_event(c, DRM_XE_EUDEBUG_EVENT_DESTROY, fd, id, type,
> len); }
> +
> +void xe_eudebug_ack_ufence(int debugfd,
> + const struct
> drm_xe_eudebug_event_vm_bind_ufence *f) {
> + struct drm_xe_eudebug_ack_event ack = { 0, };
> + char event_str[XE_EUDEBUG_EVENT_STRING_MAX_LEN];
> +
> + ack.type = f->base.type;
> + ack.seqno = f->base.seqno;
> +
> + xe_eudebug_event_to_str((void *)f, event_str,
> XE_EUDEBUG_EVENT_STRING_MAX_LEN);
> + igt_debug("delivering ack for event: %s\n", event_str);
> + igt_assert_eq(igt_ioctl(debugfd,
> DRM_XE_EUDEBUG_IOCTL_ACK_EVENT,
> +&ack), 0); }
> diff --git a/lib/xe/xe_eudebug.h b/lib/xe/xe_eudebug.h index
> 24336981f..ec75634f5 100644
> --- a/lib/xe/xe_eudebug.h
> +++ b/lib/xe/xe_eudebug.h
> @@ -167,6 +167,8 @@ void
> xe_eudebug_client_vm_bind_op_metadata_event(struct xe_eudebug_client
> *c,
> uint64_t metadata_handle,
> uint64_t metadata_cookie); void
> xe_eudebug_client_vm_bind_ufence_event(struct xe_eudebug_client *c,
> uint32_t event_flags,
> uint64_t ref_seqno);
> +void xe_eudebug_ack_ufence(int debugfd,
> + const struct
> drm_xe_eudebug_event_vm_bind_ufence *f);
>
> void xe_eudebug_client_vm_bind_flags(struct xe_eudebug_client *c, int fd,
> uint32_t vm,
> uint32_t bo, uint64_t offset,
> --
> 2.34.1
More information about the igt-dev
mailing list