* [PATCH V2] drm/amdgpu:bypass avfs event manager for sriov
@ 2016-11-02 12:09 Trigger Huang
[not found] ` <1478088599-32047-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Trigger Huang @ 2016-11-02 12:09 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Xiangliang Yu, Frank Min, Trigger Huang
This patch is used for virtualization support. In virtualization case,
the initialization sequences are not totally the same as
non-Virtualization's. The avfs event manager should be bypassed if in
SRIOV virtualization case. At the same, this patch will also bypass
starting SMC within SRIOV in FIJI, so the SMU firmware loading will be
avoid, which is required in SRIOV.
Signed-off-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Signed-off-by: Trigger Huang <trigger.huang@amd.com>
Changes in v2:
- Modify the commit log. This patch will also bypass starting SMC
within SRIOV in FIJI. The same operation will be applied on Tonga
in the other patch.
---
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
index b86e48f..26eff56 100755
--- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c
@@ -396,7 +396,8 @@ static int fiji_start_smu(struct pp_smumgr *smumgr)
struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend);
/* Only start SMC if SMC RAM is not running */
- if (!smu7_is_smc_ram_running(smumgr)) {
+ if (!(smu7_is_smc_ram_running(smumgr)
+ || cgs_is_virtualization_enabled(smumgr->device))) {
fiji_avfs_event_mgr(smumgr, false);
/* Check if SMU is running in protected mode */
@@ -443,6 +444,9 @@ static bool fiji_is_hw_avfs_present(struct pp_smumgr *smumgr)
uint32_t efuse = 0;
uint32_t mask = (1 << ((AVFS_EN_MSB - AVFS_EN_LSB) + 1)) - 1;
+ if (cgs_is_virtualization_enabled(smumgr->device))
+ return 0;
+
if (!atomctrl_read_efuse(smumgr->device, AVFS_EN_LSB, AVFS_EN_MSB,
mask, &efuse)) {
if (efuse)
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1478088599-32047-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org>]
* RE: [PATCH V2] drm/amdgpu:bypass avfs event manager for sriov [not found] ` <1478088599-32047-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org> @ 2016-11-02 14:07 ` Deucher, Alexander 0 siblings, 0 replies; 2+ messages in thread From: Deucher, Alexander @ 2016-11-02 14:07 UTC (permalink / raw) To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Cc: Min, Frank, Yu, Xiangliang, Huang, Trigger > -----Original Message----- > From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf > Of Trigger Huang > Sent: Wednesday, November 02, 2016 8:10 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang; Min, Frank; Huang, Trigger > Subject: [PATCH V2] drm/amdgpu:bypass avfs event manager for sriov > > This patch is used for virtualization support. In virtualization case, > the initialization sequences are not totally the same as > non-Virtualization's. The avfs event manager should be bypassed if in > SRIOV virtualization case. At the same, this patch will also bypass > starting SMC within SRIOV in FIJI, so the SMU firmware loading will be > avoid, which is required in SRIOV. > > Signed-off-by: Frank Min <Frank.Min@amd.com> > Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> > Signed-off-by: Trigger Huang <trigger.huang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> > > Changes in v2: > - Modify the commit log. This patch will also bypass starting SMC > within SRIOV in FIJI. The same operation will be applied on Tonga > in the other patch. > > --- > drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c > b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c > index b86e48f..26eff56 100755 > --- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c > +++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c > @@ -396,7 +396,8 @@ static int fiji_start_smu(struct pp_smumgr *smumgr) > struct fiji_smumgr *priv = (struct fiji_smumgr *)(smumgr->backend); > > /* Only start SMC if SMC RAM is not running */ > - if (!smu7_is_smc_ram_running(smumgr)) { > + if (!(smu7_is_smc_ram_running(smumgr) > + || cgs_is_virtualization_enabled(smumgr->device))) { > fiji_avfs_event_mgr(smumgr, false); > > /* Check if SMU is running in protected mode */ > @@ -443,6 +444,9 @@ static bool fiji_is_hw_avfs_present(struct > pp_smumgr *smumgr) > uint32_t efuse = 0; > uint32_t mask = (1 << ((AVFS_EN_MSB - AVFS_EN_LSB) + 1)) - 1; > > + if (cgs_is_virtualization_enabled(smumgr->device)) > + return 0; > + > if (!atomctrl_read_efuse(smumgr->device, AVFS_EN_LSB, > AVFS_EN_MSB, > mask, &efuse)) { > if (efuse) > -- > 2.7.4 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-02 14:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-02 12:09 [PATCH V2] drm/amdgpu:bypass avfs event manager for sriov Trigger Huang
[not found] ` <1478088599-32047-1-git-send-email-trigger.huang-5C7GfCeVMHo@public.gmane.org>
2016-11-02 14:07 ` Deucher, Alexander
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox