drm/amdgpu: only register VGA devices with the VGA arbiter
We only need to arbitrate VGA access on VGA compatible devices. Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
95666c6cfe
commit
38d6be8199
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user