drm/amd/pp: Fix overflow when setup decf/pix/disp dpm table.
Subsystems (2)
PATCH 1/1 drm/amd/pp: Fix overflow when setup decf/pix/disp dpm table.
Change-Id I9e72043ea619a86b2bcf14ce9d6386fee107bd19
Signed-off-by Rex Zhu <[email protected]>
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +2 -4
@@ -1161,6 +1161,8 @@ static void vega10_setup_default_single_dpm_table(struct pp_hwmgr *hwmgr, {int i; + dpm_table->count =0 ; +for (i =0 ; i < dep_table->count; i++) {if (i ==0 || dpm_table->dpm_levels[dpm_table->count -1 ].value <= dep_table->entries[i].clk) {
@@ -1269,10 +1271,6 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr) return -EINVAL);/* Initialize Sclk DPM table based on allow Sclk values */ - data->dpm_table.soc_table.count =0 ; - data->dpm_table.gfx_table.count =0 ; - data->dpm_table.dcef_table.count =0 ; - dpm_table = &(data->dpm_table.soc_table); vega10_setup_default_single_dpm_table(hwmgr, dpm_table,
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1508319930-2003-1-git-send-email-Rex.Zhu-5C7GfCeVMHo@public.gmane.org
Alex Deucher
Reviewed-byQuoted 2 lines · Rex Zhu
Change-Id I9e72043ea619a86b2bcf14ce9d6386fee107bd19Signed-off-by Rex Zhu <[email protected]>
Please include a better patch description. E.g., Clear the count in the single table setup function to avoid missing any tables. or something like that. With that fixed:
Reviewed-by Alex Deucher <[email protected]>
Quoted 31 lines
--- drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c +2
-5@@ -1161,6 +1161,8 @@ static void vega10_setup_default_single_dpm_table(struct pp_hwmgr *hwmgr, {int i; + dpm_table->count =0 ; +for (i =0 ; i < dep_table->count; i++) {if (i ==0 || dpm_table->dpm_levels[dpm_table->count -1 ].value <= dep_table->entries[i].clk) {@@ -1269,10 +1271,6 @@ static int vega10_setup_default_dpm_tables(struct pp_hwmgr *hwmgr) return -EINVAL);/* Initialize Sclk DPM table based on allow Sclk values */ - data->dpm_table.soc_table.count =0 ; - data->dpm_table.gfx_table.count =0 ; - data->dpm_table.dcef_table.count =0 ; - dpm_table = &(data->dpm_table.soc_table); vega10_setup_default_single_dpm_table(hwmgr, dpm_table, --1.9.1
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx