Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] lib/intel_batchbuffer: Fix relocs across the 4GB address boundary
@ 2020-11-09 12:06 Imre Deak
  2020-11-09 12:06 ` Imre Deak
                   ` (5 more replies)
  0 siblings, 6 replies; 14+ messages in thread
From: Imre Deak @ 2020-11-09 12:06 UTC (permalink / raw)
  To: igt-dev; +Cc: Chris Wilson

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.

Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Imre Deak <imre.deak@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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-09 17:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-09 12:06 [igt-dev] [PATCH i-g-t] lib/intel_batchbuffer: Fix relocs across the 4GB address boundary Imre Deak
2020-11-09 12:06 ` Imre Deak
2020-11-09 12:08   ` Chris Wilson
2020-11-09 13:02     ` Zbigniew Kempczyński
2020-11-09 13:05       ` Chris Wilson
2020-11-09 13:06         ` Chris Wilson
2020-11-09 13:12         ` Imre Deak
2020-11-09 13:34 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/intel_batchbuffer: Fix relocs across the 4GB address boundary (rev2) Patchwork
2020-11-09 15:04 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-11-09 15:26   ` Imre Deak
2020-11-09 17:26     ` Vudum, Lakshminarayana
2020-11-09 17:11 ` Patchwork
2020-11-09 17:17 ` [igt-dev] [PATCH i-g-t] lib/intel_batchbuffer: Fix relocs across the 4GB address boundary Zbigniew Kempczyński
2020-11-09 17:23 ` [igt-dev] ✓ Fi.CI.IGT: success for lib/intel_batchbuffer: Fix relocs across the 4GB address boundary (rev2) Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox