[PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF

Deucher, Alexander Alexander.Deucher at amd.com
Tue Nov 7 15:45:46 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Pixel Ding
> Sent: Monday, November 06, 2017 10:08 PM
> To: ckoenig.leichtzumerken at gmail.com; amd-gfx at lists.freedesktop.org
> Cc: Ding, Pixel
> Subject: [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF
> 
> From: pding <Pixel.Ding at amd.com>
> 
> It introduces 900ms latency in exclusive mode which causes failure
> of driver loading. Host can resize the BAR before guest staring,
> so the resizing is not necessary here.
> 
> Signed-off-by: pding <Pixel.Ding at amd.com>

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

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index 6f01dda..bf2b008 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -768,6 +768,10 @@ int amdgpu_device_resize_fb_bar(struct
> amdgpu_device *adev)
>  	u16 cmd;
>  	int r;
> 
> +	/* Bypass for VF */
> +	if (amdgpu_sriov_vf(adev))
> +		return 0;
> +
>  	/* Disable memory decoding while we change the BAR addresses
> and size */
>  	pci_read_config_word(adev->pdev, PCI_COMMAND, &cmd);
>  	pci_write_config_word(adev->pdev, PCI_COMMAND,
> --
> 2.9.5
> 
> _______________________________________________
> 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