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/amdkfd: Set SDMA_QUEUEx_IB_CNTL/SWITCH_INSIDE_IB

When submitting MQD to CP, set SDMA_QUEUEx_IB_CNTL/SWITCH_INSIDE_IB bit
so it'll allow SDMA preemption if there is a massive command buffer of
long-running SDMA commands.

Signed-off-by: Gang Ba <Gang.Ba@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Gang Ba and committed by
Alex Deucher
16592e75 a2a7e750

+12
+6
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12.c
··· 351 351 352 352 m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT; 353 353 354 + /* Allow context switch so we don't cross-process starve with a massive 355 + * command buffer of long-running SDMA commands 356 + * sdmax_rlcx_ib_cntl represent SDMA_QUEUE0_IB_CNTL register 357 + */ 358 + m->sdmax_rlcx_ib_cntl |= SDMA0_QUEUE0_IB_CNTL__SWITCH_INSIDE_IB_MASK; 359 + 354 360 q->is_active = QUEUE_IS_ACTIVE(*q); 355 361 } 356 362
+6
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v12_1.c
··· 363 363 364 364 m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT; 365 365 366 + /* Allow context switch so we don't cross-process starve with a massive 367 + * command buffer of long-running SDMA commands 368 + * sdmax_rlcx_ib_cntl represent SDMA_QUEUE0_IB_CNTL register 369 + */ 370 + m->sdmax_rlcx_ib_cntl |= SDMA0_SDMA_QUEUE0_IB_CNTL__SWITCH_INSIDE_IB_MASK; 371 + 366 372 q->is_active = QUEUE_IS_ACTIVE(*q); 367 373 } 368 374