mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-18 01:36:55 +07:00
drm/amdgpu: Get pci resource directly through adev
In order to remove the cgs wrapper function cgs_get_pci_resource Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Christian König <christian.koenig@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
62fd51275e
commit
d32d661770
@ -290,12 +290,11 @@ static int acp_hw_init(void *handle)
|
||||
else if (r)
|
||||
return r;
|
||||
|
||||
r = cgs_get_pci_resource(adev->acp.cgs_device, CGS_RESOURCE_TYPE_MMIO,
|
||||
0x5289, 0, &acp_base);
|
||||
if (r == -ENODEV)
|
||||
return 0;
|
||||
else if (r)
|
||||
return r;
|
||||
if (adev->rmmio_size == 0 || adev->rmmio_size < 0x5289)
|
||||
return -EINVAL;
|
||||
|
||||
acp_base = adev->rmmio_base;
|
||||
|
||||
if (adev->asic_type != CHIP_STONEY) {
|
||||
adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), GFP_KERNEL);
|
||||
if (adev->acp.acp_genpd == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user