@@ -17,10 +17,7 @@ u32 intel_dsb_buffer_ggtt_offset(struct intel_dsb_buffer *dsb_buf)
17
17
18
18
void intel_dsb_buffer_write (struct intel_dsb_buffer * dsb_buf , u32 idx , u32 val )
19
19
{
20
- struct xe_device * xe = dsb_buf -> vma -> bo -> tile -> xe ;
21
-
22
20
iosys_map_wr (& dsb_buf -> vma -> bo -> vmap , idx * 4 , u32 , val );
23
- xe_device_l2_flush (xe );
24
21
}
25
22
26
23
u32 intel_dsb_buffer_read (struct intel_dsb_buffer * dsb_buf , u32 idx )
@@ -30,12 +27,9 @@ u32 intel_dsb_buffer_read(struct intel_dsb_buffer *dsb_buf, u32 idx)
30
27
31
28
void intel_dsb_buffer_memset (struct intel_dsb_buffer * dsb_buf , u32 idx , u32 val , size_t size )
32
29
{
33
- struct xe_device * xe = dsb_buf -> vma -> bo -> tile -> xe ;
34
-
35
30
WARN_ON (idx > (dsb_buf -> buf_size - size ) / sizeof (* dsb_buf -> cmd_buf ));
36
31
37
32
iosys_map_memset (& dsb_buf -> vma -> bo -> vmap , idx * 4 , val , size );
38
- xe_device_l2_flush (xe );
39
33
}
40
34
41
35
bool intel_dsb_buffer_create (struct intel_crtc * crtc , struct intel_dsb_buffer * dsb_buf , size_t size )
@@ -74,9 +68,12 @@ void intel_dsb_buffer_cleanup(struct intel_dsb_buffer *dsb_buf)
74
68
75
69
void intel_dsb_buffer_flush_map (struct intel_dsb_buffer * dsb_buf )
76
70
{
71
+ struct xe_device * xe = dsb_buf -> vma -> bo -> tile -> xe ;
72
+
77
73
/*
78
74
* The memory barrier here is to ensure coherency of DSB vs MMIO,
79
75
* both for weak ordering archs and discrete cards.
80
76
*/
81
- xe_device_wmb (dsb_buf -> vma -> bo -> tile -> xe );
77
+ xe_device_wmb (xe );
78
+ xe_device_l2_flush (xe );
82
79
}
0 commit comments