From: "Timur Kristóf" <timur.kristof@gmail.com>
To: amd-gfx@lists.freedesktop.org, alexander.deucher@amd.com,
Alex Hung <alex.hung@amd.com>,
Harry Wentland <Harry.Wentland@amd.com>,
Roman Li <Roman.Li@amd.com>, Leo Li <sunpeng.li@amd.com>,
David Airlie <airlied@gmail.com>,
Mario Limonciello <mario.limonciello@amd.com>,
Ivan Lipski <ivan.lipski@amd.com>, Melissa Wen <mwen@igalia.com>
Subject: Re: [PATCH 07/14] drm/amd/display: Delete disp_clk_voltage from integrated info
Date: Thu, 30 Apr 2026 14:30:57 +0200 [thread overview]
Message-ID: <22508251.4csPzL39Zc@timur-max> (raw)
In-Reply-To: <2c83c16b-7e5c-4d1d-93f1-23109ee52a59@igalia.com>
On 2026. április 29., szerda 22:35:16 közép-európai nyári idő Melissa Wen
wrote:
> On 23/04/2026 16:15, Timur Kristóf wrote:
> > Only DCE 11.0 relies on this information and even that
> > didn't use this field, because it queries the information
> > from the pplib. It also filled the field incorrectly on
> > that version.
> >
> > On newer GPUs, the VIOS integrated info no longer contains
> > display clock voltage dependencies, so we don't need it.
> >
> > Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
> > ---
> >
> > .../gpu/drm/amd/display/dc/bios/bios_parser.c | 36 -------------------
> > .../drm/amd/display/dc/bios/bios_parser2.c | 9 -----
> > .../display/include/grph_object_ctrl_defs.h | 9 -----
> > 3 files changed, 54 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
> > b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c index
> > 25c94962e1415..298a70852c1a8 100644
> > --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
> > +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser.c
> > @@ -2348,15 +2348,6 @@ static enum bp_result get_integrated_info_v8(
> >
> > info->dentist_vco_freq = le32_to_cpu(info_v8->ulDentistVCOFreq) *
10;
> > info->boot_up_uma_clock = le32_to_cpu(info_v8->ulBootUpUMAClock)
* 10;
> >
> > - for (i = 0; i < NUMBER_OF_DISP_CLK_VOLTAGE; ++i) {
> > - /* Convert [10KHz] into [KHz] */
> > - info->disp_clk_voltage[i].max_supported_clk =
> > - le32_to_cpu(info_v8->sDISPCLK_Voltage[i].
> > - ulMaximumSupportedCLK) * 10;
> > - info->disp_clk_voltage[i].voltage_index =
> > - le32_to_cpu(info_v8-
>sDISPCLK_Voltage[i].ulVoltageIndex);
> > - }
> > -
> >
> > info->boot_up_req_display_vector =
> >
> > le32_to_cpu(info_v8->ulBootUpReqDisplayVector);
> >
> > info->gpu_cap_info =
> >
> > @@ -2499,14 +2490,6 @@ static enum bp_result get_integrated_info_v9(
> >
> > info->dentist_vco_freq = le32_to_cpu(info_v9->ulDentistVCOFreq) *
10;
> > info->boot_up_uma_clock = le32_to_cpu(info_v9->ulBootUpUMAClock)
* 10;
> >
> > - for (i = 0; i < NUMBER_OF_DISP_CLK_VOLTAGE; ++i) {
> > - /* Convert [10KHz] into [KHz] */
> > - info->disp_clk_voltage[i].max_supported_clk =
> > - le32_to_cpu(info_v9-
>sDISPCLK_Voltage[i].ulMaximumSupportedCLK) * 10;
> > - info->disp_clk_voltage[i].voltage_index =
> > - le32_to_cpu(info_v9-
>sDISPCLK_Voltage[i].ulVoltageIndex);
> > - }
> > -
> >
> > info->boot_up_req_display_vector =
> >
> > le32_to_cpu(info_v9->ulBootUpReqDisplayVector);
> >
> > info->gpu_cap_info = le32_to_cpu(info_v9->ulGPUCapInfo);
> >
> > @@ -2648,25 +2631,6 @@ static enum bp_result construct_integrated_info(
> >
> > }
> >
> > }
> >
> > - /* Sort voltage table from low to high*/
> > - if (result == BP_RESULT_OK) {
> > - int32_t i;
> > - int32_t j;
> > -
> > - for (i = 1; i < NUMBER_OF_DISP_CLK_VOLTAGE; ++i) {
> > - for (j = i; j > 0; --j) {
> > - if (
> > - info-
>disp_clk_voltage[j].max_supported_clk <
> > - info-
>disp_clk_voltage[j-1].max_supported_clk) {
> > - /* swap j and j - 1*/
> > - swap(info-
>disp_clk_voltage[j - 1],
> > - info-
>disp_clk_voltage[j]);
> > - }
> > - }
> > - }
> > -
> > - }
> > -
> >
> > return result;
> >
> > }
> >
> > diff --git a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> > b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c index
> > b4dd8219b8f09..0e7250f1d3f73 100644
> > --- a/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> > +++ b/drivers/gpu/drm/amd/display/dc/bios/bios_parser2.c
> > @@ -3023,7 +3023,6 @@ static enum bp_result construct_integrated_info(
> >
> > struct atom_data_revision revision;
> >
> > int32_t i;
> >
> > - int32_t j;
> >
> > if (!info)
> >
> > return result;
> >
> > @@ -3125,14 +3124,6 @@ static enum bp_result construct_integrated_info(
> >
> > DC_LOG_BIOS("driver forced fixdpvoltageswing
= %d\n",
> > info-
>ext_disp_conn_info.fixdpvoltageswing);>
> > }
> >
> > }
> >
> > - /* Sort voltage table from low to high*/
> > - for (i = 1; i < NUMBER_OF_DISP_CLK_VOLTAGE; ++i) {
> > - for (j = i; j > 0; --j) {
> > - if (info-
>disp_clk_voltage[j].max_supported_clk <
> > - info-
>disp_clk_voltage[j-1].max_supported_clk)
> > - swap(info->disp_clk_voltage[j-1],
info->disp_clk_voltage[j]);
> > - }
> > - }
>
> I see in `get_integrated_info_v11()` a big portion of very old unused
> code guarded by a `#if 0` that uses `NUMBER_OF_DISP_CLK_VOLTAGE` but
> probably doesn't make sense anymore.
> How about removing it too?
As far as I understand, the VBIOS on newer GPUs doesn't have this information
in the integrated info. I don't know what was the intention of that "#if 0".
I can remove it if there are no objections from anyone here.
>
> > return result;
> >
> > }
> >
> > diff --git a/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h
> > b/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h index
> > 38a77fa9b4afd..130d377f4f1d2 100644
> > --- a/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h
> > +++ b/drivers/gpu/drm/amd/display/include/grph_object_ctrl_defs.h
> > @@ -269,7 +269,6 @@ struct transmitter_configuration {
> >
> > #define NUMBER_OF_UCHAR_FOR_GUID 16
> > #define MAX_NUMBER_OF_EXT_DISPLAY_PATH 7
> > #define NUMBER_OF_CSR_M3_ARB 10
> >
> > -#define NUMBER_OF_DISP_CLK_VOLTAGE 4
> >
> > #define NUMBER_OF_AVAILABLE_SCLK 5
> >
> > struct i2c_reg_info {
> >
> > @@ -298,14 +297,6 @@ struct edp_info {
> >
> > /* V6 */
> > struct integrated_info {
> >
> > - struct clock_voltage_caps {
> > - /* The Voltage Index indicated by FUSE, same voltage
index
> > - shared with SCLK DPM fuse table */
> > - uint32_t voltage_index;
> > - /* Maximum clock supported with specified voltage index
*/
> > - uint32_t max_supported_clk; /* in KHz */
> > - } disp_clk_voltage[NUMBER_OF_DISP_CLK_VOLTAGE];
> > -
> >
> > struct display_connection_info {
> >
> > struct external_display_path {
> >
> > /* A bit vector to show what devices are
supported */
next prev parent reply other threads:[~2026-04-30 13:19 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-23 19:15 [PATCH 00/14] drm/amd: Delete defunct DAL power level code Timur Kristóf
2026-04-23 19:15 ` [PATCH 01/14] drm/amd/display: Delete unimplemented dm_pp_apply_power_level_change_request() Timur Kristóf
2026-04-24 14:19 ` Melissa Wen
2026-04-24 16:27 ` Timur Kristóf
2026-04-29 20:02 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 02/14] drm/amd/display: Delete dce_get_required_clocks_state() Timur Kristóf
2026-04-29 20:03 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 03/14] drm/amd/display: Remove min/max clock levels from clk_mgr Timur Kristóf
2026-04-24 14:21 ` Melissa Wen
2026-04-24 16:28 ` Timur Kristóf
2026-04-29 20:05 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 04/14] drm/amd/display: Delete max_clocks_state from dm_pp_static_clock_info Timur Kristóf
2026-04-29 20:06 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 05/14] drm/amd/display: Set max supported display clock without max_clks_by_state Timur Kristóf
2026-04-29 20:24 ` Melissa Wen
2026-04-30 12:28 ` Timur Kristóf
2026-04-30 18:06 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 06/14] drm/amd/display: Delete max_clks_by_state from DCE clock manager Timur Kristóf
2026-04-29 20:29 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 07/14] drm/amd/display: Delete disp_clk_voltage from integrated info Timur Kristóf
2026-04-29 20:35 ` Melissa Wen
2026-04-30 12:30 ` Timur Kristóf [this message]
2026-04-23 19:15 ` [PATCH 08/14] drm/amd/display: Delete dm_pp_clocks_state Timur Kristóf
2026-04-29 20:37 ` Melissa Wen
2026-04-30 12:31 ` Timur Kristóf
2026-04-23 19:15 ` [PATCH 09/14] drm/amd/pm: Delete unused get_display_power_level() function Timur Kristóf
2026-04-30 17:56 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 10/14] drm/amd/pm: Delete dummy get_dal_power_level implementations Timur Kristóf
2026-04-30 18:42 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 11/14] drm/amd/pm: Delete non-functional SMU8 get_dal_power_level implementation Timur Kristóf
2026-04-30 18:53 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 12/14] drm/amd/pm: Delete vddc_dep_on_dal_pwrl Timur Kristóf
2026-04-30 19:03 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 13/14] drm/amd/pm: Delete get_dal_power_level Timur Kristóf
2026-04-30 19:03 ` Melissa Wen
2026-04-23 19:15 ` [PATCH 14/14] drm/amd/pm: Delete PP_DAL_POWERLEVEL Timur Kristóf
2026-04-30 19:04 ` Melissa Wen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22508251.4csPzL39Zc@timur-max \
--to=timur.kristof@gmail.com \
--cc=Harry.Wentland@amd.com \
--cc=Roman.Li@amd.com \
--cc=airlied@gmail.com \
--cc=alex.hung@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=ivan.lipski@amd.com \
--cc=mario.limonciello@amd.com \
--cc=mwen@igalia.com \
--cc=sunpeng.li@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox