summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/virtio/virtgpu_kms.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-06-16 14:25:34 +1000
committerGerd Hoffmann <kraxel@redhat.com>2015-06-16 11:22:40 +0200
commit441012aff674c8d2d9b371e1a19320de38eecc84 (patch)
tree90c56017b5fa4d915f199a942f61739d9fe16399 /drivers/gpu/drm/virtio/virtgpu_kms.c
parent50cb941a26b9311c39ba59567fcfad48f5eab4a3 (diff)
downloadlinux-stable-441012aff674c8d2d9b371e1a19320de38eecc84.tar.gz
linux-stable-441012aff674c8d2d9b371e1a19320de38eecc84.tar.bz2
linux-stable-441012aff674c8d2d9b371e1a19320de38eecc84.zip
drm/virtgpu: initialise fbdev after getting initial display info
This should avoid issues with the fbdev path trying to render before we've gotten the display info. Signed-off-by: Dave Airlie <airlied@redhat.com> [ kraxel: wait for display-info reply ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/virtio/virtgpu_kms.c')
-rw-r--r--drivers/gpu/drm/virtio/virtgpu_kms.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/virtio/virtgpu_kms.c b/drivers/gpu/drm/virtio/virtgpu_kms.c
index 132405f15389..782766c00d70 100644
--- a/drivers/gpu/drm/virtio/virtgpu_kms.c
+++ b/drivers/gpu/drm/virtio/virtgpu_kms.c
@@ -137,9 +137,11 @@ int virtio_gpu_driver_load(struct drm_device *dev, unsigned long flags)
virtio_device_ready(vgdev->vdev);
vgdev->vqs_ready = true;
+ virtio_gpu_cmd_get_display_info(vgdev);
+ wait_event_timeout(vgdev->resp_wq, !vgdev->display_info_pending,
+ 5 * HZ);
if (virtio_gpu_fbdev)
virtio_gpu_fbdev_init(vgdev);
- virtio_gpu_cmd_get_display_info(vgdev);
return 0;