Skip to content

Commit 13aa38f

Browse files
committed
Merge tag 'amd-drm-fixes-6.4-2023-05-24' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.4-2023-05-24: amdgpu: - Fix missing BO unlocking in KIQ error path - Avoid spurious secure display error messages - SMU13 fix - Fix an OD regression - GPU reset display IRQ warning fix - MST fix radeon: - Fix a DP regression Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230524211238.7749-1-alexander.deucher@amd.com
2 parents 94d39d0 + 482e6ad commit 13aa38f

8 files changed

Lines changed: 47 additions & 33 deletions

File tree

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6892,8 +6892,10 @@ static int gfx_v10_0_kiq_resume(struct amdgpu_device *adev)
68926892
return r;
68936893

68946894
r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
6895-
if (unlikely(r != 0))
6895+
if (unlikely(r != 0)) {
6896+
amdgpu_bo_unreserve(ring->mqd_obj);
68966897
return r;
6898+
}
68976899

68986900
gfx_v10_0_kiq_init_queue(ring);
68996901
amdgpu_bo_kunmap(ring->mqd_obj);

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3617,8 +3617,10 @@ static int gfx_v9_0_kiq_resume(struct amdgpu_device *adev)
36173617
return r;
36183618

36193619
r = amdgpu_bo_kmap(ring->mqd_obj, (void **)&ring->mqd_ptr);
3620-
if (unlikely(r != 0))
3620+
if (unlikely(r != 0)) {
3621+
amdgpu_bo_unreserve(ring->mqd_obj);
36213622
return r;
3623+
}
36223624

36233625
gfx_v9_0_kiq_init_queue(ring);
36243626
amdgpu_bo_kunmap(ring->mqd_obj);

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,13 @@ static int psp_v10_0_init_microcode(struct psp_context *psp)
5757
if (err)
5858
return err;
5959

60-
return psp_init_ta_microcode(psp, ucode_prefix);
60+
err = psp_init_ta_microcode(psp, ucode_prefix);
61+
if ((adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 1, 0)) &&
62+
(adev->pdev->revision == 0xa1) &&
63+
(psp->securedisplay_context.context.bin_desc.fw_version >= 0x27000008)) {
64+
adev->psp.securedisplay_context.context.bin_desc.size_bytes = 0;
65+
}
66+
return err;
6167
}
6268

6369
static int psp_v10_0_ring_create(struct psp_context *psp,

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

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2479,20 +2479,25 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
24792479
if (acrtc && state->stream_status[i].plane_count != 0) {
24802480
irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
24812481
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
2482-
DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
2483-
acrtc->crtc_id, enable ? "en" : "dis", rc);
24842482
if (rc)
24852483
DRM_WARN("Failed to %s pflip interrupts\n",
24862484
enable ? "enable" : "disable");
24872485

24882486
if (enable) {
2489-
rc = amdgpu_dm_crtc_enable_vblank(&acrtc->base);
2490-
if (rc)
2491-
DRM_WARN("Failed to enable vblank interrupts\n");
2492-
} else {
2493-
amdgpu_dm_crtc_disable_vblank(&acrtc->base);
2494-
}
2487+
if (amdgpu_dm_crtc_vrr_active(to_dm_crtc_state(acrtc->base.state)))
2488+
rc = amdgpu_dm_crtc_set_vupdate_irq(&acrtc->base, true);
2489+
} else
2490+
rc = amdgpu_dm_crtc_set_vupdate_irq(&acrtc->base, false);
24952491

2492+
if (rc)
2493+
DRM_WARN("Failed to %sable vupdate interrupt\n", enable ? "en" : "dis");
2494+
2495+
irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
2496+
/* During gpu-reset we disable and then enable vblank irq, so
2497+
* don't use amdgpu_irq_get/put() to avoid refcount change.
2498+
*/
2499+
if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
2500+
DRM_WARN("Failed to %sable vblank interrupt\n", enable ? "en" : "dis");
24962501
}
24972502
}
24982503

@@ -2852,7 +2857,7 @@ static int dm_resume(void *handle)
28522857
* this is the case when traversing through already created
28532858
* MST connectors, should be skipped
28542859
*/
2855-
if (aconnector->dc_link->type == dc_connection_mst_branch)
2860+
if (aconnector && aconnector->mst_root)
28562861
continue;
28572862

28582863
mutex_lock(&aconnector->hpd_lock);
@@ -6737,7 +6742,7 @@ static int dm_encoder_helper_atomic_check(struct drm_encoder *encoder,
67376742
int clock, bpp = 0;
67386743
bool is_y420 = false;
67396744

6740-
if (!aconnector->mst_output_port || !aconnector->dc_sink)
6745+
if (!aconnector->mst_output_port)
67416746
return 0;
67426747

67436748
mst_port = aconnector->mst_output_port;

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

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ static void vblank_control_worker(struct work_struct *work)
146146

147147
static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
148148
{
149-
enum dc_irq_source irq_source;
150149
struct amdgpu_crtc *acrtc = to_amdgpu_crtc(crtc);
151150
struct amdgpu_device *adev = drm_to_adev(crtc->dev);
152151
struct dm_crtc_state *acrtc_state = to_dm_crtc_state(crtc->state);
@@ -169,18 +168,9 @@ static inline int dm_set_vblank(struct drm_crtc *crtc, bool enable)
169168
if (rc)
170169
return rc;
171170

172-
if (amdgpu_in_reset(adev)) {
173-
irq_source = IRQ_TYPE_VBLANK + acrtc->otg_inst;
174-
/* During gpu-reset we disable and then enable vblank irq, so
175-
* don't use amdgpu_irq_get/put() to avoid refcount change.
176-
*/
177-
if (!dc_interrupt_set(adev->dm.dc, irq_source, enable))
178-
rc = -EBUSY;
179-
} else {
180-
rc = (enable)
181-
? amdgpu_irq_get(adev, &adev->crtc_irq, acrtc->crtc_id)
182-
: amdgpu_irq_put(adev, &adev->crtc_irq, acrtc->crtc_id);
183-
}
171+
rc = (enable)
172+
? amdgpu_irq_get(adev, &adev->crtc_irq, acrtc->crtc_id)
173+
: amdgpu_irq_put(adev, &adev->crtc_irq, acrtc->crtc_id);
184174

185175
if (rc)
186176
return rc;

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -871,13 +871,11 @@ static ssize_t amdgpu_get_pp_od_clk_voltage(struct device *dev,
871871
}
872872
if (ret == -ENOENT) {
873873
size = amdgpu_dpm_print_clock_levels(adev, OD_SCLK, buf);
874-
if (size > 0) {
875-
size += amdgpu_dpm_print_clock_levels(adev, OD_MCLK, buf + size);
876-
size += amdgpu_dpm_print_clock_levels(adev, OD_VDDC_CURVE, buf + size);
877-
size += amdgpu_dpm_print_clock_levels(adev, OD_VDDGFX_OFFSET, buf + size);
878-
size += amdgpu_dpm_print_clock_levels(adev, OD_RANGE, buf + size);
879-
size += amdgpu_dpm_print_clock_levels(adev, OD_CCLK, buf + size);
880-
}
874+
size += amdgpu_dpm_print_clock_levels(adev, OD_MCLK, buf + size);
875+
size += amdgpu_dpm_print_clock_levels(adev, OD_VDDC_CURVE, buf + size);
876+
size += amdgpu_dpm_print_clock_levels(adev, OD_VDDGFX_OFFSET, buf + size);
877+
size += amdgpu_dpm_print_clock_levels(adev, OD_RANGE, buf + size);
878+
size += amdgpu_dpm_print_clock_levels(adev, OD_CCLK, buf + size);
881879
}
882880

883881
if (size == 0)

drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ static struct cmn2asic_msg_mapping smu_v13_0_7_message_map[SMU_MSG_MAX_COUNT] =
125125
MSG_MAP(ArmD3, PPSMC_MSG_ArmD3, 0),
126126
MSG_MAP(AllowGpo, PPSMC_MSG_SetGpoAllow, 0),
127127
MSG_MAP(GetPptLimit, PPSMC_MSG_GetPptLimit, 0),
128+
MSG_MAP(NotifyPowerSource, PPSMC_MSG_NotifyPowerSource, 0),
128129
};
129130

130131
static struct cmn2asic_mapping smu_v13_0_7_clk_map[SMU_CLK_COUNT] = {

drivers/gpu/drm/radeon/radeon_irq_kms.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ static void radeon_hotplug_work_func(struct work_struct *work)
9999

100100
static void radeon_dp_work_func(struct work_struct *work)
101101
{
102+
struct radeon_device *rdev = container_of(work, struct radeon_device,
103+
dp_work);
104+
struct drm_device *dev = rdev->ddev;
105+
struct drm_mode_config *mode_config = &dev->mode_config;
106+
struct drm_connector *connector;
107+
108+
mutex_lock(&mode_config->mutex);
109+
list_for_each_entry(connector, &mode_config->connector_list, head)
110+
radeon_connector_hotplug(connector);
111+
mutex_unlock(&mode_config->mutex);
102112
}
103113

104114
/**

0 commit comments

Comments
 (0)