[PATCH] drm/amdgpu:bypass avfs event manager for sriov

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Trigger Huang
> Sent: Tuesday, November 01, 2016 3:23 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Min, Frank; Yu, Xiangliang; Liu, Monk; Huang, Trigger
> Subject: [PATCH] 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.
> 
> Signed-off-by: Frank Min <Frank.Min at amd.com>
> Signed-off-by: Xiangliang Yu <Xiangliang.Yu at amd.com>
> Signed-off-by: Trigger Huang <trigger.huang at amd.com>

Doesn't tonga need something similar?

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux