[PATCH] amd/amdgpu/sriov swSMU disable for sriov

Wang, Kevin(Yang) Kevin1.Wang at amd.com
Mon Dec 2 12:02:16 UTC 2019

[AMD Official Use Only - Internal Distribution Only]

Reviewed-by: Kevin Wang <kevin1.wang at amd.com>
But it's better to optimize the flow of control in is_support_sw_smu()

Best Regards,

From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> on behalf of Jack Zhang <Jack.Zhang1 at amd.com>
Sent: Monday, December 2, 2019 7:05 PM
To: amd-gfx at lists.freedesktop.org <amd-gfx at lists.freedesktop.org>
Cc: Zhang, Jack (Jian) <Jack.Zhang1 at amd.com>
Subject: [PATCH] amd/amdgpu/sriov swSMU disable for sriov

For boards greater than ARCTURUS, and under sriov platform,
swSMU is not supported because smu ip block is commented at
guest driver.

Generally for sriov, initialization of smu is moved to host driver.
Thus, smu sw_init and hw_init will not be executed at guest driver.

Without sw structure being initialized in guest driver, swSMU cannot
declare to be supported.

Signed-off-by: Jack Zhang <Jack.Zhang1 at amd.com>
 drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
index 36001a4..0b8a53b 100644
--- a/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
+++ b/drivers/gpu/drm/amd/powerplay/amdgpu_smu.c
@@ -531,7 +531,10 @@ bool is_support_sw_smu(struct amdgpu_device *adev)
         if (adev->asic_type == CHIP_VEGA20)
                 return (amdgpu_dpm == 2) ? true : false;
         else if (adev->asic_type >= CHIP_ARCTURUS)
-               return true;
+               if (amdgpu_sriov_vf(adev))
+                       return false;
+               else
+                       return true;
                 return false;

amd-gfx mailing list
amd-gfx at lists.freedesktop.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20191202/ec49a51e/attachment.html>

More information about the amd-gfx mailing list