projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
62fd512
)
drm/amdgpu: Get pci resource directly through adev
author
Rex Zhu
<
[email protected]
>
Fri, 23 Mar 2018 10:36:51 +0000
(18:36 +0800)
committer
Alex Deucher
<
[email protected]
>
Wed, 11 Apr 2018 18:07:50 +0000
(13:07 -0500)
In order to remove the cgs wrapper function
cgs_get_pci_resource
Reviewed-by: Alex Deucher <
[email protected]
>
Acked-by: Christian König <
[email protected]
>
Signed-off-by: Rex Zhu <
[email protected]
>
Signed-off-by: Alex Deucher <
[email protected]
>
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
index a29362f9ef415d48a6a00ea94d0a6a8fa2b1d7b5..03ee36739efeb5c58b9db5a524e171cc0f22435e 100644
(file)
--- a/
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
+++ b/
drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c
@@
-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)