Commit c0ae4c6
committed
trace: fix dma trace with repeated data bug on APL&CNL
It is caused by dma trace buffer overflow in FW. There are too many
trace events that the dma trace buffer can’t hold them, And this makes
buffer in chaos.
It is assumed that the trace msg is transferred to host when it is full,
and the occupied memory can be reused. But it is not always true. The dma
trace buffer is used as a ring buffer. In warp case, both tail and head
of the buffer are used, only the tail of buffer is transferred to host and
released. It is because GPDMA on BYT only support successive memory mode.
So it is need to be done with two dma calls. Because trace is for debugging
and to occupy the cpu usage as little as possible, only the first dma
transfer is done and the second one is scheduled next time. So only part
of dma trace buffer is released. On APL & CNL, dma gateway is used for dma
trace and it supports wrap mode transfer. So the algorithm can be refined
for dma gateway
Now add a function to do the job for different HW feature. For GPDMA, no
change is made currently, but later it would be refined to support link
list mode. For platform with dma gateway, transferring trace msg with one
dma call.
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>1 parent fa48c42 commit c0ae4c6
1 file changed
Lines changed: 76 additions & 40 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
45 | 49 | | |
46 | 50 | | |
47 | 51 | | |
| |||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
| 57 | + | |
72 | 58 | | |
73 | 59 | | |
74 | 60 | | |
| |||
77 | 63 | | |
78 | 64 | | |
79 | 65 | | |
80 | | - | |
| 66 | + | |
81 | 67 | | |
82 | | - | |
| 68 | + | |
83 | 69 | | |
84 | 70 | | |
85 | | - | |
| 71 | + | |
86 | 72 | | |
87 | 73 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
104 | 77 | | |
105 | | - | |
106 | | - | |
| 78 | + | |
107 | 79 | | |
108 | 80 | | |
109 | 81 | | |
| |||
115 | 87 | | |
116 | 88 | | |
117 | 89 | | |
| 90 | + | |
| 91 | + | |
118 | 92 | | |
119 | 93 | | |
120 | 94 | | |
| |||
267 | 241 | | |
268 | 242 | | |
269 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
270 | 306 | | |
271 | 307 | | |
272 | 308 | | |
| |||
0 commit comments