From: Huang Rui Date: Sun, 31 Mar 2019 08:08:21 +0000 (+0800) Subject: drm/amd/powerplay: don't include the smu11 driver if header in smu v11 (v2) X-Git-Tag: v5.3-rc1~81^2~10^2~292 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=013fd3a61a827c65491b0bb9ad3c0417f09c8146;p=thirdparty%2Flinux.git drm/amd/powerplay: don't include the smu11 driver if header in smu v11 (v2) This header is actually for each asic, so we should not include in smu_v11_0.c. And rename the one for navi10. v2: add hack for XGMI (Alex) Signed-off-by: Huang Rui Reviewed-by: Kevin Wang Reviewed-by: Alex Deucher Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/powerplay/inc/smu_11_0_driver_if.h b/drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_navi10.h similarity index 99% rename from drivers/gpu/drm/amd/powerplay/inc/smu_11_0_driver_if.h rename to drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_navi10.h index 1ab6e4eca09fe..25b7c8c496f76 100644 --- a/drivers/gpu/drm/amd/powerplay/inc/smu_11_0_driver_if.h +++ b/drivers/gpu/drm/amd/powerplay/inc/smu11_driver_if_navi10.h @@ -1,5 +1,5 @@ -#ifndef __SMU11_DRIVER_IF_H__ -#define __SMU11_DRIVER_IF_H__ +#ifndef __SMU11_DRIVER_IF_NAVI10_H__ +#define __SMU11_DRIVER_IF_NAVI10_H__ // *** IMPORTANT *** // SMU TEAM: Always increment the interface version if diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c index aaccf38920a77..d41763c546122 100644 --- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c +++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c @@ -28,7 +28,7 @@ #include "atomfirmware.h" #include "amdgpu_atomfirmware.h" #include "smu_v11_0.h" -#include "smu_11_0_driver_if.h" +#include "smu11_driver_if_navi10.h" #include "soc15_common.h" #include "atom.h" #include "navi10_ppt.h" diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c index c11341c2ed98d..21917762ae28e 100644 --- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c +++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c @@ -27,7 +27,6 @@ #include "atomfirmware.h" #include "amdgpu_atomfirmware.h" #include "smu_v11_0.h" -#include "smu_11_0_driver_if.h" #include "soc15_common.h" #include "atom.h" #include "vega20_ppt.h" @@ -1739,6 +1738,9 @@ set_fan_speed_rpm_failed: return ret; } +#define XGMI_STATE_D0 1 +#define XGMI_STATE_D3 0 + static int smu_v11_0_set_xgmi_pstate(struct smu_context *smu, uint32_t pstate) {