Skip to content

Commit 3a9f6bd

Browse files
committed
Merge tag 'amd-drm-fixes-6.18-2025-10-29' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.18-2025-10-29: amdgpu: - VPE idle handler fix - Re-enable DM idle optimizations - DCN3.0 fix - SMU fix - Powerplay fixes for fiji/iceland - License fixes - HDP eDP panel fix - Vblank fix radeon: - devm migration fixes Signed-off-by: Simona Vetter <[email protected]> From: Alex Deucher <[email protected]> Link: https://patch.msgid.link/[email protected]
2 parents ef54548 + b3656b3 commit 3a9f6bd

File tree

14 files changed

+61
-40
lines changed

14 files changed

+61
-40
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: MIT
22
/*
33
* Copyright 2025 Advanced Micro Devices, Inc.
44
*

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
/* SPDX-License-Identifier: MIT */
22
/*
33
* Copyright 2025 Advanced Micro Devices, Inc.
44
*

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

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -322,18 +322,44 @@ static int vpe_early_init(struct amdgpu_ip_block *ip_block)
322322
return 0;
323323
}
324324

325+
static bool vpe_need_dpm0_at_power_down(struct amdgpu_device *adev)
326+
{
327+
switch (amdgpu_ip_version(adev, VPE_HWIP, 0)) {
328+
case IP_VERSION(6, 1, 1):
329+
return adev->pm.fw_version < 0x0a640500;
330+
default:
331+
return false;
332+
}
333+
}
334+
335+
static int vpe_get_dpm_level(struct amdgpu_device *adev)
336+
{
337+
struct amdgpu_vpe *vpe = &adev->vpe;
338+
339+
if (!adev->pm.dpm_enabled)
340+
return 0;
341+
342+
return RREG32(vpe_get_reg_offset(vpe, 0, vpe->regs.dpm_request_lv));
343+
}
344+
325345
static void vpe_idle_work_handler(struct work_struct *work)
326346
{
327347
struct amdgpu_device *adev =
328348
container_of(work, struct amdgpu_device, vpe.idle_work.work);
329349
unsigned int fences = 0;
330350

331351
fences += amdgpu_fence_count_emitted(&adev->vpe.ring);
352+
if (fences)
353+
goto reschedule;
332354

333-
if (fences == 0)
334-
amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VPE, AMD_PG_STATE_GATE);
335-
else
336-
schedule_delayed_work(&adev->vpe.idle_work, VPE_IDLE_TIMEOUT);
355+
if (vpe_need_dpm0_at_power_down(adev) && vpe_get_dpm_level(adev) != 0)
356+
goto reschedule;
357+
358+
amdgpu_device_ip_set_powergating_state(adev, AMD_IP_BLOCK_TYPE_VPE, AMD_PG_STATE_GATE);
359+
return;
360+
361+
reschedule:
362+
schedule_delayed_work(&adev->vpe.idle_work, VPE_IDLE_TIMEOUT);
337363
}
338364

339365
static int vpe_common_init(struct amdgpu_vpe *vpe)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// SPDX-License-Identifier: GPL-2.0
1+
// SPDX-License-Identifier: MIT
22
/*
33
* Copyright 2018 Advanced Micro Devices, Inc.
44
*

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,8 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
248248
struct vblank_control_work *vblank_work =
249249
container_of(work, struct vblank_control_work, work);
250250
struct amdgpu_display_manager *dm = vblank_work->dm;
251+
struct amdgpu_device *adev = drm_to_adev(dm->ddev);
252+
int r;
251253

252254
mutex_lock(&dm->dc_lock);
253255

@@ -277,7 +279,16 @@ static void amdgpu_dm_crtc_vblank_control_worker(struct work_struct *work)
277279

278280
if (dm->active_vblank_irq_count == 0) {
279281
dc_post_update_surfaces_to_stream(dm->dc);
282+
283+
r = amdgpu_dpm_pause_power_profile(adev, true);
284+
if (r)
285+
dev_warn(adev->dev, "failed to set default power profile mode\n");
286+
280287
dc_allow_idle_optimizations(dm->dc, true);
288+
289+
r = amdgpu_dpm_pause_power_profile(adev, false);
290+
if (r)
291+
dev_warn(adev->dev, "failed to restore the power profile mode\n");
281292
}
282293

283294
mutex_unlock(&dm->dc_lock);
@@ -297,8 +308,12 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
297308
int irq_type;
298309
int rc = 0;
299310

300-
if (acrtc->otg_inst == -1)
301-
goto skip;
311+
if (enable && !acrtc->base.enabled) {
312+
drm_dbg_vbl(crtc->dev,
313+
"Reject vblank enable on unconfigured CRTC %d (enabled=%d)\n",
314+
acrtc->crtc_id, acrtc->base.enabled);
315+
return -EINVAL;
316+
}
302317

303318
irq_type = amdgpu_display_crtc_idx_to_irq_type(adev, acrtc->crtc_id);
304319

@@ -383,7 +398,7 @@ static inline int amdgpu_dm_crtc_set_vblank(struct drm_crtc *crtc, bool enable)
383398
return rc;
384399
}
385400
#endif
386-
skip:
401+
387402
if (amdgpu_in_reset(adev))
388403
return 0;
389404

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_helpers.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ static void apply_edid_quirks(struct drm_device *dev, struct edid *edid, struct
8383
edid_caps->panel_patch.remove_sink_ext_caps = true;
8484
break;
8585
case drm_edid_encode_panel_id('S', 'D', 'C', 0x4154):
86+
case drm_edid_encode_panel_id('S', 'D', 'C', 0x4171):
8687
drm_dbg_driver(dev, "Disabling VSC on monitor with panel id %X\n", panel_id);
8788
edid_caps->panel_patch.disable_colorimetry = true;
8889
break;

drivers/gpu/drm/amd/display/dc/dpp/dcn30/dcn30_dpp.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -578,9 +578,6 @@ static void dpp3_power_on_blnd_lut(
578578
dpp_base->ctx->dc->optimized_required = true;
579579
dpp_base->deferred_reg_writes.bits.disable_blnd_lut = true;
580580
}
581-
} else {
582-
REG_SET(CM_MEM_PWR_CTRL, 0,
583-
BLNDGAM_MEM_PWR_FORCE, power_on == true ? 0 : 1);
584581
}
585582
}
586583

drivers/gpu/drm/amd/include/amd_cper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
/* SPDX-License-Identifier: MIT */
22
/*
33
* Copyright 2025 Advanced Micro Devices, Inc.
44
*

drivers/gpu/drm/amd/include/ivsrcid/vcn/irqsrcs_vcn_5_0.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* SPDX-License-Identifier: GPL-2.0 */
1+
/* SPDX-License-Identifier: MIT */
22

33
/*
44
* Copyright 2024 Advanced Micro Devices, Inc. All rights reserved.

drivers/gpu/drm/amd/pm/powerplay/smumgr/fiji_smumgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2024,7 +2024,7 @@ static int fiji_init_smc_table(struct pp_hwmgr *hwmgr)
20242024
table->VoltageResponseTime = 0;
20252025
table->PhaseResponseTime = 0;
20262026
table->MemoryThermThrottleEnable = 1;
2027-
table->PCIeBootLinkLevel = 0; /* 0:Gen1 1:Gen2 2:Gen3*/
2027+
table->PCIeBootLinkLevel = (uint8_t) (data->dpm_table.pcie_speed_table.count);
20282028
table->PCIeGenInterval = 1;
20292029
table->VRConfig = 0;
20302030

0 commit comments

Comments
 (0)