Skip to content

Commit e54478f

Browse files
committed
Merge tag 'amd-drm-next-6.8-2024-01-05' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.8-2024-01-05: amdgpu: - VRR fixes - PSR-SU fixes - SubVP fixes - DCN 3.5 fixes - Documentation updates - DMCUB fixes - DML2 fixes - UMC 12.0 updates - GPUVM fix - Misc code cleanups and whitespace cleanups - DP MST fix - Let KFD sync with GPUVM fences - GFX11 reset fix - SMU 13.0.6 fixes - VSC fix for DP/eDP - Navi12 display fix - RN/CZN system aperture fix - DCN 2.1 bandwidth validation fix - DCN INIT cleanup amdkfd: - SVM fixes - Revert TBA/TMA location change Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240105220522.4976-1-alexander.deucher@amd.com
2 parents 3c064ae + 754d349 commit e54478f

File tree

198 files changed

+4093
-2111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+4093
-2111
lines changed

Documentation/gpu/amdgpu/apu-asic-info-table.csv

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ SteamDeck, VANGOGH, DCN 3.0.1, 10.3.1, VCN 3.1.0, 5.2.1, 11.5.0
77
Ryzen 5000 series / Ryzen 7x30 series, GREEN SARDINE / Cezanne / Barcelo / Barcelo-R, DCN 2.1, 9.3, VCN 2.2, 4.1.1, 12.0.1
88
Ryzen 6000 series / Ryzen 7x35 series / Ryzen 7x36 series, YELLOW CARP / Rembrandt / Rembrandt-R, 3.1.2, 10.3.3, VCN 3.1.1, 5.2.3, 13.0.3
99
Ryzen 7000 series (AM5), Raphael, 3.1.5, 10.3.6, 3.1.2, 5.2.6, 13.0.5
10-
Ryzen 7x45 series (FL1), / Dragon Range, 3.1.5, 10.3.6, 3.1.2, 5.2.6, 13.0.5
10+
Ryzen 7x45 series (FL1), Dragon Range, 3.1.5, 10.3.6, 3.1.2, 5.2.6, 13.0.5
1111
Ryzen 7x20 series, Mendocino, 3.1.6, 10.3.7, 3.1.1, 5.2.7, 13.0.8
12-
Ryzen 7x40 series, Phoenix, 3.1.4, 11.0.1 / 11.0.4, 4.0.2, 6.0.1, 13.0.4 / 13.0.11
12+
Ryzen 7x40 series, Phoenix, 3.1.4, 11.0.1 / 11.0.4, 4.0.2, 6.0.1, 13.0.4 / 13.0.11
13+
Ryzen 8x40 series, Hawk Point, 3.1.4, 11.0.1 / 11.0.4, 4.0.2, 6.0.1, 13.0.4 / 13.0.11

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

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ aldebaran_mode2_restore_hwcontext(struct amdgpu_reset_control *reset_ctl,
330330
{
331331
struct list_head *reset_device_list = reset_context->reset_device_list;
332332
struct amdgpu_device *tmp_adev = NULL;
333+
struct amdgpu_ras *con;
333334
int r;
334335

335336
if (reset_device_list == NULL)
@@ -355,7 +356,30 @@ aldebaran_mode2_restore_hwcontext(struct amdgpu_reset_control *reset_ctl,
355356
*/
356357
amdgpu_register_gpu_instance(tmp_adev);
357358

358-
/* Resume RAS */
359+
/* Resume RAS, ecc_irq */
360+
con = amdgpu_ras_get_context(tmp_adev);
361+
if (!amdgpu_sriov_vf(tmp_adev) && con) {
362+
if (tmp_adev->sdma.ras &&
363+
tmp_adev->sdma.ras->ras_block.ras_late_init) {
364+
r = tmp_adev->sdma.ras->ras_block.ras_late_init(tmp_adev,
365+
&tmp_adev->sdma.ras->ras_block.ras_comm);
366+
if (r) {
367+
dev_err(tmp_adev->dev, "SDMA failed to execute ras_late_init! ret:%d\n", r);
368+
goto end;
369+
}
370+
}
371+
372+
if (tmp_adev->gfx.ras &&
373+
tmp_adev->gfx.ras->ras_block.ras_late_init) {
374+
r = tmp_adev->gfx.ras->ras_block.ras_late_init(tmp_adev,
375+
&tmp_adev->gfx.ras->ras_block.ras_comm);
376+
if (r) {
377+
dev_err(tmp_adev->dev, "GFX failed to execute ras_late_init! ret:%d\n", r);
378+
goto end;
379+
}
380+
}
381+
}
382+
359383
amdgpu_ras_resume(tmp_adev);
360384

361385
/* Update PSP FW topology after reset */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@ extern int amdgpu_agp;
254254

255255
extern int amdgpu_wbrf;
256256

257+
extern int fw_bo_location;
258+
257259
#define AMDGPU_VM_MAX_NUM_CTX 4096
258260
#define AMDGPU_SG_THRESHOLD (256*1024*1024)
259261
#define AMDGPU_WAIT_IDLE_TIMEOUT_IN_MS 3000

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ struct amdgpu_amdkfd_fence *to_amdgpu_amdkfd_fence(struct dma_fence *f)
9090
return NULL;
9191

9292
fence = container_of(f, struct amdgpu_amdkfd_fence, base);
93-
if (fence && f->ops == &amdkfd_fence_ops)
93+
if (f->ops == &amdkfd_fence_ops)
9494
return fence;
9595

9696
return NULL;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
11031103
* DDC line. The latter is more complex because with DVI<->HDMI adapters
11041104
* you don't really know what's connected to which port as both are digital.
11051105
*/
1106-
amdgpu_connector_shared_ddc(&ret, connector, amdgpu_connector);
1106+
amdgpu_connector_shared_ddc(&ret, connector, amdgpu_connector);
11071107
}
11081108
}
11091109

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -870,9 +870,9 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
870870
struct amdgpu_bo *bo = e->bo;
871871
int i;
872872

873-
e->user_pages = kvmalloc_array(bo->tbo.ttm->num_pages,
874-
sizeof(struct page *),
875-
GFP_KERNEL | __GFP_ZERO);
873+
e->user_pages = kvcalloc(bo->tbo.ttm->num_pages,
874+
sizeof(struct page *),
875+
GFP_KERNEL);
876876
if (!e->user_pages) {
877877
DRM_ERROR("kvmalloc_array failure\n");
878878
r = -ENOMEM;

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,11 @@ static ssize_t amdgpu_debugfs_regs_pcie_read(struct file *f, char __user *buf,
540540
while (size) {
541541
uint32_t value;
542542

543-
value = RREG32_PCIE(*pos);
543+
if (upper_32_bits(*pos))
544+
value = RREG32_PCIE_EXT(*pos);
545+
else
546+
value = RREG32_PCIE(*pos);
547+
544548
r = put_user(value, (uint32_t *)buf);
545549
if (r)
546550
goto out;
@@ -600,7 +604,10 @@ static ssize_t amdgpu_debugfs_regs_pcie_write(struct file *f, const char __user
600604
if (r)
601605
goto out;
602606

603-
WREG32_PCIE(*pos, value);
607+
if (upper_32_bits(*pos))
608+
WREG32_PCIE_EXT(*pos, value);
609+
else
610+
WREG32_PCIE(*pos, value);
604611

605612
result += 4;
606613
buf += 4;

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

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,15 +2251,8 @@ static int amdgpu_device_parse_gpu_info_fw(struct amdgpu_device *adev)
22512251

22522252
adev->firmware.gpu_info_fw = NULL;
22532253

2254-
if (adev->mman.discovery_bin) {
2255-
/*
2256-
* FIXME: The bounding box is still needed by Navi12, so
2257-
* temporarily read it from gpu_info firmware. Should be dropped
2258-
* when DAL no longer needs it.
2259-
*/
2260-
if (adev->asic_type != CHIP_NAVI12)
2261-
return 0;
2262-
}
2254+
if (adev->mman.discovery_bin)
2255+
return 0;
22632256

22642257
switch (adev->asic_type) {
22652258
default:

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ int amdgpu_seamless = -1; /* auto */
210210
uint amdgpu_debug_mask;
211211
int amdgpu_agp = -1; /* auto */
212212
int amdgpu_wbrf = -1;
213+
int fw_bo_location = -1;
213214

214215
static void amdgpu_drv_delayed_reset_work_handler(struct work_struct *work);
215216

@@ -989,6 +990,10 @@ MODULE_PARM_DESC(wbrf,
989990
"Enable Wifi RFI interference mitigation (0 = disabled, 1 = enabled, -1 = auto(default)");
990991
module_param_named(wbrf, amdgpu_wbrf, int, 0444);
991992

993+
MODULE_PARM_DESC(fw_bo_location,
994+
"location to put firmware bo for frontdoor loading (-1 = auto (default), 0 = on ram, 1 = on vram");
995+
module_param(fw_bo_location, int, 0644);
996+
992997
/* These devices are not supported by amdgpu.
993998
* They are supported by the mach64, r128, radeon drivers
994999
*/

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@ static void amdgpu_mca_smu_mca_bank_dump(struct amdgpu_device *adev, int idx, st
218218
int amdgpu_mca_smu_log_ras_error(struct amdgpu_device *adev, enum amdgpu_ras_block blk, enum amdgpu_mca_error_type type, struct ras_err_data *err_data)
219219
{
220220
struct amdgpu_smuio_mcm_config_info mcm_info;
221+
struct ras_err_addr err_addr = {0};
221222
struct mca_bank_set mca_set;
222223
struct mca_bank_node *node;
223224
struct mca_bank_entry *entry;
@@ -246,10 +247,18 @@ int amdgpu_mca_smu_log_ras_error(struct amdgpu_device *adev, enum amdgpu_ras_blo
246247
mcm_info.socket_id = entry->info.socket_id;
247248
mcm_info.die_id = entry->info.aid;
248249

250+
if (blk == AMDGPU_RAS_BLOCK__UMC) {
251+
err_addr.err_status = entry->regs[MCA_REG_IDX_STATUS];
252+
err_addr.err_ipid = entry->regs[MCA_REG_IDX_IPID];
253+
err_addr.err_addr = entry->regs[MCA_REG_IDX_ADDR];
254+
}
255+
249256
if (type == AMDGPU_MCA_ERROR_TYPE_UE)
250-
amdgpu_ras_error_statistic_ue_count(err_data, &mcm_info, (uint64_t)count);
257+
amdgpu_ras_error_statistic_ue_count(err_data,
258+
&mcm_info, &err_addr, (uint64_t)count);
251259
else
252-
amdgpu_ras_error_statistic_ce_count(err_data, &mcm_info, (uint64_t)count);
260+
amdgpu_ras_error_statistic_ce_count(err_data,
261+
&mcm_info, &err_addr, (uint64_t)count);
253262
}
254263

255264
out_mca_release:
@@ -351,6 +360,9 @@ int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev, enum amdgpu_mca_err
351360
const struct amdgpu_mca_smu_funcs *mca_funcs = adev->mca.mca_funcs;
352361
int count;
353362

363+
if (!mca_funcs || !mca_funcs->mca_get_mca_entry)
364+
return -EOPNOTSUPP;
365+
354366
switch (type) {
355367
case AMDGPU_MCA_ERROR_TYPE_UE:
356368
count = mca_funcs->max_ue_count;
@@ -365,10 +377,7 @@ int amdgpu_mca_smu_get_mca_entry(struct amdgpu_device *adev, enum amdgpu_mca_err
365377
if (idx >= count)
366378
return -EINVAL;
367379

368-
if (mca_funcs && mca_funcs->mca_get_mca_entry)
369-
return mca_funcs->mca_get_mca_entry(adev, type, idx, entry);
370-
371-
return -EOPNOTSUPP;
380+
return mca_funcs->mca_get_mca_entry(adev, type, idx, entry);
372381
}
373382

374383
#if defined(CONFIG_DEBUG_FS)

0 commit comments

Comments
 (0)