[igt-dev] [PATCH i-g-t v3 02/13] lib/intel_batchbuffer: add new functions to support rendercopy
Chris Wilson
chris at chris-wilson.co.uk
Fri Jul 24 12:25:16 UTC 2020
Quoting Zbigniew Kempczyński (2020-07-24 10:56:48)
> To cover rendercopy in dependent tests we need to add the following:
>
> 1. relocation in any handle
> Previously batchbuffer was the main target of relocations. As AUX
> table require relocations too add support for that in intel_bb.
>
> 2. set/get default alignment
> Add default alignment for objects added to intel_bb (AUX tables use
> different alignment for different objects).
>
> 3. add intel_buf to intel_bb
> Save proposed address to intel_buf
>
> 4. add set flag function
>
> 5. unification of intel_bb_flush.*() functions.
>
> 6. fixing indentation
>
> Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Dominik Grzegorzek <dominik.grzegorzek at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> @@ -1253,11 +1255,12 @@ __intel_bb_create(int i915, uint32_t size, bool do_relocs)
> gtt_size /= 2;
> if ((gtt_size - 1) >> 32)
> ibb->supports_48b_address = true;
> +
> ibb->gtt_size = gtt_size;
>
> __reallocate_objects(ibb);
> - bb_address = __intel_bb_propose_offset(ibb);
> - intel_bb_add_object(ibb, ibb->handle, bb_address, false);
> + ibb->batch_offset = __intel_bb_propose_offset(ibb);
> + intel_bb_add_object(ibb, ibb->handle, ibb->batch_offset, false);
Ok. Was thinking thta ibb itself has no notion of which batch, but
that's fairly irrelevant for ibb->batch_offset per se.
> diff --git a/lib/intel_batchbuffer.h b/lib/intel_batchbuffer.h
> index a69fffd8..cc8c84b6 100644
> --- a/lib/intel_batchbuffer.h
> +++ b/lib/intel_batchbuffer.h
> @@ -439,6 +439,7 @@ struct intel_bb {
> uint32_t size;
> uint32_t *batch;
> uint32_t *ptr;
> + uint64_t alignment;
Heh, size is a mere u32 :)
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the igt-dev
mailing list