|
26 | 26 | #include "shmem_utils.h" |
27 | 27 | #include "intel_engine_heartbeat.h" |
28 | 28 | #include "intel_engine_pm.h" |
| 29 | +#include "intel_gt_print.h" |
29 | 30 |
|
30 | 31 | /* Rough estimate of the typical request size, performing a flush, |
31 | 32 | * set-context and then emitting the batch. |
@@ -230,8 +231,13 @@ static int xcs_resume(struct intel_engine_cs *engine) |
230 | 231 |
|
231 | 232 | set_pp_dir(engine); |
232 | 233 |
|
233 | | - /* First wake the ring up to an empty/idle ring */ |
234 | | - for ((kt) = ktime_get() + (2 * NSEC_PER_MSEC); |
| 234 | + /* |
| 235 | + * First wake the ring up to an empty/idle ring. |
| 236 | + * Use 50ms of delay to let the engine write successfully |
| 237 | + * for all platforms. Experimented with different values and |
| 238 | + * determined that 50ms works best based on testing. |
| 239 | + */ |
| 240 | + for ((kt) = ktime_get() + (50 * NSEC_PER_MSEC); |
235 | 241 | ktime_before(ktime_get(), (kt)); cpu_relax()) { |
236 | 242 | /* |
237 | 243 | * In case of resets fails because engine resumes from |
@@ -282,16 +288,16 @@ static int xcs_resume(struct intel_engine_cs *engine) |
282 | 288 | return 0; |
283 | 289 |
|
284 | 290 | err: |
285 | | - drm_err(&engine->i915->drm, |
286 | | - "%s initialization failed; " |
287 | | - "ctl %08x (valid? %d) head %08x [%08x] tail %08x [%08x] start %08x [expected %08x]\n", |
288 | | - engine->name, |
289 | | - ENGINE_READ(engine, RING_CTL), |
290 | | - ENGINE_READ(engine, RING_CTL) & RING_VALID, |
291 | | - ENGINE_READ(engine, RING_HEAD), ring->head, |
292 | | - ENGINE_READ(engine, RING_TAIL), ring->tail, |
293 | | - ENGINE_READ(engine, RING_START), |
294 | | - i915_ggtt_offset(ring->vma)); |
| 291 | + gt_err(engine->gt, "%s initialization failed\n", engine->name); |
| 292 | + ENGINE_TRACE(engine, |
| 293 | + "ctl %08x (valid? %d) head %08x [%08x] tail %08x [%08x] start %08x [expected %08x]\n", |
| 294 | + ENGINE_READ(engine, RING_CTL), |
| 295 | + ENGINE_READ(engine, RING_CTL) & RING_VALID, |
| 296 | + ENGINE_READ(engine, RING_HEAD), ring->head, |
| 297 | + ENGINE_READ(engine, RING_TAIL), ring->tail, |
| 298 | + ENGINE_READ(engine, RING_START), |
| 299 | + i915_ggtt_offset(ring->vma)); |
| 300 | + GEM_TRACE_DUMP(); |
295 | 301 | return -EIO; |
296 | 302 | } |
297 | 303 |
|
|
0 commit comments