@@ -3560,6 +3560,15 @@ static const struct attribute *amdgpu_dev_attributes[] = {
NULL
};
+static bool amdgpu_is_boot_device(struct pci_dev *pdev)
+{
+ struct drm_device *dev = pci_get_drvdata(pdev);
+ struct amdgpu_device *adev = drm_to_adev(dev);
+ struct amdgpu_gmc *gmc = &adev->gmc;
+
+ return drm_aperture_contain_firmware_fb(gmc->aper_base, gmc->aper_size);
+}
+
/**
* amdgpu_device_init - initialize the driver
*
@@ -3960,7 +3969,8 @@ int amdgpu_device_init(struct amdgpu_device *adev,
/* this will fail for cards that aren't VGA class devices, just
* ignore it */
if ((adev->pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA)
- vga_client_register(adev->pdev, amdgpu_device_vga_set_decode, NULL);
+ vga_client_register(adev->pdev, amdgpu_device_vga_set_decode,
+ amdgpu_is_boot_device);
px = amdgpu_device_supports_px(ddev);