Skip to contentSkip to conversation

drm/amdgpu: bypass FB resizing for SRIOV VF

PATCH In review Pixel Ding 3 participants 3 messages Nov 7, 2017 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

Pixel Ding

author
#0 lore raw

PATCH 1/1 drm/amdgpu: bypass FB resizing for SRIOV VF

From: pding <[email protected]>

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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
index 6f01dda..bf2b008 100644
@@ -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,
Signature · 6 lines
2.9.5

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): 1510024085-21956-1-git-send-email-Pixel.Ding-5C7GfCeVMHo@public.gmane.org

Reviewed-by
#2 lore raw

Am 07.11.2017 um 04:08 schrieb Pixel Ding:

Quoted 7 lines

From: pding <[email protected]>

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.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
  1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -0
index 6f01dda..bf2b008 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c int amdgpu_device_resize_fb_bar(struct amdgpu_device *adev) · line 777

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
@@ -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
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reviewed-by Alex Deucher
#3 lore raw
In reply to a message not in the archive
Quoted 8 lines

-----Original Message-----
From: amd-gfx [mailto:[email protected]] On Behalf Of Pixel Ding
Sent: Monday, November 06, 2017 10:08 PM
To: [email protected]; [email protected]
Cc: Ding, Pixel
Subject: [PATCH] drm/amdgpu: bypass FB resizing for SRIOV VF

Quoted 7 lines

From: pding <[email protected]>

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.

Quoted 25 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -0
index 6f01dda..bf2b008 100644
@@ -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 */

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
 	pci_read_config_word(adev->pdev, PCI_COMMAND, &cmd);
 	pci_write_config_word(adev->pdev, PCI_COMMAND,
--

2.9.5

Quoted 4 lines

_______________________________________________
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