]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu/sdma: add proper CG flags for fiji
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 8 Apr 2016 04:42:51 +0000 (00:42 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 May 2016 00:21:52 +0000 (20:21 -0400)
We were already enabling these CG features, this uses
the standard interface for doing so.

Acked-by: Tom St Denis <tom.stdenis@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
drivers/gpu/drm/amd/amdgpu/vi.c

index a78f13ea4d86273ada3f96a4280291eb06b13ad5..739365da06490c5bee1fc39406b1811a65828d36 100644 (file)
@@ -1464,7 +1464,7 @@ static void fiji_update_sdma_medium_grain_clock_gating(
 {
        uint32_t temp, data;
 
-       if (enable) {
+       if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_MGCG)) {
                temp = data = RREG32(mmSDMA0_CLK_CTRL);
                data &= ~(SDMA0_CLK_CTRL__SOFT_OVERRIDE7_MASK |
                                SDMA0_CLK_CTRL__SOFT_OVERRIDE6_MASK |
@@ -1524,7 +1524,7 @@ static void fiji_update_sdma_medium_grain_light_sleep(
 {
        uint32_t temp, data;
 
-       if (enable) {
+       if (enable && (adev->cg_flags & AMD_CG_SUPPORT_SDMA_LS)) {
                temp = data = RREG32(mmSDMA0_POWER_CNTL);
                data |= SDMA0_POWER_CNTL__MEM_POWER_OVERRIDE_MASK;
 
index 8d9b03f624915fc6e702cf79ca4146c4ca7151b6..57595049ad9a612cbf427a6f3db7027fc9a51aa2 100644 (file)
@@ -1083,7 +1083,9 @@ static int vi_common_early_init(void *handle)
                        AMD_CG_SUPPORT_GFX_CGTS |
                        AMD_CG_SUPPORT_GFX_CGTS_LS |
                        AMD_CG_SUPPORT_GFX_CGCG |
-                       AMD_CG_SUPPORT_GFX_CGLS;
+                       AMD_CG_SUPPORT_GFX_CGLS |
+                       AMD_CG_SUPPORT_SDMA_MGCG |
+                       AMD_CG_SUPPORT_SDMA_LS;
                adev->pg_flags = 0;
                adev->external_rev_id = adev->rev_id + 0x3c;
                break;