[igt-dev] [PATCH i-g-t v17 12/31] lib/intel_batchbuffer: Add tracking intel_buf to intel_bb
Chris Wilson
chris at chris-wilson.co.uk
Fri Jan 15 13:36:38 UTC 2021
Quoting Zbigniew Kempczyński (2021-01-15 12:57:20)
> @@ -1884,10 +1890,21 @@ __intel_bb_add_intel_buf(struct intel_bb *ibb, struct intel_buf *buf,
> obj = intel_bb_add_object(ibb, buf->handle, intel_buf_bo_size(buf),
> buf->addr.offset, alignment, write);
> buf->addr.offset = obj->offset;
> + buf->ibb = ibb;
>
> if (!ibb->enforce_relocs)
> obj->alignment = alignment;
>
> + igt_list_for_each_entry(entry, &ibb->intel_bufs, link) {
> + if (buf->handle == entry->handle) {
> + found = true;
> + break;
> + }
> + }
> +
> + if (!found)
> + igt_list_add_tail(&buf->link, &ibb->intel_bufs);
This won the prize for topping the profiles.
Can we INIT_LIST_HEAD(&buf->link) and igt_list_move_tail?
-Chris
More information about the igt-dev
mailing list