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:
@@ -45,6 +45,7 @@
|
||||
#include "gmc/gmc_6_0_d.h"
|
||||
#include "dce/dce_6_0_d.h"
|
||||
#include "uvd/uvd_4_0_d.h"
|
||||
#include "bif/bif_3_0_d.h"
|
||||
|
||||
static const u32 tahiti_golden_registers[] =
|
||||
{
|
||||
@@ -1155,6 +1156,11 @@ static int si_asic_reset(struct amdgpu_device *adev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u32 si_get_config_memsize(struct amdgpu_device *adev)
|
||||
{
|
||||
return RREG32(mmCONFIG_MEMSIZE);
|
||||
}
|
||||
|
||||
static void si_vga_set_state(struct amdgpu_device *adev, bool state)
|
||||
{
|
||||
uint32_t temp;
|
||||
@@ -1206,6 +1212,7 @@ static const struct amdgpu_asic_funcs si_asic_funcs =
|
||||
.get_xclk = &si_get_xclk,
|
||||
.set_uvd_clocks = &si_set_uvd_clocks,
|
||||
.set_vce_clocks = NULL,
|
||||
.get_config_memsize = &si_get_config_memsize,
|
||||
};
|
||||
|
||||
static uint32_t si_get_rev_id(struct amdgpu_device *adev)
|
||||
|
Reference in New Issue
Block a user