Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amd/pm: Use smu vram copy in SMUv15

Use smu vram copy wrapper function for vram copy operations in
SMUv15.0.8

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Asad Kamal <asad.kamal@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Lijo Lazar and committed by
Alex Deucher
3ecee207 3bec5825

+15 -5
+15 -5
drivers/gpu/drm/amd/pm/swsmu/smu15/smu_v15_0_8_ppt.c
··· 344 344 } 345 345 346 346 amdgpu_device_invalidate_hdp(smu->adev, NULL); 347 - memcpy(smu_table->metrics_table, table->cpu_addr, table_size); 347 + ret = smu_cmn_vram_cpy(smu, smu_table->metrics_table, 348 + table->cpu_addr, table_size); 349 + if (ret) { 350 + mutex_unlock(&smu_table->metrics_lock); 351 + return ret; 352 + } 348 353 349 354 smu_table->metrics_time = jiffies; 350 355 } ··· 556 551 } 557 552 558 553 amdgpu_hdp_invalidate(smu->adev, NULL); 554 + 555 + ret = smu_cmn_vram_cpy(smu, sys_table->cache.buffer, 556 + table->cpu_addr, 557 + sizeof(SystemMetricsTable_t)); 558 + if (ret) 559 + return ret; 560 + 559 561 smu_table_cache_update_time(sys_table, jiffies); 560 - memcpy(sys_table->cache.buffer, table->cpu_addr, 561 - sizeof(SystemMetricsTable_t)); 562 562 563 563 return 0; 564 564 } ··· 998 988 } 999 989 1000 990 amdgpu_hdp_invalidate(smu->adev, NULL); 1001 - memcpy(smu_table->metrics_table, table->cpu_addr, table_size); 1002 991 1003 - return 0; 992 + return smu_cmn_vram_cpy(smu, smu_table->metrics_table, 993 + table->cpu_addr, table_size); 1004 994 } 1005 995 1006 996 static int smu_v15_0_8_fru_get_product_info(struct smu_context *smu,