diff options
| author | Alistair Francis <Alistair.Francis@wdc.com> | 2019-02-20 19:33:03 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2019-02-27 23:05:33 -0500 |
| commit | 17fb465f16027ea22225b282295f5b8af19992e0 (patch) | |
| tree | 766a25d61df42b19752f38b7643c1d35d3f31935 | |
| parent | 2216322919c8608a448d7ebc560a845238a5d6b6 (diff) | |
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:
7780eb9ce8 bochs: convert to drm_dev_register
To fix the error we ensure that pci_enable_device() is called before
bochs_load().
Fixes: 7780eb9ce80f ("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>
| -rw-r--r-- | drivers/gpu/drm/bochs/bochs_drv.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index f3dd66ae990a..aa35007262cd 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c | |||
| @@ -154,6 +154,10 @@ static int bochs_pci_probe(struct pci_dev *pdev, | |||
| 154 | if (IS_ERR(dev)) | 154 | if (IS_ERR(dev)) |
| 155 | return PTR_ERR(dev); | 155 | return PTR_ERR(dev); |
| 156 | 156 | ||
| 157 | ret = pci_enable_device(pdev); | ||
| 158 | if (ret) | ||
| 159 | goto err_free_dev; | ||
| 160 | |||
| 157 | dev->pdev = pdev; | 161 | dev->pdev = pdev; |
| 158 | pci_set_drvdata(pdev, dev); | 162 | pci_set_drvdata(pdev, dev); |
| 159 | 163 | ||
