]> git.hungrycats.org Git - linux/commit
drm/amd/pm: Use uploaded size for legacy custom PPTable
authorYang Wang <kevinyang.wang@amd.com>
Tue, 23 Jun 2026 03:36:20 +0000 (11:36 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 1 Jul 2026 15:23:43 +0000 (11:23 -0400)
commit055a40c32f3a2dcd4d1a6f85ff4c231cf35f1b53
tree719eaf1051b9e19fbf574fff0903df39a7e1600e
parenta17e79d01f22182a9fcbe79fcbe2ad1477d43e0f
drm/amd/pm: Use uploaded size for legacy custom PPTable

The legacy powerplay path used to allocate hardcode_pp_table from
the original VBIOS PPTable size, copy only the uploaded bytes into it,
and keep soft_pp_table_size unchanged. If a custom PPTable is shorter
than the original table, later code can still treat the stale tail as
valid table data.

Treat the uploaded buffer as the complete custom PPTable: duplicate the
uploaded buffer directly, replace hardcode_pp_table atomically, and set
soft_pp_table_size to the uploaded size.

Signed-off-by: Yang Wang <kevinyang.wang@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c