History

drm/amd/display: Add pixel_clock to amd_pp_display_configuration

This commit adds the pixel_clock field to the display config struct so that power management (DPM) can use it. We currently don't have a proper bandwidth calculation on old GPUs with DCE 6-10 because dce_calcs only supports DCE 11+. So the power management (DPM) on these GPUs may need to make ad-hoc decisions for display based on the pixel clock. Also rename sym_clock to pixel_clock in dm_pp_single_disp_config to avoid confusion with other code where the sym_clock refers to the DisplayPort symbol clock.

Timur Kristóf committed 1 year ago

Commit b515dcb1 parent 92d62954 files · +4 −2Browse files

Unified · Split

4 files
  1. drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c +1 −0
  2. drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c +1 −1
  3. drivers/gpu/drm/amd/display/dc/dm_services_types.h +1 −1
  4. drivers/gpu/drm/amd/include/dm_pp_interface.h +1 −0
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_pp_smu.c+1−0
@@ -98,6 +98,7 @@ bool dm_pp_apply_display_requirements( · 97 unmodified lines
98 const struct dm_pp_single_disp_config *dc_cfg =98 const struct dm_pp_single_disp_config *dc_cfg =
99 &pp_display_cfg->disp_configs[i];99 &pp_display_cfg->disp_configs[i];
100 adev->pm.pm_display_cfg.displays[i].controller_id = dc_cfg->pipe_idx + 1;100 adev->pm.pm_display_cfg.displays[i].controller_id = dc_cfg->pipe_idx + 1;
101 adev->pm.pm_display_cfg.displays[i].pixel_clock = dc_cfg->pixel_clock;
101 }102 }
102 103
103 amdgpu_dpm_display_configuration_change(adev, &adev->pm.pm_display_cfg);104 amdgpu_dpm_display_configuration_change(adev, &adev->pm.pm_display_cfg);
drivers/gpu/drm/amd/display/dc/clk_mgr/dce110/dce110_clk_mgr.c+1−1
@@ -164,7 +164,7 @@ void dce110_fill_display_configs( · 163 unmodified lines
164 stream->link->cur_link_settings.link_rate;164 stream->link->cur_link_settings.link_rate;
165 cfg->link_settings.link_spread =165 cfg->link_settings.link_spread =
166 stream->link->cur_link_settings.link_spread;166 stream->link->cur_link_settings.link_spread;
167 cfg->sym_clock = stream->phy_pix_clk;167 cfg->pixel_clock = stream->phy_pix_clk;
168 /* Round v_refresh*/168 /* Round v_refresh*/
169 cfg->v_refresh = stream->timing.pix_clk_100hz * 100;169 cfg->v_refresh = stream->timing.pix_clk_100hz * 100;
170 cfg->v_refresh /= stream->timing.h_total;170 cfg->v_refresh /= stream->timing.h_total;
drivers/gpu/drm/amd/display/dc/dm_services_types.h+1−1
@@ -127,7 +127,7 @@ struct dm_pp_single_disp_config { · 126 unmodified lines
127 uint32_t src_height;127 uint32_t src_height;
128 uint32_t src_width;128 uint32_t src_width;
129 uint32_t v_refresh;129 uint32_t v_refresh;
130 uint32_t sym_clock; /* HDMI only */130 uint32_t pixel_clock; /* Pixel clock in KHz (for HDMI only: normalized) */
131 struct dc_link_settings link_settings; /* DP only */131 struct dc_link_settings link_settings; /* DP only */
132};132};
133 133
drivers/gpu/drm/amd/include/dm_pp_interface.h+1−0
@@ -65,6 +65,7 @@ struct single_display_configuration { · 64 unmodified lines
65 uint32_t view_resolution_cy;65 uint32_t view_resolution_cy;
66 enum amd_pp_display_config_type displayconfigtype;66 enum amd_pp_display_config_type displayconfigtype;
67 uint32_t vertical_refresh; /* for active display */67 uint32_t vertical_refresh; /* for active display */
68 uint32_t pixel_clock; /* Pixel clock in KHz (for HDMI only: normalized) */
68};69};
69 70
70#define MAX_NUM_DISPLAY 3271#define MAX_NUM_DISPLAY 32

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t