drm/amdgpu: only register VGA devices with the VGA arbiter
Subsystems (2)
PATCH 1/1 drm/amdgpu: only register VGA devices with the VGA arbiter
We only need to arbitrate VGA access on VGA compatible devices.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -2
@@ -3346,7 +3346,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* if we have > 1 VGA cards, then disable the amdgpu VGA resources */ /* this will fail for cards that aren't VGA class devices, just * ignore it */ -vga_client_register (adev->pdev, adev,NULL , amdgpu_device_vga_set_decode); +if ((adev->pdev->class >>8 ) ==PCI_CLASS_DISPLAY_VGA ) +vga_client_register (adev->pdev, adev,NULL , amdgpu_device_vga_set_decode);if (amdgpu_device_supports_boco (ddev)) boco = true;
@@ -3605,7 +3606,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)vga_switcheroo_unregister_client (adev->pdev);if (amdgpu_device_supports_boco (adev_to_drm (adev)))vga_switcheroo_fini_domain_pm_ops (adev->dev); -vga_client_register (adev->pdev,NULL ,NULL ,NULL ); +if ((adev->pdev->class >>8 ) ==PCI_CLASS_DISPLAY_VGA ) +vga_client_register (adev->pdev,NULL ,NULL ,NULL );if (adev->rio_mem)pci_iounmap (adev->pdev, adev->rio_mem); adev->rio_mem =NULL ;
Signature · 6 lines
2.25.4 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
[AMD Official Use Only - Internal Distribution Only]
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, November 20, 2020 10:55 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: only register VGA devices with the VGA arbiter
We only need to arbitrate VGA access on VGA compatible devices.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -2
@@ -3346,7 +3346,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* if we have > 1 VGA cards, then disable the amdgpu VGA resources */ /* this will fail for cards that aren't VGA class devices, just * ignore it */ -vga_client_register (adev->pdev, adev,NULL , amdgpu_device_vga_set_decode); +if ((adev->pdev->class >>8 ) ==PCI_CLASS_DISPLAY_VGA ) +vga_client_register (adev->pdev, adev,NULL , amdgpu_device_vga_set_decode);if (amdgpu_device_supports_boco (ddev)) boco = true;
@@ -3605,7 +3606,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)vga_switcheroo_unregister_client (adev->pdev);if (amdgpu_device_supports_boco (adev_to_drm (adev)))vga_switcheroo_fini_domain_pm_ops (adev->dev); -vga_client_register (adev->pdev,NULL ,NULL ,NULL ); +if ((adev->pdev->class >>8 ) ==PCI_CLASS_DISPLAY_VGA ) +vga_client_register (adev->pdev,NULL ,NULL ,NULL );if (adev->rio_mem)pci_iounmap (adev->pdev, adev->rio_mem); adev->rio_mem =NULL ;
--
2.25.4
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CFeifei.Xu%40amd.com%7C8eac65802c2841a4016408d88d645737%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637414809390017528%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4YGYTXm%2FY8MAQiqs4QJ1MUIcy2%2F4waucDrIeob63ogk%3D&reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Reviewed-byAm 20.11.20 um 16:04 schrieb Xu, Feifei:
Quoted 45 lines
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by Feifei Xu <[email protected]>-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Friday, November 20, 2020 10:55 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>
Subject: [PATCH] drm/amdgpu: only register VGA devices with the VGA arbiterWe only need to arbitrate VGA access on VGA compatible devices.
Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4
-3@@ -3346,7 +3346,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,/* if we have > 1 VGA cards, then disable the amdgpu VGA resources */ /* this will fail for cards that aren't VGA class devices, just * ignore it */ -vga_client_register (adev->pdev, adev,NULL , amdgpu_device_vga_set_decode); +if ((adev->pdev->class >>8 ) ==PCI_CLASS_DISPLAY_VGA ) +vga_client_register (adev->pdev, adev,NULL , amdgpu_device_vga_set_decode);if (amdgpu_device_supports_boco (ddev)) boco = true;@@ -3605,7 +3606,8 @@ void amdgpu_device_fini(struct amdgpu_device *adev)vga_switcheroo_unregister_client (adev->pdev);if (amdgpu_device_supports_boco (adev_to_drm (adev)))vga_switcheroo_fini_domain_pm_ops (adev->dev); -vga_client_register (adev->pdev,NULL ,NULL ,NULL ); +if ((adev->pdev->class >>8 ) ==PCI_CLASS_DISPLAY_VGA ) +vga_client_register (adev->pdev,NULL ,NULL ,NULL );if (adev->rio_mem)pci_iounmap (adev->pdev, adev->rio_mem); adev->rio_mem =NULL ; --2.25.4
Quoted 8 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=04%7C01%7CFeifei.Xu%40amd.com%7C8eac65802c2841a4016408d88d645737%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637414809390017528%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=4YGYTXm%2FY8MAQiqs4QJ1MUIcy2%2F4waucDrIeob63ogk%3D&reserved=0
_______________________________________________
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