File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
drivers/gpu/drm/i915/gem/selftests Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -1809,7 +1809,6 @@ static int igt_vm_isolation(void *arg)
1809
1809
1810
1810
vm_total = ctx_vm (ctx_a )-> total ;
1811
1811
GEM_BUG_ON (ctx_vm (ctx_b )-> total != vm_total );
1812
- vm_total -= I915_GTT_PAGE_SIZE ;
1813
1812
1814
1813
count = 0 ;
1815
1814
num_engines = 0 ;
@@ -1828,10 +1827,10 @@ static int igt_vm_isolation(void *arg)
1828
1827
u32 value = 0xc5c5c5c5 ;
1829
1828
u64 offset ;
1830
1829
1831
- div64_u64_rem ( i915_prandom_u64_state ( & prng ),
1832
- vm_total , & offset );
1833
- offset = round_down ( offset , alignof_dword );
1834
- offset += I915_GTT_PAGE_SIZE ;
1830
+ /* Leave enough space at offset 0 for the batch */
1831
+ offset = igt_random_offset ( & prng ,
1832
+ I915_GTT_PAGE_SIZE , vm_total ,
1833
+ sizeof ( u32 ), alignof_dword ) ;
1835
1834
1836
1835
err = write_to_scratch (ctx_a , engine ,
1837
1836
offset , 0xdeadbeef );
You can’t perform that action at this time.
0 commit comments