drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
Subsystems (2)
PATCH 1/1 drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
In virtual machine, there would be a qxl or cirrus graphics device as the default master fbcon device.
So for PF(passthrough mode) or SRIOV VF, it is reasonable to unload amdgpu driver. Amdgpu doesn't have to be the only fbcon device under this condition.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -2
@@ -1103,8 +1103,9 @@ static void amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); - -DRM_ERROR ("Device removal is currently not supported outside of fbcon\n" ); +struct amdgpu_device *adev = dev->dev_private; +if (!amdgpu_sriov_vf (adev) && !amdgpu_passthrough (adev)) +DRM_ERROR ("Device removal is currently not supported outside of fbcon\n" );drm_dev_unplug (dev);drm_dev_put (dev);pci_disable_device (pdev);
Signature · 6 lines
2.7.4 _______________________________________________ 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): [email protected]
Hi, Christian and folks,
In virtual machines(such virt-manager), there's always a virtual graphics device existed like "qxl" as the default gfx device. So under such condition, we believe it's reasonable to unload amdgpu driver as it is not treated as the default fbcon device.
Would you please help to review this patch?
Best wishes,
Jack
-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Wednesday, September 18, 2019 3:25 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
In virtual machine, there would be a qxl or cirrus graphics device as the default master fbcon device.
So for PF(passthrough mode) or SRIOV VF, it is reasonable to unload amdgpu driver. Amdgpu doesn't have to be the only fbcon device under this condition.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -3
@@ -1103,8 +1103,9 @@ static void amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); - -DRM_ERROR ("Device removal is currently not supported outside of fbcon\n" ); +struct amdgpu_device *adev = dev->dev_private; +if (!amdgpu_sriov_vf (adev) && !amdgpu_passthrough (adev)) +DRM_ERROR ("Device removal is currently not supported outside of +fbcon\n");drm_dev_unplug (dev);drm_dev_put (dev);pci_disable_device (pdev); --
2.7.4
_______________________________________________
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): DM6PR12MB367564A4AAC093F841D88018BB8E0-lmeGfMZKVrETl6lK/[email protected]
Hi Jack,
Well that believe is unfortunately completely wrong.
The point is that ANY use of amdgpu by userspace will prevent correct driver unload, that qxl is used for the fbcon doesn't change anything here.
So the patch is a clear NAK. Driver unload is not supposed to work even under SRIOV.
Regards,
Christian.
Am 18.09.2019 09:32 schrieb "Zhang, Jack (Jian)" <[email protected]>:
Hi, Christian and folks,
In virtual machines(such virt-manager), there's always a virtual graphics device existed like "qxl" as the default gfx device. So under such condition, we believe it's reasonable to unload amdgpu driver as it is not treated as the default fbcon device.
Would you please help to review this patch?
Best wishes,
Jack
-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Wednesday, September 18, 2019 3:25 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
In virtual machine, there would be a qxl or cirrus graphics device as the default master fbcon device.
So for PF(passthrough mode) or SRIOV VF, it is reasonable to unload amdgpu driver. Amdgpu doesn't have to be the only fbcon device under this condition.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -3
@@ -1103,8 +1103,9 @@ static void amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); - -DRM_ERROR ("Device removal is currently not supported outside of fbcon\n" ); +struct amdgpu_device *adev = dev->dev_private; +if (!amdgpu_sriov_vf (adev) && !amdgpu_passthrough (adev)) +DRM_ERROR ("Device removal is currently not supported outside of +fbcon\n");drm_dev_unplug (dev);drm_dev_put (dev);pci_disable_device (pdev); --
2.7.4
_______________________________________________
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): 2a7e5c50-7af0-4af1-a46d-834943ab810c-2ueSQiBKiTY7tOexoI0I+QC/[email protected]
Hi Christian,
Before unloading driver, user must sure there is not any userspace to use of amdgpu, if not, it will report driver is in use. And the unloading driver is a feature about amdgpu driver which will be easier to replace driver without rebooting VM. Do you think it has any issue about driver unloading path?
Best wishes
Emily Deng
From: Koenig, Christian <[email protected]>
Sent: Wednesday, September 18, 2019 3:54 PM
To: Zhang, Jack (Jian) <[email protected]>
Cc: [email protected]; Teng, Rui <[email protected]>; Deng, Emily <[email protected]>; Cui, Flora <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
Hi Jack,
Well that believe is unfortunately completely wrong.
The point is that ANY use of amdgpu by userspace will prevent correct driver unload, that qxl is used for the fbcon doesn't change anything here.
So the patch is a clear NAK. Driver unload is not supposed to work even under SRIOV.
Regards,
Christian.
Am 18.09.2019 09:32 schrieb "Zhang, Jack (Jian)" <[email protected]<mailto:[email protected]>>:
Hi, Christian and folks,
In virtual machines(such virt-manager), there's always a virtual graphics device existed like "qxl" as the default gfx device. So under such condition, we believe it's reasonable to unload amdgpu driver as it is not treated as the default fbcon device.
Would you please help to review this patch?
Best wishes,
Jack
-----Original Message-----
From: Jack Zhang <[email protected]<mailto:[email protected]>>
Sent: Wednesday, September 18, 2019 3:25 PM
To: [email protected]<mailto:[email protected]>
Cc: Zhang, Jack (Jian) <[email protected]<mailto:[email protected]>>
Subject: [PATCH] drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
In virtual machine, there would be a qxl or cirrus graphics device as the default master fbcon device.
So for PF(passthrough mode) or SRIOV VF, it is reasonable to unload amdgpu driver. Amdgpu doesn't have to be the only fbcon device under this condition.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -3
@@ -1103,8 +1103,9 @@ static void amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); - -DRM_ERROR ("Device removal is currently not supported outside of fbcon\n" ); +struct amdgpu_device *adev = dev->dev_private; +if (!amdgpu_sriov_vf (adev) && !amdgpu_passthrough (adev)) +DRM_ERROR ("Device removal is currently not supported outside of +fbcon\n");drm_dev_unplug (dev);drm_dev_put (dev);pci_disable_device (pdev); --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Driver unload works fine (barring any bugs) as long as you are not using the device. E.g., unbound the fbcon and no apps are using the GPU.
Alex
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Koenig, Christian <[email protected]>
Sent: Wednesday, September 18, 2019 3:53 AM
To: Zhang, Jack (Jian) <[email protected]>
Cc: Deng, Emily <[email protected]>; Cui, Flora <[email protected]>; Teng, Rui <[email protected]>; [email protected] <[email protected]>
Subject: RE: [PATCH] drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
Hi Jack,
Well that believe is unfortunately completely wrong.
The point is that ANY use of amdgpu by userspace will prevent correct driver unload, that qxl is used for the fbcon doesn't change anything here.
So the patch is a clear NAK. Driver unload is not supposed to work even under SRIOV.
Regards,
Christian.
Am 18.09.2019 09:32 schrieb "Zhang, Jack (Jian)" <[email protected]>:
Hi, Christian and folks,
In virtual machines(such virt-manager), there's always a virtual graphics device existed like "qxl" as the default gfx device. So under such condition, we believe it's reasonable to unload amdgpu driver as it is not treated as the default fbcon device.
Would you please help to review this patch?
Best wishes,
Jack
-----Original Message-----
From: Jack Zhang <[email protected]>
Sent: Wednesday, September 18, 2019 3:25 PM
To: [email protected]
Cc: Zhang, Jack (Jian) <[email protected]>
Subject: [PATCH] drm/amdgpu/sriov: omit fbcon error under sriov or passthrough
In virtual machine, there would be a qxl or cirrus graphics device as the default master fbcon device.
So for PF(passthrough mode) or SRIOV VF, it is reasonable to unload amdgpu driver. Amdgpu doesn't have to be the only fbcon device under this condition.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +4 -3
@@ -1103,8 +1103,9 @@ static void amdgpu_pci_remove(struct pci_dev *pdev) {struct drm_device *dev =pci_get_drvdata (pdev); - -DRM_ERROR ("Device removal is currently not supported outside of fbcon\n" ); +struct amdgpu_device *adev = dev->dev_private; +if (!amdgpu_sriov_vf (adev) && !amdgpu_passthrough (adev)) +DRM_ERROR ("Device removal is currently not supported outside of +fbcon\n");drm_dev_unplug (dev);drm_dev_put (dev);pci_disable_device (pdev); --
2.7.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx