diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c index 892d60fb225b..2f9f96cc9f65 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_acp.c | |||
@@ -265,14 +265,14 @@ static int acp_hw_init(void *handle) | |||
265 | 265 | ||
266 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | 266 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; |
267 | 267 | ||
268 | const struct amdgpu_ip_block_version *ip_version = | 268 | const struct amdgpu_ip_block *ip_block = |
269 | amdgpu_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ACP); | 269 | amdgpu_get_ip_block(adev, AMD_IP_BLOCK_TYPE_ACP); |
270 | 270 | ||
271 | if (!ip_version) | 271 | if (!ip_block) |
272 | return -EINVAL; | 272 | return -EINVAL; |
273 | 273 | ||
274 | r = amd_acp_hw_init(adev->acp.cgs_device, | 274 | r = amd_acp_hw_init(adev->acp.cgs_device, |
275 | ip_version->major, ip_version->minor); | 275 | ip_block->version->major, ip_block->version->minor); |
276 | /* -ENODEV means board uses AZ rather than ACP */ | 276 | /* -ENODEV means board uses AZ rather than ACP */ |
277 | if (r == -ENODEV) | 277 | if (r == -ENODEV) |
278 | return 0; | 278 | return 0; |
@@ -456,7 +456,7 @@ static int acp_set_powergating_state(void *handle, | |||
456 | return 0; | 456 | return 0; |
457 | } | 457 | } |
458 | 458 | ||
459 | const struct amd_ip_funcs acp_ip_funcs = { | 459 | static const struct amd_ip_funcs acp_ip_funcs = { |
460 | .name = "acp_ip", | 460 | .name = "acp_ip", |
461 | .early_init = acp_early_init, | 461 | .early_init = acp_early_init, |
462 | .late_init = NULL, | 462 | .late_init = NULL, |
@@ -472,3 +472,12 @@ const struct amd_ip_funcs acp_ip_funcs = { | |||
472 | .set_clockgating_state = acp_set_clockgating_state, | 472 | .set_clockgating_state = acp_set_clockgating_state, |
473 | .set_powergating_state = acp_set_powergating_state, | 473 | .set_powergating_state = acp_set_powergating_state, |
474 | }; | 474 | }; |
475 | |||
476 | const struct amdgpu_ip_block_version acp_ip_block = | ||
477 | { | ||
478 | .type = AMD_IP_BLOCK_TYPE_ACP, | ||
479 | .major = 2, | ||
480 | .minor = 2, | ||
481 | .rev = 0, | ||
482 | .funcs = &acp_ip_funcs, | ||
483 | }; | ||