We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97d9a4e commit 4829f89Copy full SHA for 4829f89
drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -978,8 +978,12 @@ int smu_v11_0_init_max_sustainable_clocks(struct smu_context *smu)
978
struct smu_11_0_max_sustainable_clocks *max_sustainable_clocks;
979
int ret = 0;
980
981
- max_sustainable_clocks = kzalloc(sizeof(struct smu_11_0_max_sustainable_clocks),
+ if (!smu->smu_table.max_sustainable_clocks)
982
+ max_sustainable_clocks = kzalloc(sizeof(struct smu_11_0_max_sustainable_clocks),
983
GFP_KERNEL);
984
+ else
985
+ max_sustainable_clocks = smu->smu_table.max_sustainable_clocks;
986
+
987
smu->smu_table.max_sustainable_clocks = (void *)max_sustainable_clocks;
988
989
max_sustainable_clocks->uclock = smu->smu_table.boot_values.uclk / 100;
0 commit comments