aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2016-10-13 17:41:13 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-10-25 14:38:45 -0400
commita12551072126758ecb0743147054f22bf233bb7d (patch)
treef3850a0b1945b6620fd591cafdb8ecb998b01302 /drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
parentcf35c7ca3d50286a3ac7672aa7d26a8d2e930706 (diff)
drm/amdgpu: rework IP block registration (v2)
This makes it easier to replace specific IP blocks on asics for handling virtual_dce, DAL, etc. and for building IP lists for hw or tables. This also stored the status information in the same structure. v2: split out spelling fix into a separate patch add a function to add IPs to the list Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
index 34049d67a0d8..017556ca22e6 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c
@@ -626,11 +626,11 @@ static int amdgpu_cgs_set_clockgating_state(struct cgs_device *cgs_device,
626 int i, r = -1; 626 int i, r = -1;
627 627
628 for (i = 0; i < adev->num_ip_blocks; i++) { 628 for (i = 0; i < adev->num_ip_blocks; i++) {
629 if (!adev->ip_block_status[i].valid) 629 if (!adev->ip_blocks[i].status.valid)
630 continue; 630 continue;
631 631
632 if (adev->ip_blocks[i].type == block_type) { 632 if (adev->ip_blocks[i].version->type == block_type) {
633 r = adev->ip_blocks[i].funcs->set_clockgating_state( 633 r = adev->ip_blocks[i].version->funcs->set_clockgating_state(
634 (void *)adev, 634 (void *)adev,
635 state); 635 state);
636 break; 636 break;
@@ -647,11 +647,11 @@ static int amdgpu_cgs_set_powergating_state(struct cgs_device *cgs_device,
647 int i, r = -1; 647 int i, r = -1;
648 648
649 for (i = 0; i < adev->num_ip_blocks; i++) { 649 for (i = 0; i < adev->num_ip_blocks; i++) {
650 if (!adev->ip_block_status[i].valid) 650 if (!adev->ip_blocks[i].status.valid)
651 continue; 651 continue;
652 652
653 if (adev->ip_blocks[i].type == block_type) { 653 if (adev->ip_blocks[i].version->type == block_type) {
654 r = adev->ip_blocks[i].funcs->set_powergating_state( 654 r = adev->ip_blocks[i].version->funcs->set_powergating_state(
655 (void *)adev, 655 (void *)adev,
656 state); 656 state);
657 break; 657 break;