diff options
author | Matt Roper <matthew.d.roper@intel.com> | 2023-06-02 00:52:31 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2023-12-20 02:34:15 +0300 |
commit | f6929e80cdf540d7106764bda38c4ce0601fee7b (patch) | |
tree | e43da7d75c84ee5a3e032310203998db34d444f7 /drivers/gpu/drm/xe/tests | |
parent | 1e6c20be6c83817cf68637eb334dafac3a4b2512 (diff) | |
download | linux-f6929e80cdf540d7106764bda38c4ce0601fee7b.tar.xz |
drm/xe: Allocate GT dynamically
In preparation for re-adding media GT support, switch the primary GT
within the tile to a dynamic allocation.
Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://lore.kernel.org/r/20230601215244.678611-19-matthew.d.roper@intel.com
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'drivers/gpu/drm/xe/tests')
-rw-r--r-- | drivers/gpu/drm/xe/tests/xe_migrate.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/xe/tests/xe_rtp_test.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/xe/tests/xe_migrate.c b/drivers/gpu/drm/xe/tests/xe_migrate.c index d9f1f31c92d2..60266fea7faa 100644 --- a/drivers/gpu/drm/xe/tests/xe_migrate.c +++ b/drivers/gpu/drm/xe/tests/xe_migrate.c @@ -286,7 +286,7 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *test) goto free_pt; } - bb = xe_bb_new(&tile->primary_gt, 32, xe->info.supports_usm); + bb = xe_bb_new(tile->primary_gt, 32, xe->info.supports_usm); if (IS_ERR(bb)) { KUNIT_FAIL(test, "Failed to create batchbuffer: %li\n", PTR_ERR(bb)); @@ -323,7 +323,7 @@ static void xe_migrate_sanity_test(struct xe_migrate *m, struct kunit *test) xe_map_wr(xe, &pt->vmap, 0, u32, 0xdeaddead); expected = 0; - emit_clear(&tile->primary_gt, bb, xe_migrate_vm_addr(NUM_KERNEL_PDE - 1, 0), 4, 4, + emit_clear(tile->primary_gt, bb, xe_migrate_vm_addr(NUM_KERNEL_PDE - 1, 0), 4, 4, IS_DGFX(xe)); run_sanity_job(m, xe, bb, 1, "Writing to our newly mapped pagetable", test); diff --git a/drivers/gpu/drm/xe/tests/xe_rtp_test.c b/drivers/gpu/drm/xe/tests/xe_rtp_test.c index 45f2614f91ec..b2beba0019cd 100644 --- a/drivers/gpu/drm/xe/tests/xe_rtp_test.c +++ b/drivers/gpu/drm/xe/tests/xe_rtp_test.c @@ -237,7 +237,7 @@ static void xe_rtp_process_tests(struct kunit *test) { const struct rtp_test_case *param = test->param_value; struct xe_device *xe = test->priv; - struct xe_gt *gt = &xe_device_get_root_tile(xe)->primary_gt; + struct xe_gt *gt = xe_device_get_root_tile(xe)->primary_gt; struct xe_reg_sr *reg_sr = >->reg_sr; const struct xe_reg_sr_entry *sre, *sr_entry = NULL; struct xe_rtp_process_ctx ctx = XE_RTP_PROCESS_CTX_INITIALIZER(gt); |