Commit 9d020467 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/virtio: Call drm_helper_mode_fill_fb_struct() before drm_framebuffer_init()

We want framebuffers to be mostly useable already before
drm_framebuffer_init() get called, and so we will start demanding that
all the interesting format/size/etc. information be filled in before
drm_framebuffer_init(). drm_helper_mode_fill_fb_struct() will do that
for us, so let's make sure it gets called before drm_framebuffer_init().

Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479498793-31021-17-git-send-email-ville.syrjala@linux.intel.comReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 5360943f
...@@ -88,12 +88,13 @@ virtio_gpu_framebuffer_init(struct drm_device *dev, ...@@ -88,12 +88,13 @@ virtio_gpu_framebuffer_init(struct drm_device *dev,
bo = gem_to_virtio_gpu_obj(obj); bo = gem_to_virtio_gpu_obj(obj);
drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd);
ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs); ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs);
if (ret) { if (ret) {
vgfb->obj = NULL; vgfb->obj = NULL;
return ret; return ret;
} }
drm_helper_mode_fill_fb_struct(dev, &vgfb->base, mode_cmd);
spin_lock_init(&vgfb->dirty_lock); spin_lock_init(&vgfb->dirty_lock);
vgfb->x1 = vgfb->y1 = INT_MAX; vgfb->x1 = vgfb->y1 = INT_MAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment