[PATCH i-g-t v5 11/17] lib/xe_eudebug: Introduce eu debug testing framework
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Wed Sep 4 11:26:32 UTC 2024
On Thu, Aug 29, 2024 at 04:45:41PM +0200, Christoph Manszewski wrote:
<cut>
Forgot to add this in my previous comment.
> +static void event_log_sort(struct xe_eudebug_event_log *l)
> +{
> + struct xe_eudebug_event_log *tmp;
> + struct drm_xe_eudebug_event *e = NULL;
> + uint64_t first_seqno = 0;
> + uint64_t last_seqno = 0;
> + uint64_t events = 0, added = 0;
> + uint64_t i;
> +
> + xe_eudebug_for_each_event(e, l) {
> + if (e->seqno > last_seqno)
> + last_seqno = e->seqno;
> +
> + if (e->seqno < first_seqno)
> + first_seqno = e->seqno;
> +
> + events++;
> + }
> +
> + tmp = xe_eudebug_event_log_create("tmp", l->max_size);
> +
> + for (i = 1; i <= last_seqno; i++) {
Shouldn't this be i = first_seqno?
> + e = xe_eudebug_event_log_find_seqno(l, i);
> + if (e) {
> + xe_eudebug_event_log_write(tmp, e);
> + added++;
> + }
> + }
> +
> + igt_assert_eq(events, added);
> + igt_assert_eq(tmp->head, l->head);
> +
> + memcpy(l->log, tmp->log, tmp->head);
> +
> + xe_eudebug_event_log_destroy(tmp);
> +}
--
Zbigniew
More information about the igt-dev
mailing list