All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Ensure we don't clamp a random offset to 32b
@ 2019-07-10 14:30 Chris Wilson
  2019-07-10 15:34 ` Mika Kuoppala
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Chris Wilson @ 2019-07-10 14:30 UTC (permalink / raw)
  To: intel-gfx

Specify that we do want a 64b value for sizeof(u32) as we want to
compute the mask of the upper 62bits.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
index 3abe15a08b6d..275ec1bfc2be 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c
@@ -1539,7 +1539,7 @@ static int igt_vm_isolation(void *arg)
 
 			div64_u64_rem(i915_prandom_u64_state(&prng),
 				      vm_total, &offset);
-			offset &= -sizeof(u32);
+			offset &= -(u64)sizeof(u32);
 			offset += I915_GTT_PAGE_SIZE;
 
 			err = write_to_scratch(ctx_a, engine,
-- 
2.22.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-07-11 17:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-10 14:30 [PATCH] drm/i915/selftests: Ensure we don't clamp a random offset to 32b Chris Wilson
2019-07-10 15:34 ` Mika Kuoppala
2019-07-10 15:37   ` Chris Wilson
2019-07-10 15:45     ` Mika Kuoppala
2019-07-10 16:14 ` [PATCH v2] " Chris Wilson
2019-07-11  8:58 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-07-11  9:50 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Ensure we don't clamp a random offset to 32b (rev2) Patchwork
2019-07-11 17:54 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.