Skip to content

Commit e7e9cde

Browse files
committed
drm/virtio: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()
Plumb the format info from .fb_create() all the way to drm_helper_mode_fill_fb_struct() to avoid the redundant lookup. Cc: David Airlie <[email protected]> Cc: Gerd Hoffmann <[email protected]> Cc: Dmitry Osipenko <[email protected]> Cc: Gurchetan Singh <[email protected]> Cc: Chia-I Wu <[email protected]> Cc: [email protected] Reviewed-by: Thomas Zimmermann <[email protected]> Acked-by: Dmitry Osipenko <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent b146e3e commit e7e9cde

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/virtio/virtgpu_display.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,15 @@ static const struct drm_framebuffer_funcs virtio_gpu_fb_funcs = {
6666
static int
6767
virtio_gpu_framebuffer_init(struct drm_device *dev,
6868
struct virtio_gpu_framebuffer *vgfb,
69+
const struct drm_format_info *info,
6970
const struct drm_mode_fb_cmd2 *mode_cmd,
7071
struct drm_gem_object *obj)
7172
{
7273
int ret;
7374

7475
vgfb->base.obj[0] = obj;
7576

76-
drm_helper_mode_fill_fb_struct(dev, &vgfb->base, NULL, mode_cmd);
77+
drm_helper_mode_fill_fb_struct(dev, &vgfb->base, info, mode_cmd);
7778

7879
ret = drm_framebuffer_init(dev, &vgfb->base, &virtio_gpu_fb_funcs);
7980
if (ret) {
@@ -315,7 +316,7 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
315316
return ERR_PTR(-ENOMEM);
316317
}
317318

318-
ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, mode_cmd, obj);
319+
ret = virtio_gpu_framebuffer_init(dev, virtio_gpu_fb, info, mode_cmd, obj);
319320
if (ret) {
320321
kfree(virtio_gpu_fb);
321322
drm_gem_object_put(obj);

0 commit comments

Comments
 (0)