drm/amdgpu: add asic callback to get memsize register
Newer asics use different registers so abstract it. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -751,6 +751,11 @@ static int vi_asic_reset(struct amdgpu_device *adev)
|
||||
return r;
|
||||
}
|
||||
|
||||
static u32 vi_get_config_memsize(struct amdgpu_device *adev)
|
||||
{
|
||||
return RREG32(mmCONFIG_MEMSIZE);
|
||||
}
|
||||
|
||||
static int vi_set_uvd_clock(struct amdgpu_device *adev, u32 clock,
|
||||
u32 cntl_reg, u32 status_reg)
|
||||
{
|
||||
@@ -900,6 +905,7 @@ static const struct amdgpu_asic_funcs vi_asic_funcs =
|
||||
.get_xclk = &vi_get_xclk,
|
||||
.set_uvd_clocks = &vi_set_uvd_clocks,
|
||||
.set_vce_clocks = &vi_set_vce_clocks,
|
||||
.get_config_memsize = &vi_get_config_memsize,
|
||||
};
|
||||
|
||||
static int vi_common_early_init(void *handle)
|
||||
|
Reference in New Issue
Block a user