summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-08-13 03:13:07 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-08-13 03:13:07 +0000
commitfaf912840272bc298ec472cee4085201a0811d6a (patch)
treec2c3108a67c664647175498c0783a493f06e4a28 /sys/dev
parentee1390c110bfde018d9102f391a57957efb1bea8 (diff)
Don't match on amdgpu devices flagged as having experimental hardware support
(AMD_EXP_HW_SUPPORT) in the amdgpu_pciidlist table. Prompted by a report from Charlie Burnett that display doesn't light up with a Radeon VII (VEGA20).
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c17
-rw-r--r--sys/dev/pci/drm/include/drm/drm_drv.h2
2 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
index a46e8548679..526306cf86f 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_kms.c
@@ -1337,10 +1337,23 @@ int amdgpu_debugfs_firmware_init(struct amdgpu_device *adev)
int
amdgpu_probe(struct device *parent, void *match, void *aux)
{
+ struct pci_attach_args *pa = aux;
+ const struct drm_pcidev *id_entry;
+ unsigned long flags = 0;
+
if (amdgpu_fatal_error)
return 0;
- if (drm_pciprobe(aux, amdgpu_pciidlist))
- return 20;
+
+ id_entry = drm_find_description(PCI_VENDOR(pa->pa_id),
+ PCI_PRODUCT(pa->pa_id), amdgpu_pciidlist);
+ if (id_entry != NULL) {
+ flags = id_entry->driver_data;
+ if (flags & AMD_EXP_HW_SUPPORT)
+ return 0;
+ else
+ return 20;
+ }
+
return 0;
}
diff --git a/sys/dev/pci/drm/include/drm/drm_drv.h b/sys/dev/pci/drm/include/drm/drm_drv.h
index 2983e715fff..3d643545b17 100644
--- a/sys/dev/pci/drm/include/drm/drm_drv.h
+++ b/sys/dev/pci/drm/include/drm/drm_drv.h
@@ -291,5 +291,7 @@ static inline bool drm_drv_uses_atomic_modeset(struct drm_device *dev)
int drm_dev_register(struct drm_device *, unsigned long);
void drm_dev_unregister(struct drm_device *);
int drm_getpciinfo(struct drm_device *, void *, struct drm_file *);
+const struct drm_pcidev *drm_find_description(int, int,
+ const struct drm_pcidev *);
#endif