* [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF
@ 2017-11-07 3:08 Pixel Ding
[not found] ` <1510024085-21956-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Pixel Ding @ 2017-11-07 3:08 UTC (permalink / raw)
To: ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: pding
From: pding <Pixel.Ding@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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF
[not found] ` <1510024085-21956-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
@ 2017-11-07 10:27 ` Christian König
2017-11-07 15:45 ` Deucher, Alexander
1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2017-11-07 10:27 UTC (permalink / raw)
To: Pixel Ding, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Am 07.11.2017 um 04:08 schrieb Pixel Ding:
> From: pding <Pixel.Ding@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@amd.com>
Reviewed-by: Christian König <christian.koenig@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,
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF
[not found] ` <1510024085-21956-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-11-07 10:27 ` Christian König
@ 2017-11-07 15:45 ` Deucher, Alexander
1 sibling, 0 replies; 3+ messages in thread
From: Deucher, Alexander @ 2017-11-07 15:45 UTC (permalink / raw)
To: ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
Cc: Ding, Pixel
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Pixel Ding
> Sent: Monday, November 06, 2017 10:08 PM
> To: ckoenig.leichtzumerken@gmail.com; amd-gfx@lists.freedesktop.org
> Cc: Ding, Pixel
> Subject: [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF
>
> From: pding <Pixel.Ding@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@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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@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] 3+ messages in thread
end of thread, other threads:[~2017-11-07 15:45 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 3:08 [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF Pixel Ding
[not found] ` <1510024085-21956-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org>
2017-11-07 10:27 ` Christian König
2017-11-07 15:45 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.