Skip to content

Commit a13d91b

Browse files
Jack Xiaoalexdeucher
authored andcommitted
drm/amdgpu/mes12: load unified mes fw on pipe0 and pipe1
Enable unified mes firmware to load on pipe0 and pipe1. Signed-off-by: Jack Xiao <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]> (cherry picked from commit e69c2dd)
1 parent 2029b3d commit a13d91b

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_mes.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1501,7 +1501,7 @@ int amdgpu_mes_init_microcode(struct amdgpu_device *adev, int pipe)
15011501

15021502
amdgpu_ucode_ip_version_decode(adev, GC_HWIP, ucode_prefix,
15031503
sizeof(ucode_prefix));
1504-
if (adev->enable_uni_mes && pipe == AMDGPU_MES_SCHED_PIPE) {
1504+
if (adev->enable_uni_mes) {
15051505
snprintf(fw_name, sizeof(fw_name),
15061506
"amdgpu/%s_uni_mes.bin", ucode_prefix);
15071507
} else if (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(11, 0, 0) &&

drivers/gpu/drm/amd/amdgpu/mes_v12_0.c

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -744,16 +744,11 @@ static void mes_v12_0_enable(struct amdgpu_device *adev, bool enable)
744744
if (enable) {
745745
data = RREG32_SOC15(GC, 0, regCP_MES_CNTL);
746746
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE0_RESET, 1);
747-
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE1_RESET,
748-
(!adev->enable_uni_mes && adev->enable_mes_kiq) ? 1 : 0);
747+
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE1_RESET, 1);
749748
WREG32_SOC15(GC, 0, regCP_MES_CNTL, data);
750749

751750
mutex_lock(&adev->srbm_mutex);
752751
for (pipe = 0; pipe < AMDGPU_MAX_MES_PIPES; pipe++) {
753-
if ((!adev->enable_mes_kiq || adev->enable_uni_mes) &&
754-
pipe == AMDGPU_MES_KIQ_PIPE)
755-
continue;
756-
757752
soc21_grbm_select(adev, 3, pipe, 0, 0);
758753

759754
ucode_addr = adev->mes.uc_start_addr[pipe] >> 2;
@@ -767,8 +762,7 @@ static void mes_v12_0_enable(struct amdgpu_device *adev, bool enable)
767762

768763
/* unhalt MES and activate pipe0 */
769764
data = REG_SET_FIELD(0, CP_MES_CNTL, MES_PIPE0_ACTIVE, 1);
770-
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE1_ACTIVE,
771-
(!adev->enable_uni_mes && adev->enable_mes_kiq) ? 1 : 0);
765+
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE1_ACTIVE, 1);
772766
WREG32_SOC15(GC, 0, regCP_MES_CNTL, data);
773767

774768
if (amdgpu_emu_mode)
@@ -784,8 +778,7 @@ static void mes_v12_0_enable(struct amdgpu_device *adev, bool enable)
784778
data = REG_SET_FIELD(data, CP_MES_CNTL,
785779
MES_INVALIDATE_ICACHE, 1);
786780
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE0_RESET, 1);
787-
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE1_RESET,
788-
(!adev->enable_uni_mes && adev->enable_mes_kiq) ? 1 : 0);
781+
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_PIPE1_RESET, 1);
789782
data = REG_SET_FIELD(data, CP_MES_CNTL, MES_HALT, 1);
790783
WREG32_SOC15(GC, 0, regCP_MES_CNTL, data);
791784
}
@@ -800,10 +793,6 @@ static void mes_v12_0_set_ucode_start_addr(struct amdgpu_device *adev)
800793

801794
mutex_lock(&adev->srbm_mutex);
802795
for (pipe = 0; pipe < AMDGPU_MAX_MES_PIPES; pipe++) {
803-
if ((!adev->enable_mes_kiq || adev->enable_uni_mes) &&
804-
pipe == AMDGPU_MES_KIQ_PIPE)
805-
continue;
806-
807796
/* me=3, queue=0 */
808797
soc21_grbm_select(adev, 3, pipe, 0, 0);
809798

@@ -1525,17 +1514,7 @@ static int mes_v12_0_early_init(void *handle)
15251514
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
15261515
int pipe, r;
15271516

1528-
if (adev->enable_uni_mes) {
1529-
r = amdgpu_mes_init_microcode(adev, AMDGPU_MES_SCHED_PIPE);
1530-
if (!r)
1531-
return 0;
1532-
1533-
adev->enable_uni_mes = false;
1534-
}
1535-
15361517
for (pipe = 0; pipe < AMDGPU_MAX_MES_PIPES; pipe++) {
1537-
if (!adev->enable_mes_kiq && pipe == AMDGPU_MES_KIQ_PIPE)
1538-
continue;
15391518
r = amdgpu_mes_init_microcode(adev, pipe);
15401519
if (r)
15411520
return r;

0 commit comments

Comments
 (0)