Skip to content

Commit c0ca543

Browse files
committed
Merge tag 'amd-drm-next-5.7-2020-03-26' of git://people.freedesktop.org/~agd5f/linux into drm-next
amd-drm-next-5.7-2020-03-26: amdgpu: - Remove a dpm quirk that is not necessary - Fix handling of AC/DC mode in newer SMU firmwares on navi - SR-IOV fixes - RAS fixes scheduler: - Fix a race condition radeon: - Remove a dpm quirk that is not necessary Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents c255623 + e862b08 commit c0ca543

21 files changed

+138
-49
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2742,6 +2742,9 @@ static void amdgpu_device_xgmi_reset_func(struct work_struct *__work)
27422742

27432743
if (adev->asic_reset_res)
27442744
goto fail;
2745+
2746+
if (adev->mmhub.funcs && adev->mmhub.funcs->reset_ras_error_count)
2747+
adev->mmhub.funcs->reset_ras_error_count(adev);
27452748
} else {
27462749

27472750
task_barrier_full(&hive->tb);
@@ -3910,8 +3913,15 @@ static int amdgpu_do_asic_reset(struct amdgpu_hive_info *hive,
39103913
}
39113914
}
39123915

3913-
if (!r && amdgpu_ras_intr_triggered())
3916+
if (!r && amdgpu_ras_intr_triggered()) {
3917+
list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) {
3918+
if (tmp_adev->mmhub.funcs &&
3919+
tmp_adev->mmhub.funcs->reset_ras_error_count)
3920+
tmp_adev->mmhub.funcs->reset_ras_error_count(tmp_adev);
3921+
}
3922+
39143923
amdgpu_ras_intr_cleared();
3924+
}
39153925

39163926
list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) {
39173927
if (need_full_reset) {

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev)
9292
if (adev->powerplay.pp_funcs->enable_bapm)
9393
amdgpu_dpm_enable_bapm(adev, adev->pm.ac_power);
9494
mutex_unlock(&adev->pm.mutex);
95+
96+
if (is_support_sw_smu(adev))
97+
smu_set_ac_dc(&adev->smu);
9598
}
9699
}
97100

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

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ static int psp_sw_fini(void *handle)
159159
adev->psp.sos_fw = NULL;
160160
release_firmware(adev->psp.asd_fw);
161161
adev->psp.asd_fw = NULL;
162-
if (adev->psp.cap_fw) {
163-
release_firmware(adev->psp.cap_fw);
164-
adev->psp.cap_fw = NULL;
165-
}
166162
if (adev->psp.ta_fw) {
167163
release_firmware(adev->psp.ta_fw);
168164
adev->psp.ta_fw = NULL;
@@ -250,7 +246,7 @@ psp_cmd_submit_buf(struct psp_context *psp,
250246
DRM_WARN("psp command (0x%X) failed and response status is (0x%X)\n",
251247
psp->cmd_buf_mem->cmd_id,
252248
psp->cmd_buf_mem->resp.status);
253-
if ((ucode->ucode_id == AMDGPU_UCODE_ID_CAP) || !timeout) {
249+
if (!timeout) {
254250
mutex_unlock(&psp->mutex);
255251
return -EINVAL;
256252
}
@@ -1192,9 +1188,6 @@ static int psp_get_fw_type(struct amdgpu_firmware_info *ucode,
11921188
enum psp_gfx_fw_type *type)
11931189
{
11941190
switch (ucode->ucode_id) {
1195-
case AMDGPU_UCODE_ID_CAP:
1196-
*type = GFX_FW_TYPE_CAP;
1197-
break;
11981191
case AMDGPU_UCODE_ID_SDMA0:
11991192
*type = GFX_FW_TYPE_SDMA0;
12001193
break;

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,6 @@ struct psp_context
252252
uint32_t asd_ucode_size;
253253
uint8_t *asd_start_addr;
254254

255-
/* cap firmware */
256-
const struct firmware *cap_fw;
257-
258255
/* fence buffer */
259256
struct amdgpu_bo *fence_buf_bo;
260257
uint64_t fence_buf_mc_addr;

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,11 @@ static ssize_t amdgpu_ras_debugfs_ctrl_write(struct file *f, const char __user *
281281
struct ras_debug_if data;
282282
int ret = 0;
283283

284+
if (amdgpu_ras_intr_triggered()) {
285+
DRM_WARN("RAS WARN: error injection currently inaccessible\n");
286+
return size;
287+
}
288+
284289
ret = amdgpu_ras_debugfs_ctrl_parse_data(f, buf, size, pos, &data);
285290
if (ret)
286291
return -EINVAL;
@@ -394,6 +399,10 @@ static ssize_t amdgpu_ras_sysfs_read(struct device *dev,
394399
.head = obj->head,
395400
};
396401

402+
if (amdgpu_ras_intr_triggered())
403+
return snprintf(buf, PAGE_SIZE,
404+
"Query currently inaccessible\n");
405+
397406
if (amdgpu_ras_error_query(obj->adev, &info))
398407
return -EINVAL;
399408

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,9 +1840,11 @@ int amdgpu_ttm_init(struct amdgpu_device *adev)
18401840
*The reserved vram for memory training must be pinned to the specified
18411841
*place on the VRAM, so reserve it early.
18421842
*/
1843-
r = amdgpu_ttm_training_reserve_vram_init(adev);
1844-
if (r)
1845-
return r;
1843+
if (!amdgpu_sriov_vf(adev)) {
1844+
r = amdgpu_ttm_training_reserve_vram_init(adev);
1845+
if (r)
1846+
return r;
1847+
}
18461848

18471849
/* allocate memory as required for VGA
18481850
* This is used for VGA emulation and pre-OS scanout buffers to

drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,7 @@ union amdgpu_firmware_header {
283283
* fw loading support
284284
*/
285285
enum AMDGPU_UCODE_ID {
286-
AMDGPU_UCODE_ID_CAP = 0, /* CAP must be the 1st fw to be loaded */
287-
AMDGPU_UCODE_ID_SDMA0,
286+
AMDGPU_UCODE_ID_SDMA0 = 0,
288287
AMDGPU_UCODE_ID_SDMA1,
289288
AMDGPU_UCODE_ID_SDMA2,
290289
AMDGPU_UCODE_ID_SDMA3,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1940,6 +1940,11 @@ static int gfx_v10_0_rlc_resume(struct amdgpu_device *adev)
19401940
if (!amdgpu_sriov_vf(adev)) /* enable RLC SRM */
19411941
gfx_v10_0_rlc_enable_srm(adev);
19421942
} else {
1943+
if (amdgpu_sriov_vf(adev)) {
1944+
gfx_v10_0_init_csb(adev);
1945+
return 0;
1946+
}
1947+
19431948
adev->gfx.rlc.funcs->stop(adev);
19441949

19451950
/* disable CG */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4306,7 +4306,7 @@ static const struct soc15_reg_entry vgpr_init_regs_arcturus[] = {
43064306
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_NUM_THREAD_X), 0x40 },
43074307
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_NUM_THREAD_Y), 4 },
43084308
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_NUM_THREAD_Z), 1 },
4309-
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_PGM_RSRC1), 0x81 },
4309+
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_PGM_RSRC1), 0xbf },
43104310
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_PGM_RSRC2), 0x400000 }, /* 64KB LDS */
43114311
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_STATIC_THREAD_MGMT_SE0), 0xffffffff },
43124312
{ SOC15_REG_ENTRY(GC, 0, mmCOMPUTE_STATIC_THREAD_MGMT_SE1), 0xffffffff },

drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ enum psp_gfx_fw_type {
246246
GFX_FW_TYPE_SDMA6 = 56, /* SDMA6 MI */
247247
GFX_FW_TYPE_SDMA7 = 57, /* SDMA7 MI */
248248
GFX_FW_TYPE_VCN1 = 58, /* VCN1 MI */
249-
GFX_FW_TYPE_CAP = 62, /* CAP_FW VG */
250249
GFX_FW_TYPE_MAX
251250
};
252251

0 commit comments

Comments
 (0)