diff options
author | Dave Airlie <airlied@gmail.com> | 2012-06-22 15:26:28 +0100 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-06-22 15:26:28 +0100 |
commit | 831e32e8f60b4713a6e9576e2b7f0ca19be2dcf3 (patch) | |
tree | 2c8da44682e9f1fe25ab47faaff58af2869fb712 /src/driver.c | |
parent | 12c15dd838e9663ffd2f71460feea7b343a7b423 (diff) |
modesetting: pci probing requires interface version 1.4
Set the drm interface version to 1.4 so we get the bus id correctly.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/driver.c')
-rw-r--r-- | src/driver.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/driver.c b/src/driver.c index f0529f5..ad817c4 100644 --- a/src/driver.c +++ b/src/driver.c @@ -215,10 +215,21 @@ static Bool probe_hw_pci(char *dev, struct pci_device *pdev) { int fd = open_hw(dev); char *id, *devid; + drmSetVersion sv; if (fd == -1) return FALSE; + sv.drm_di_major = 1; + sv.drm_di_minor = 4; + sv.drm_dd_major = -1; + sv.drm_dd_minor = -1; + if (drmSetInterfaceVersion(fd, &sv)) { + close(fd); + return FALSE; + } + + id = drmGetBusid(fd); devid = ms_DRICreatePCIBusID(pdev); close(fd); |