Skip to content

Commit

Permalink
drm/bochs: Fix the ID mismatch error
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alistair Francis authored and Dave Airlie committed Feb 28, 2019
1 parent 2216322 commit 17fb465
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/bochs/bochs_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,10 @@ static int bochs_pci_probe(struct pci_dev *pdev,
if (IS_ERR(dev))
return PTR_ERR(dev);

ret = pci_enable_device(pdev);
if (ret)
goto err_free_dev;

dev->pdev = pdev;
pci_set_drvdata(pdev, dev);

Expand Down

0 comments on commit 17fb465

Please sign in to comment.