Skip to content

Commit 7e89d50

Browse files
llandwerlin-inteljlahtine-intel
authored andcommitted
drm/i915/perf: don't forget noa wait after oa config
I'm observing incoherence metric values, changing from run to run. It appears the patches introducing noa wait & reconfiguration from command stream switched places in the series multiple times during the review. This lead to the dependency of one onto the order to go missing... Signed-off-by: Lionel Landwerlin <[email protected]> Fixes: 15d0ace ("drm/i915/perf: execute OA configuration from command stream") Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 9393765) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 3e749f5 commit 7e89d50

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1870,7 +1870,7 @@ alloc_oa_config_buffer(struct i915_perf_stream *stream,
18701870
config_length += num_lri_dwords(oa_config->mux_regs_len);
18711871
config_length += num_lri_dwords(oa_config->b_counter_regs_len);
18721872
config_length += num_lri_dwords(oa_config->flex_regs_len);
1873-
config_length++; /* MI_BATCH_BUFFER_END */
1873+
config_length += 3; /* MI_BATCH_BUFFER_START */
18741874
config_length = ALIGN(sizeof(u32) * config_length, I915_GTT_PAGE_SIZE);
18751875

18761876
obj = i915_gem_object_create_shmem(stream->perf->i915, config_length);
@@ -1895,7 +1895,12 @@ alloc_oa_config_buffer(struct i915_perf_stream *stream,
18951895
oa_config->flex_regs,
18961896
oa_config->flex_regs_len);
18971897

1898-
*cs++ = MI_BATCH_BUFFER_END;
1898+
/* Jump into the active wait. */
1899+
*cs++ = (INTEL_GEN(stream->perf->i915) < 8 ?
1900+
MI_BATCH_BUFFER_START :
1901+
MI_BATCH_BUFFER_START_GEN8);
1902+
*cs++ = i915_ggtt_offset(stream->noa_wait);
1903+
*cs++ = 0;
18991904

19001905
i915_gem_object_flush_map(obj);
19011906
i915_gem_object_unpin_map(obj);

0 commit comments

Comments
 (0)