mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 07:03:03 +02:00
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>
This commit is contained in:
parent
3bec582562
commit
3ecee2073c
|
|
@ -344,7 +344,12 @@ static int smu_v15_0_8_get_metrics_table_internal(struct smu_context *smu, uint3
|
|||
}
|
||||
|
||||
amdgpu_device_invalidate_hdp(smu->adev, NULL);
|
||||
memcpy(smu_table->metrics_table, table->cpu_addr, table_size);
|
||||
ret = smu_cmn_vram_cpy(smu, smu_table->metrics_table,
|
||||
table->cpu_addr, table_size);
|
||||
if (ret) {
|
||||
mutex_unlock(&smu_table->metrics_lock);
|
||||
return ret;
|
||||
}
|
||||
|
||||
smu_table->metrics_time = jiffies;
|
||||
}
|
||||
|
|
@ -551,9 +556,14 @@ static int smu_v15_0_8_get_system_metrics_table(struct smu_context *smu)
|
|||
}
|
||||
|
||||
amdgpu_hdp_invalidate(smu->adev, NULL);
|
||||
|
||||
ret = smu_cmn_vram_cpy(smu, sys_table->cache.buffer,
|
||||
table->cpu_addr,
|
||||
sizeof(SystemMetricsTable_t));
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
smu_table_cache_update_time(sys_table, jiffies);
|
||||
memcpy(sys_table->cache.buffer, table->cpu_addr,
|
||||
sizeof(SystemMetricsTable_t));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -988,9 +998,9 @@ static int smu_v15_0_8_get_static_metrics_table(struct smu_context *smu)
|
|||
}
|
||||
|
||||
amdgpu_hdp_invalidate(smu->adev, NULL);
|
||||
memcpy(smu_table->metrics_table, table->cpu_addr, table_size);
|
||||
|
||||
return 0;
|
||||
return smu_cmn_vram_cpy(smu, smu_table->metrics_table,
|
||||
table->cpu_addr, table_size);
|
||||
}
|
||||
|
||||
static int smu_v15_0_8_fru_get_product_info(struct smu_context *smu,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user