[igt-dev] [PATCH i-g-t] lib/intel_batchbuffer: Fix relocs across the 4GB address boundary
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Nov 9 17:17:35 UTC 2020
On Mon, Nov 09, 2020 at 02:06:31PM +0200, Imre Deak wrote:
> If the delta of a relocation target wrt. the object base address crosses
> the 4GB address boundary the upper 32bit of the target address will be
> incorrect, fix this.
Give me a day, I'm going to add accompanying test. I need to do this
twice - one with current API and second for allocator series where
API changed a bit in alignment management.
--
Zbigniew
>
> Cc: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> Cc: Chris Wilson <chris at chris-wilson.co.uk>
> Signed-off-by: Imre Deak <imre.deak at intel.com>
> ---
> lib/intel_batchbuffer.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
> index fc73495c0..7b4cfb0dd 100644
> --- a/lib/intel_batchbuffer.c
> +++ b/lib/intel_batchbuffer.c
> @@ -1850,7 +1850,7 @@ static uint64_t __intel_bb_emit_reloc(struct intel_bb *ibb,
>
> intel_bb_out(ibb, delta + address);
> if (ibb->gen >= 8)
> - intel_bb_out(ibb, address >> 32);
> + intel_bb_out(ibb, (delta + address) >> 32);
>
> return address;
> }
> --
> 2.25.1
>
More information about the igt-dev
mailing list