Commit 16592e75 authored by Gang Ba's avatar Gang Ba Committed by Alex Deucher
Browse files

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: default avatarGang Ba <Gang.Ba@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a2a7e750
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -351,6 +351,12 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,

	m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;

	/* Allow context switch so we don't cross-process starve with a massive
	* command buffer of long-running SDMA commands
	* sdmax_rlcx_ib_cntl represent SDMA_QUEUE0_IB_CNTL register
	*/
	m->sdmax_rlcx_ib_cntl |= SDMA0_QUEUE0_IB_CNTL__SWITCH_INSIDE_IB_MASK;

	q->is_active = QUEUE_IS_ACTIVE(*q);
}

+6 −0
Original line number Diff line number Diff line
@@ -363,6 +363,12 @@ static void update_mqd_sdma(struct mqd_manager *mm, void *mqd,

	m->sdmax_rlcx_dummy_reg = SDMA_RLC_DUMMY_DEFAULT;

	/* Allow context switch so we don't cross-process starve with a massive
	* command buffer of long-running SDMA commands
	* sdmax_rlcx_ib_cntl represent SDMA_QUEUE0_IB_CNTL register
	*/
	m->sdmax_rlcx_ib_cntl |= SDMA0_SDMA_QUEUE0_IB_CNTL__SWITCH_INSIDE_IB_MASK;

	q->is_active = QUEUE_IS_ACTIVE(*q);
}