[igt-dev] [PATCH i-g-t v3 3/7] lib/intel_batchbuffer: Introduce intel_bb
Chris Wilson
chris at chris-wilson.co.uk
Mon May 18 10:04:46 UTC 2020
Quoting Zbigniew Kempczyński (2020-05-18 10:09:15)
> +uint64_t intel_bb_get_presumed_offset(struct intel_bb *ibb, uint32_t handle)
> +{
> + uint32_t i;
> +
> + igt_assert(ibb);
> +
> + for (i = 0; i < ibb->num_relocs; i++)
> + if (ibb->relocs[i].target_handle == handle)
> + return ibb->relocs[i].presumed_offset;
The canonical source is execobj[].offset. The kernel always updates the
returned execobj[] with the correct information, but the reloc[] array
may be told a lie to force a relocation on the next pass.
The rule is address in batch matches that of reloc[].presumed_offset
that matches execobj[].offset. The latter being the linchpin.
-Chris
More information about the igt-dev
mailing list