[PATCH] drm/amdgpu: sriov should skip asic_reset in device_init

Alex Deucher alexdeucher at gmail.com
Thu Jan 17 14:21:52 UTC 2019


On Thu, Jan 17, 2019 at 4:51 AM wentalou <Wentao.Lou at amd.com> wrote:
>
> sriov would meet guest driver load failure,
> if calling amdgpu_asic_reset in amdgpu_device_init.
> sriov should skip asic_reset in device_init.
>
> Change-Id: I6c03b2fcdbf29200fab09459bbffd87726047908
> Signed-off-by: Wentao Lou <Wentao.Lou at amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 8a61764..e20dce4 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -2553,7 +2553,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
>         /* check if we need to reset the asic
>          *  E.g., driver was not cleanly unloaded previously, etc.
>          */
> -       if (amdgpu_asic_need_reset_on_init(adev)) {
> +       if (!amdgpu_sriov_vf(adev) && amdgpu_asic_need_reset_on_init(adev)) {
>                 r = amdgpu_asic_reset(adev);
>                 if (r) {
>                         dev_err(adev->dev, "asic reset on init failed\n");
> --
> 2.7.4
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list