Add support for intel_ctx_t in intel_bb
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest3 patches 1 replyIn review
- v33 patches 3 repliesSuperseded
- v23 patches 13 repliesSuperseded
Earlier versions · 1
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v1 | 3 patches | 8 replies | Superseded |
Changes in v4 from the cover letter
- Capture memcmp() return value in a variable and check it after freeing resources in misplaced_blitter()
- Free src and dst intel_bufs in misplaced_blitter() (as they were only being unmapped in the previous version)
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | lib/intel_batchbuffer: Extend __intel_bb_create to handle context configlib/ lib/ lib/ +6 more | +75 | 0 replies | |
| 2/3 | lib/intel_batchbuffer: Add support for custom engine layoutslib/ | +40 | 0 replies | |
| 3/3 | tests/api_intel_bb: Add misplaced_blitter testtests/ | +68 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Zbigniew Kempczynski |
|---|---|
| 1/3 | R-b |
| 2/3 | R-b |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [igt-dev] [PATCH i-g-t v4 0/3] Add support for intel_ctx_t in intel_bb
Currently, intel_bb assumes that context has a fixed set of engines, which might not be the case for contexts passed from the userspace. They may use a custom engines layout, so the legacy flags like I915_EXEC_BLT wouldn't match the actual engine indices.
To address this issue, the series adds an additional field to intel_bb, intel_ctx_cfg_t (intel_ctx_t configuration), that describes the engine instances, together with an engine index lookup function, find_engine(). The function added in the second patch is used by intel_bb_flush_render() and intel_bb_flush_blit() helpers.
The last patch in the series adds a test where we define a context with the blitter engine at index 0 (1 in the legacy mode) to verify that
(1) intel_bb can indeed handle external contexts, and (2) intel_bb_exec gets the correct engine id in intel_bb_flush_blit().
v4:
- Capture memcmp() return value in a variable and check it after freeing resources in misplaced_blitter()
- Free src and dst intel_bufs in misplaced_blitter() (as they were only being unmapped in the previous version)
v3:
- Add config param to intel_bb_create_full() and intel_bb_create_with_allocator()
- Move gem_require_context() check to the subtest definition
- Remove unnecessary brackets in has_ctx_cfg()
- Use igt_assert_f() to show an error message in find_engine()
- Remove redundant intel_bb_emit_bbe() call in misplaced_blitter()
- Add blitter copy instruction to misplaced_blitter() to make sure we found the correct engine (as it turns out, MI_FLUSH_DW executes on render engine with no hang or whatsoever)
v2:
- Add a blank line, removed by mistake, in __intel_bb_create()
- Update intel_bb_create_with_relocs_and_context() to handle intel_ctx_cfg_t
- Rewrite find_engine() to return engine id, and update intel_bb_flush_render() and intel_bb_flush_blit() accordingly
- Add MI_FLUSH_DW (a command that is available on blitter but not on render) to make sure we actually execute the batch buffer on the expected engine
All above suggested by Zbigniew
Karolina Drobnik (3):
lib/intel_batchbuffer: Extend __intel_bb_create to handle context
config
lib/intel_batchbuffer: Add support for custom engine layouts tests/api_intel_bb: Add misplaced_blitter test
lib/igt_draw.c | 2 +- lib/intel_batchbuffer.c | 100 +++++++++++++++++++++++++------- lib/intel_batchbuffer.h | 15 +++-- lib/media_fill.c | 2 +- tests/i915/api_intel_bb.c | 82 +++++++++++++++++++++++--- tests/i915/gem_ppgtt.c | 2 +- tests/i915/gem_pxp.c | 16 ++--- tests/i915/kms_fence_pin_leak.c | 2 +- tests/i915/perf.c | 18 +++--- 9 files changed, 183 insertions(+), 56 deletions(-)
--
2.25.1