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: revision doorbel range for gfx v12_1

Revision doorbell range on muti-XCC mode for gfx v12_1.
Clean up doorbell range set for graphics engine.
V2: Remove doorbell range set from gfx_v12_1_xcc_kiq_init_register.

Signed-off-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Likun Gao and committed by
Alex Deucher
c90ed181 cf356fe1

+6 -16
+6 -16
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
··· 1998 1998 static void gfx_v12_1_xcc_cp_set_doorbell_range(struct amdgpu_device *adev, 1999 1999 int xcc_id) 2000 2000 { 2001 - /* set graphics engine doorbell range */ 2002 - WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_RB_DOORBELL_RANGE_LOWER, 2003 - (adev->doorbell_index.gfx_ring0 * 2) << 2); 2004 - WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_RB_DOORBELL_RANGE_UPPER, 2005 - (adev->doorbell_index.gfx_userqueue_end * 2) << 2); 2006 - 2007 2001 /* set compute engine doorbell range */ 2008 2002 WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_MEC_DOORBELL_RANGE_LOWER, 2009 - (adev->doorbell_index.kiq * 2) << 2); 2003 + ((adev->doorbell_index.kiq + 2004 + xcc_id * adev->doorbell_index.xcc_doorbell_range) * 2005 + 2) << 2); 2010 2006 WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_MEC_DOORBELL_RANGE_UPPER, 2011 - (adev->doorbell_index.userqueue_end * 2) << 2); 2007 + ((adev->doorbell_index.userqueue_end + 2008 + xcc_id * adev->doorbell_index.xcc_doorbell_range) * 2009 + 2) << 2); 2012 2010 } 2013 2011 2014 2012 static int gfx_v12_1_compute_mqd_init(struct amdgpu_device *adev, void *m, ··· 2215 2217 mqd->cp_hqd_pq_wptr_poll_addr_lo); 2216 2218 WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_WPTR_POLL_ADDR_HI, 2217 2219 mqd->cp_hqd_pq_wptr_poll_addr_hi); 2218 - 2219 - /* enable the doorbell if requested */ 2220 - if (ring->use_doorbell) { 2221 - WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_MEC_DOORBELL_RANGE_LOWER, 2222 - (adev->doorbell_index.kiq * 2) << 2); 2223 - WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_MEC_DOORBELL_RANGE_UPPER, 2224 - (adev->doorbell_index.userqueue_end * 2) << 2); 2225 - } 2226 2220 2227 2221 WREG32_SOC15(GC, GET_INST(GC, xcc_id), regCP_HQD_PQ_DOORBELL_CONTROL, 2228 2222 mqd->cp_hqd_pq_doorbell_control);