diff options
-rw-r--r-- | sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c b/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c index c242656d16a..416b1872f8d 100644 --- a/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c +++ b/sys/dev/pci/drm/amd/pm/swsmu/smu11/vangogh_ppt.c @@ -256,10 +256,9 @@ static int vangogh_tables_init(struct smu_context *smu) goto err0_out; smu_table->metrics_time = 0; - if (smu_version >= 0x043F3E00) - smu_table->gpu_metrics_table_size = sizeof(struct gpu_metrics_v2_3); - else - smu_table->gpu_metrics_table_size = sizeof(struct gpu_metrics_v2_2); + smu_table->gpu_metrics_table_size = sizeof(struct gpu_metrics_v2_2); + smu_table->gpu_metrics_table_size = max(smu_table->gpu_metrics_table_size, sizeof(struct gpu_metrics_v2_3)); + smu_table->gpu_metrics_table_size = max(smu_table->gpu_metrics_table_size, sizeof(struct gpu_metrics_v2_4)); smu_table->gpu_metrics_table = kzalloc(smu_table->gpu_metrics_table_size, GFP_KERNEL); if (!smu_table->gpu_metrics_table) goto err1_out; |