From: Maruthi Srinivas Bayyavarapu <maruthi.bayyavar...@amd.com>

Signed-off-by: Maruthi Bayyavarapu <maruthi.bayyavarapu at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/Makefile           |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 10 ++++++++++
 drivers/gpu/drm/amd/amdgpu/si.c               |  8 ++++----
 3 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/Makefile 
b/drivers/gpu/drm/amd/amdgpu/Makefile
index eab90ae..9b722137 100644
--- a/drivers/gpu/drm/amd/amdgpu/Makefile
+++ b/drivers/gpu/drm/amd/amdgpu/Makefile
@@ -30,7 +30,7 @@ amdgpu-$(CONFIG_DRM_AMDGPU_CIK)+= cik.o cik_ih.o kv_smc.o 
kv_dpm.o \
        ci_smc.o ci_dpm.o dce_v8_0.o gfx_v7_0.o cik_sdma.o uvd_v4_2.o 
vce_v2_0.o \
        amdgpu_amdkfd_gfx_v7.o

-amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o 
dce_v6_0.o
+amdgpu-$(CONFIG_DRM_AMDGPU_SI)+= si.o gmc_v6_0.o gfx_v6_0.o si_ih.o si_dma.o 
dce_v6_0.o si_dpm.o si_smc.o

 amdgpu-y += \
        vi.o
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
index 6bd961f..2452dc7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
@@ -30,6 +30,7 @@
 #include "amdgpu_pm.h"
 #include <drm/amdgpu_drm.h>
 #include "amdgpu_powerplay.h"
+#include "si_dpm.h"
 #include "cik_dpm.h"
 #include "vi_dpm.h"

@@ -60,6 +61,15 @@ static int amdgpu_powerplay_init(struct amdgpu_device *adev)
                amd_pp->pp_handle = (void *)adev;

                switch (adev->asic_type) {
+#ifdef CONFIG_DRM_AMDGPU_SI
+               case CHIP_TAHITI:
+               case CHIP_PITCAIRN:
+               case CHIP_VERDE:
+               case CHIP_OLAND:
+               case CHIP_HAINAN:
+                       amd_pp->ip_funcs = &si_dpm_ip_funcs;
+               break;
+#endif
 #ifdef CONFIG_DRM_AMDGPU_CIK
                case CHIP_BONAIRE:
                case CHIP_HAWAII:
diff --git a/drivers/gpu/drm/amd/amdgpu/si.c b/drivers/gpu/drm/amd/amdgpu/si.c
index 337b387..03aeade 100644
--- a/drivers/gpu/drm/amd/amdgpu/si.c
+++ b/drivers/gpu/drm/amd/amdgpu/si.c
@@ -1046,6 +1046,7 @@ u32 si_get_xclk(struct amdgpu_device *adev)

        return reference_clock;
 }
+
 //xxx:not implemented
 static int si_set_uvd_clocks(struct amdgpu_device *adev, u32 vclk, u32 dclk)
 {
@@ -1799,14 +1800,13 @@ static const struct amdgpu_ip_block_version 
verde_ip_blocks[] =
                .rev = 0,
                .funcs = &si_ih_ip_funcs,
        },
-/*     {
+       {
                .type = AMD_IP_BLOCK_TYPE_SMC,
                .major = 6,
                .minor = 0,
                .rev = 0,
-               .funcs = &si_null_ip_funcs,
+               .funcs = &amdgpu_pp_ip_funcs,
        },
-       */
        {
                .type = AMD_IP_BLOCK_TYPE_DCE,
                .major = 6,
@@ -1874,7 +1874,7 @@ static const struct amdgpu_ip_block_version 
hainan_ip_blocks[] =
                .major = 6,
                .minor = 0,
                .rev = 0,
-               .funcs = &si_null_ip_funcs,
+               .funcs = &amdgpu_pp_ip_funcs,
        },
        {
                .type = AMD_IP_BLOCK_TYPE_GFX,
-- 
2.5.5

Reply via email to