Commit e65d45f2 authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher

drm/amd/powerplay: add interface to allocate memory pool (v2)

This patch adds interface to allocate memory pool for smu.
This memory pool will be used for SMC use and msg SetSystemVirtualDramAddr and
DramLogSetDramAddr can notify it changed.

v2: add detailed info to describe this function
Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 206bc589
......@@ -216,6 +216,21 @@ static int smu_smc_table_hw_init(struct smu_context *smu)
return ret;
}
/**
* smu_alloc_memory_pool - allocate memory pool in the system memory
*
* @smu: amdgpu_device pointer
*
* This memory pool will be used for SMC use and msg SetSystemVirtualDramAddr
* and DramLogSetDramAddr can notify it changed.
*
* Returns 0 on success, error on failure.
*/
static int smu_alloc_memory_pool(struct smu_context *smu)
{
return 0;
}
static int smu_hw_init(void *handle)
{
int ret;
......@@ -243,6 +258,10 @@ static int smu_hw_init(void *handle)
if (ret)
goto failed;
ret = smu_alloc_memory_pool(smu);
if (ret)
goto failed;
mutex_unlock(&smu->mutex);
pr_info("SMU is initialized successfully!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment