File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
drivers/gpu/drm/i915/selftests Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -45,13 +45,15 @@ static void trash_stolen(struct drm_i915_private *i915)
45
45
struct i915_ggtt * ggtt = to_gt (i915 )-> ggtt ;
46
46
const u64 slot = ggtt -> error_capture .start ;
47
47
const resource_size_t size = resource_size (& i915 -> dsm .stolen );
48
+ struct rnd_state prng ;
48
49
unsigned long page ;
49
- u32 prng = 0x12345678 ;
50
50
51
51
/* XXX: fsck. needs some more thought... */
52
52
if (!i915_ggtt_has_aperture (ggtt ))
53
53
return ;
54
54
55
+ prandom_seed_state (& prng , 0x12345678 );
56
+
55
57
for (page = 0 ; page < size ; page += PAGE_SIZE ) {
56
58
const dma_addr_t dma = i915 -> dsm .stolen .start + page ;
57
59
u32 __iomem * s ;
@@ -64,8 +66,7 @@ static void trash_stolen(struct drm_i915_private *i915)
64
66
65
67
s = io_mapping_map_atomic_wc (& ggtt -> iomap , slot );
66
68
for (x = 0 ; x < PAGE_SIZE / sizeof (u32 ); x ++ ) {
67
- prng = next_pseudo_random32 (prng );
68
- iowrite32 (prng , & s [x ]);
69
+ iowrite32 (prandom_u32_state (& prng ), & s [x ]);
69
70
}
70
71
io_mapping_unmap_atomic (s );
71
72
}
You can’t perform that action at this time.
0 commit comments