<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Rex Zhu <Rex.Zhu@amd.com><br>
<b>Sent:</b> Tuesday, March 6, 2018 1:47:24 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zhu, Rex<br>
<b>Subject:</b> [PATCH] drm/amd/pp: Add #ifdef checks for CONFIG_ACPI</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Fix compiling error when CONFIG_ACPI not enabled.<br>
<br>
Change-Id: I20d3f55bbd2ad68e65363cde7452802b063643f0<br>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c | 2 ++<br>
drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c | 2 ++<br>
2 files changed, 4 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
index 8a37c80..aa83114 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c<br>
@@ -902,8 +902,10 @@ void hwmgr_init_default_caps(struct pp_hwmgr *hwmgr)<br>
phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_UVDDPM);<br>
phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_VCEDPM);<br>
<br>
+#if defined(CONFIG_ACPI)<br>
if (amdgpu_acpi_is_pcie_performance_request_supported(hwmgr->adev))<br>
phm_cap_set(hwmgr->platform_descriptor.platformCaps, PHM_PlatformCaps_PCIEPerformanceRequest);<br>
+#endif<br>
<br>
phm_cap_set(hwmgr->platform_descriptor.platformCaps,<br>
PHM_PlatformCaps_DynamicPatchPowerState);<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
index 62ebe15..4f26014 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_hwmgr.c<br>
@@ -3596,6 +3596,7 @@ static int smu7_request_link_speed_change_before_state_change(<br>
<br>
if (target_link_speed > current_link_speed) {<br>
switch (target_link_speed) {<br>
+#ifdef CONFIG_ACPI<br>
case PP_PCIEGen3:<br>
if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN3, false))<br>
break;<br>
@@ -3605,6 +3606,7 @@ static int smu7_request_link_speed_change_before_state_change(<br>
case PP_PCIEGen2:<br>
if (0 == amdgpu_acpi_pcie_performance_request(hwmgr->adev, PCIE_PERF_REQ_GEN2, false))<br>
break;<br>
+#endif<br>
default:<br>
data->force_pcie_gen = smu7_get_current_pcie_speed(hwmgr);<br>
break;<br>
-- <br>
1.9.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>