Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu/gfx9: Apply Isolation Enforcement to GFX & Compute rings

This commit applies isolation enforcement to the GFX and Compute rings
in the gfx_v9_0 module.

The commit sets `amdgpu_gfx_enforce_isolation_ring_begin_use` and
`amdgpu_gfx_enforce_isolation_ring_end_use` as the functions to be
called when a ring begins and ends its use, respectively.

`amdgpu_gfx_enforce_isolation_ring_begin_use` is called when a ring
begins its use. This function cancels any scheduled
`enforce_isolation_work` and, if necessary, signals the Kernel Fusion
Driver (KFD) to stop the runqueue.

`amdgpu_gfx_enforce_isolation_ring_end_use` is called when a ring ends
its use. This function schedules `enforce_isolation_work` to be run
after a delay.

These functions are part of the Enforce Isolation Handler, which
enforces shader isolation on AMD GPUs to prevent data leakage between
different processes.

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>

authored by

Srinivasan Shanmugam and committed by
Alex Deucher
b710dbe5 afefd6f2

+6
+6
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
··· 7470 7470 .emit_mem_sync = gfx_v9_0_emit_mem_sync, 7471 7471 .reset = gfx_v9_0_reset_kgq, 7472 7472 .emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader, 7473 + .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use, 7474 + .end_use = amdgpu_gfx_enforce_isolation_ring_end_use, 7473 7475 }; 7474 7476 7475 7477 static const struct amdgpu_ring_funcs gfx_v9_0_sw_ring_funcs_gfx = { ··· 7530 7528 .patch_de = gfx_v9_0_ring_patch_de_meta, 7531 7529 .patch_ce = gfx_v9_0_ring_patch_ce_meta, 7532 7530 .emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader, 7531 + .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use, 7532 + .end_use = amdgpu_gfx_enforce_isolation_ring_end_use, 7533 7533 }; 7534 7534 7535 7535 static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_compute = { ··· 7573 7569 .emit_wave_limit = gfx_v9_0_emit_wave_limit, 7574 7570 .reset = gfx_v9_0_reset_kcq, 7575 7571 .emit_cleaner_shader = gfx_v9_0_ring_emit_cleaner_shader, 7572 + .begin_use = amdgpu_gfx_enforce_isolation_ring_begin_use, 7573 + .end_use = amdgpu_gfx_enforce_isolation_ring_end_use, 7576 7574 }; 7577 7575 7578 7576 static const struct amdgpu_ring_funcs gfx_v9_0_ring_funcs_kiq = {