mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
amd-drm-fixes-6.17-2025-09-03:
amdgpu: - UserQ fixes - MES 11 fix - eDP/LVDS fix - Fix non-DC audio clean up - Fix duplicate cursor issue - Fix error path in PSP init -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQQgO5Idg2tXNTSZAr293/aFa7yZ2AUCaLi85QAKCRC93/aFa7yZ 2CZkAQDUPPkCUgytEUWC2E5q6heaRIhyiOXCzbh+Yb7HfIXjYgD/aZKZn5XggKGp x5NguqbkRui11Swqn76HG6y0Avp6vAg= =fiOJ -----END PGP SIGNATURE----- Merge tag 'amd-drm-fixes-6.17-2025-09-03' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes amd-drm-fixes-6.17-2025-09-03: amdgpu: - UserQ fixes - MES 11 fix - eDP/LVDS fix - Fix non-DC audio clean up - Fix duplicate cursor issue - Fix error path in PSP init Signed-off-by: Dave Airlie <airlied@redhat.com> From: Alex Deucher <alexander.deucher@amd.com> Link: https://lore.kernel.org/r/20250903221656.251254-1-alexander.deucher@amd.com
This commit is contained in:
commit
8b556ddeee
|
|
@ -448,7 +448,7 @@ static int psp_sw_init(struct amdgpu_ip_block *ip_block)
|
|||
psp->cmd = kzalloc(sizeof(struct psp_gfx_cmd_resp), GFP_KERNEL);
|
||||
if (!psp->cmd) {
|
||||
dev_err(adev->dev, "Failed to allocate memory to command buffer!\n");
|
||||
ret = -ENOMEM;
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
adev->psp.xgmi_context.supports_extended_data =
|
||||
|
|
|
|||
|
|
@ -1462,17 +1462,12 @@ static int dce_v10_0_audio_init(struct amdgpu_device *adev)
|
|||
|
||||
static void dce_v10_0_audio_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!amdgpu_audio)
|
||||
return;
|
||||
|
||||
if (!adev->mode_info.audio.enabled)
|
||||
return;
|
||||
|
||||
for (i = 0; i < adev->mode_info.audio.num_pins; i++)
|
||||
dce_v10_0_audio_enable(adev, &adev->mode_info.audio.pin[i], false);
|
||||
|
||||
adev->mode_info.audio.enabled = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1511,17 +1511,12 @@ static int dce_v11_0_audio_init(struct amdgpu_device *adev)
|
|||
|
||||
static void dce_v11_0_audio_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!amdgpu_audio)
|
||||
return;
|
||||
|
||||
if (!adev->mode_info.audio.enabled)
|
||||
return;
|
||||
|
||||
for (i = 0; i < adev->mode_info.audio.num_pins; i++)
|
||||
dce_v11_0_audio_enable(adev, &adev->mode_info.audio.pin[i], false);
|
||||
|
||||
adev->mode_info.audio.enabled = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1451,17 +1451,12 @@ static int dce_v6_0_audio_init(struct amdgpu_device *adev)
|
|||
|
||||
static void dce_v6_0_audio_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!amdgpu_audio)
|
||||
return;
|
||||
|
||||
if (!adev->mode_info.audio.enabled)
|
||||
return;
|
||||
|
||||
for (i = 0; i < adev->mode_info.audio.num_pins; i++)
|
||||
dce_v6_0_audio_enable(adev, &adev->mode_info.audio.pin[i], false);
|
||||
|
||||
adev->mode_info.audio.enabled = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1443,17 +1443,12 @@ static int dce_v8_0_audio_init(struct amdgpu_device *adev)
|
|||
|
||||
static void dce_v8_0_audio_fini(struct amdgpu_device *adev)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!amdgpu_audio)
|
||||
return;
|
||||
|
||||
if (!adev->mode_info.audio.enabled)
|
||||
return;
|
||||
|
||||
for (i = 0; i < adev->mode_info.audio.num_pins; i++)
|
||||
dce_v8_0_audio_enable(adev, &adev->mode_info.audio.pin[i], false);
|
||||
|
||||
adev->mode_info.audio.enabled = false;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -641,8 +641,9 @@ static int mes_v11_0_misc_op(struct amdgpu_mes *mes,
|
|||
break;
|
||||
case MES_MISC_OP_CHANGE_CONFIG:
|
||||
if ((mes->adev->mes.sched_version & AMDGPU_MES_VERSION_MASK) < 0x63) {
|
||||
dev_err(mes->adev->dev, "MES FW version must be larger than 0x63 to support limit single process feature.\n");
|
||||
return -EINVAL;
|
||||
dev_warn_once(mes->adev->dev,
|
||||
"MES FW version must be larger than 0x63 to support limit single process feature.\n");
|
||||
return 0;
|
||||
}
|
||||
misc_pkt.opcode = MESAPI_MISC__CHANGE_CONFIG;
|
||||
misc_pkt.change_config.opcode =
|
||||
|
|
|
|||
|
|
@ -1377,7 +1377,7 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
|
|||
|
||||
switch (amdgpu_ip_version(adev, SDMA0_HWIP, 0)) {
|
||||
case IP_VERSION(6, 0, 0):
|
||||
if ((adev->sdma.instance[0].fw_version >= 24) && !adev->sdma.disable_uq)
|
||||
if ((adev->sdma.instance[0].fw_version >= 27) && !adev->sdma.disable_uq)
|
||||
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
|
||||
break;
|
||||
case IP_VERSION(6, 0, 1):
|
||||
|
|
@ -1385,11 +1385,11 @@ static int sdma_v6_0_sw_init(struct amdgpu_ip_block *ip_block)
|
|||
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
|
||||
break;
|
||||
case IP_VERSION(6, 0, 2):
|
||||
if ((adev->sdma.instance[0].fw_version >= 21) && !adev->sdma.disable_uq)
|
||||
if ((adev->sdma.instance[0].fw_version >= 23) && !adev->sdma.disable_uq)
|
||||
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
|
||||
break;
|
||||
case IP_VERSION(6, 0, 3):
|
||||
if ((adev->sdma.instance[0].fw_version >= 25) && !adev->sdma.disable_uq)
|
||||
if ((adev->sdma.instance[0].fw_version >= 27) && !adev->sdma.disable_uq)
|
||||
adev->userq_funcs[AMDGPU_HW_IP_DMA] = &userq_mes_funcs;
|
||||
break;
|
||||
case IP_VERSION(6, 1, 0):
|
||||
|
|
|
|||
|
|
@ -8381,8 +8381,7 @@ static int amdgpu_dm_connector_get_modes(struct drm_connector *connector)
|
|||
drm_add_modes_noedid(connector, 1920, 1080);
|
||||
} else {
|
||||
amdgpu_dm_connector_ddc_get_modes(connector, drm_edid);
|
||||
if (encoder && (connector->connector_type != DRM_MODE_CONNECTOR_eDP) &&
|
||||
(connector->connector_type != DRM_MODE_CONNECTOR_LVDS))
|
||||
if (encoder)
|
||||
amdgpu_dm_connector_add_common_modes(encoder, connector);
|
||||
amdgpu_dm_connector_add_freesync_modes(connector, drm_edid);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -520,6 +520,15 @@ void dpp1_dppclk_control(
|
|||
REG_UPDATE(DPP_CONTROL, DPP_CLOCK_ENABLE, 0);
|
||||
}
|
||||
|
||||
void dpp_force_disable_cursor(struct dpp *dpp_base)
|
||||
{
|
||||
struct dcn10_dpp *dpp = TO_DCN10_DPP(dpp_base);
|
||||
|
||||
/* Force disable cursor */
|
||||
REG_UPDATE(CURSOR0_CONTROL, CUR0_ENABLE, 0);
|
||||
dpp_base->pos.cur0_ctl.bits.cur0_enable = 0;
|
||||
}
|
||||
|
||||
static const struct dpp_funcs dcn10_dpp_funcs = {
|
||||
.dpp_read_state = dpp_read_state,
|
||||
.dpp_reset = dpp_reset,
|
||||
|
|
|
|||
|
|
@ -1525,4 +1525,6 @@ void dpp1_construct(struct dcn10_dpp *dpp1,
|
|||
|
||||
void dpp1_cm_get_gamut_remap(struct dpp *dpp_base,
|
||||
struct dpp_grph_csc_adjustment *adjust);
|
||||
void dpp_force_disable_cursor(struct dpp *dpp_base);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1494,6 +1494,7 @@ static struct dpp_funcs dcn30_dpp_funcs = {
|
|||
.dpp_dppclk_control = dpp1_dppclk_control,
|
||||
.dpp_set_hdr_multiplier = dpp3_set_hdr_multiplier,
|
||||
.dpp_get_gamut_remap = dpp3_cm_get_gamut_remap,
|
||||
.dpp_force_disable_cursor = dpp_force_disable_cursor,
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -528,3 +528,75 @@ void dcn314_disable_link_output(struct dc_link *link,
|
|||
|
||||
apply_symclk_on_tx_off_wa(link);
|
||||
}
|
||||
|
||||
/**
|
||||
* dcn314_dpp_pg_control - DPP power gate control.
|
||||
*
|
||||
* @hws: dce_hwseq reference.
|
||||
* @dpp_inst: DPP instance reference.
|
||||
* @power_on: true if we want to enable power gate, false otherwise.
|
||||
*
|
||||
* Enable or disable power gate in the specific DPP instance.
|
||||
* If power gating is disabled, will force disable cursor in the DPP instance.
|
||||
*/
|
||||
void dcn314_dpp_pg_control(
|
||||
struct dce_hwseq *hws,
|
||||
unsigned int dpp_inst,
|
||||
bool power_on)
|
||||
{
|
||||
uint32_t power_gate = power_on ? 0 : 1;
|
||||
uint32_t pwr_status = power_on ? 0 : 2;
|
||||
|
||||
|
||||
if (hws->ctx->dc->debug.disable_dpp_power_gate) {
|
||||
/* Workaround for DCN314 with disabled power gating */
|
||||
if (!power_on) {
|
||||
|
||||
/* Force disable cursor if power gating is disabled */
|
||||
struct dpp *dpp = hws->ctx->dc->res_pool->dpps[dpp_inst];
|
||||
if (dpp && dpp->funcs->dpp_force_disable_cursor)
|
||||
dpp->funcs->dpp_force_disable_cursor(dpp);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (REG(DOMAIN1_PG_CONFIG) == 0)
|
||||
return;
|
||||
|
||||
switch (dpp_inst) {
|
||||
case 0: /* DPP0 */
|
||||
REG_UPDATE(DOMAIN1_PG_CONFIG,
|
||||
DOMAIN1_POWER_GATE, power_gate);
|
||||
|
||||
REG_WAIT(DOMAIN1_PG_STATUS,
|
||||
DOMAIN1_PGFSM_PWR_STATUS, pwr_status,
|
||||
1, 1000);
|
||||
break;
|
||||
case 1: /* DPP1 */
|
||||
REG_UPDATE(DOMAIN3_PG_CONFIG,
|
||||
DOMAIN3_POWER_GATE, power_gate);
|
||||
|
||||
REG_WAIT(DOMAIN3_PG_STATUS,
|
||||
DOMAIN3_PGFSM_PWR_STATUS, pwr_status,
|
||||
1, 1000);
|
||||
break;
|
||||
case 2: /* DPP2 */
|
||||
REG_UPDATE(DOMAIN5_PG_CONFIG,
|
||||
DOMAIN5_POWER_GATE, power_gate);
|
||||
|
||||
REG_WAIT(DOMAIN5_PG_STATUS,
|
||||
DOMAIN5_PGFSM_PWR_STATUS, pwr_status,
|
||||
1, 1000);
|
||||
break;
|
||||
case 3: /* DPP3 */
|
||||
REG_UPDATE(DOMAIN7_PG_CONFIG,
|
||||
DOMAIN7_POWER_GATE, power_gate);
|
||||
|
||||
REG_WAIT(DOMAIN7_PG_STATUS,
|
||||
DOMAIN7_PGFSM_PWR_STATUS, pwr_status,
|
||||
1, 1000);
|
||||
break;
|
||||
default:
|
||||
BREAK_TO_DEBUGGER();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -47,4 +47,6 @@ void dcn314_dpp_root_clock_control(struct dce_hwseq *hws, unsigned int dpp_inst,
|
|||
|
||||
void dcn314_disable_link_output(struct dc_link *link, const struct link_resource *link_res, enum signal_type signal);
|
||||
|
||||
void dcn314_dpp_pg_control(struct dce_hwseq *hws, unsigned int dpp_inst, bool power_on);
|
||||
|
||||
#endif /* __DC_HWSS_DCN314_H__ */
|
||||
|
|
|
|||
|
|
@ -141,6 +141,7 @@ static const struct hwseq_private_funcs dcn314_private_funcs = {
|
|||
.enable_power_gating_plane = dcn314_enable_power_gating_plane,
|
||||
.dpp_root_clock_control = dcn314_dpp_root_clock_control,
|
||||
.hubp_pg_control = dcn31_hubp_pg_control,
|
||||
.dpp_pg_control = dcn314_dpp_pg_control,
|
||||
.program_all_writeback_pipes_in_tree = dcn30_program_all_writeback_pipes_in_tree,
|
||||
.update_odm = dcn314_update_odm,
|
||||
.dsc_pg_control = dcn314_dsc_pg_control,
|
||||
|
|
|
|||
|
|
@ -349,6 +349,9 @@ struct dpp_funcs {
|
|||
struct dpp *dpp_base,
|
||||
enum dc_color_space color_space,
|
||||
struct dc_csc_transform cursor_csc_color_matrix);
|
||||
|
||||
void (*dpp_force_disable_cursor)(struct dpp *dpp_base);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user