diff options
author | Dave Airlie <airlied@redhat.com> | 2016-09-28 13:23:07 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2016-09-28 13:23:07 +1000 |
commit | c0d5fb4d0d9224ccaad0475c9b58740873970e7e (patch) | |
tree | 202ee565e7d873f6580b85251aba75a00bac1fc2 /drivers/gpu/drm/bochs | |
parent | ca09fb9f60b5f3ab2d57e761aaeea89a5147d784 (diff) | |
parent | 30b9c96cf7b44d53b9165649c8be34ac234be324 (diff) | |
download | linux-c0d5fb4d0d9224ccaad0475c9b58740873970e7e.tar.bz2 |
Merge tag 'drm-qemu-20160921' of git://git.kraxel.org/linux into drm-next
bugfixes for qemu (bochs, qxl and virtio-gpu) drm drivers
* tag 'drm-qemu-20160921' of git://git.kraxel.org/linux:
drm/virtio: add real fence context and seqno
drm/virtio: drop virtio_gpu_execbuffer_ioctl() wrapping
virtio-gpu: avoid possible NULL pointer dereference
drm/qxl: reapply cursor after SetCrtc calls
bochs: ignore device if there isn't enougth memory
Diffstat (limited to 'drivers/gpu/drm/bochs')
-rw-r--r-- | drivers/gpu/drm/bochs/bochs_drv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index 277654abe0f7..534227df23f3 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -163,8 +163,15 @@ static int bochs_kick_out_firmware_fb(struct pci_dev *pdev) static int bochs_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { + unsigned long fbsize; int ret; + fbsize = pci_resource_len(pdev, 0); + if (fbsize < 4 * 1024 * 1024) { + DRM_ERROR("less than 4 MB video memory, ignoring device\n"); + return -ENOMEM; + } + ret = bochs_kick_out_firmware_fb(pdev); if (ret) return ret; |