Skip to content

Commit 17fb465

Browse files
alistair23airlied
authored andcommitted
drm/bochs: Fix the ID mismatch error
When running RISC-V QEMU with the Bochs device attached via PCIe the probe of the Bochs device fails with: [drm:bochs_hw_init] *ERROR* ID mismatch This was introduced by this commit: 7780eb9 bochs: convert to drm_dev_register To fix the error we ensure that pci_enable_device() is called before bochs_load(). Fixes: 7780eb9 ("bochs: convert to drm_dev_register") Signed-off-by: Alistair Francis <alistair.francis@wdc.com> Reported-by: David Abdurachmanov <david.abdurachmanov@gmail.com> Link: http://patchwork.freedesktop.org/patch/msgid/20190221003231.31625-1-alistair.francis@wdc.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
1 parent 2216322 commit 17fb465

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/bochs/bochs_drv.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ static int bochs_pci_probe(struct pci_dev *pdev,
154154
if (IS_ERR(dev))
155155
return PTR_ERR(dev);
156156

157+
ret = pci_enable_device(pdev);
158+
if (ret)
159+
goto err_free_dev;
160+
157161
dev->pdev = pdev;
158162
pci_set_drvdata(pdev, dev);
159163

0 commit comments

Comments
 (0)