Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Rex Zhu and committed by
Alex Deucher
d32d6617 62fd5127

+5 -6
+5 -6
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
··· 290 290 else if (r) 291 291 return r; 292 292 293 - r = cgs_get_pci_resource(adev->acp.cgs_device, CGS_RESOURCE_TYPE_MMIO, 294 - 0x5289, 0, &acp_base); 295 - if (r == -ENODEV) 296 - return 0; 297 - else if (r) 298 - return r; 293 + if (adev->rmmio_size == 0 || adev->rmmio_size < 0x5289) 294 + return -EINVAL; 295 + 296 + acp_base = adev->rmmio_base; 297 + 299 298 if (adev->asic_type != CHIP_STONEY) { 300 299 adev->acp.acp_genpd = kzalloc(sizeof(struct acp_pm_domain), GFP_KERNEL); 301 300 if (adev->acp.acp_genpd == NULL)