Don't change bare-metal logic, so please use amdgpu_sriov_vf() to differentiate -4 or -4 for the ID_MAXIMUM
With that addressed, this patch is : Reviewed-by: Monk Liu <[email protected]> -----邮件原件----- 发件人: amd-gfx [mailto:[email protected]] 代表 Huang Rui 发送时间: Monday, April 10, 2017 2:52 PM 收件人: Huang, Trigger <[email protected]> 抄送: [email protected] 主题: Re: [PATCH] drm/amdgpu: Fix firmware UCODE_ID_STORAGE issue On Mon, Apr 10, 2017 at 02:45:49PM +0800, Trigger Huang wrote: > In Tonga's virtualization environment, for firmware UCODE_ID_STORAGE, > there is no actual firmware data, but we still need alloc a BO and > tell the BO's mc address to HW, or world switch will hang on VFs. > > Signed-off-by: Trigger Huang <[email protected]> > --- Acked-by: Huang Rui <[email protected]> > drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c > b/drivers/gpu/drm/amd/ amdgpu/amdgpu_ucode.c index a1891c9..b7307b0 > 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c > @@ -383,7 +383,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev) > * ucode info here > */ > if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) > - adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - 4; > + adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM - > + 3; > else > adev->firmware.max_ucodes = AMDGPU_UCODE_ID_MAXIMUM; > > -- > 2.7.4 > _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
