@@ -184,17 +184,10 @@ komeda_fb_create(struct drm_device *dev, struct drm_file *file,
goto err_cleanup;
}
- drm_helper_mode_fill_fb_struct(dev, &kfb->base, mode_cmd);
-
- for (i = 0; i < info->num_planes; ++i)
- kfb->base.obj[i] = objs[i];
-
- ret = drm_framebuffer_init(dev, &kfb->base, &komeda_fb_funcs);
- if (ret < 0) {
- DRM_DEBUG_KMS("failed to initialize fb\n");
-
+ ret = drm_gem_fb_init_with_funcs(&kfb->base, dev, mode_cmd, objs,
+ info->num_planes, &komeda_fb_funcs);
+ if (ret < 0)
goto err_cleanup;
- }
kfb->is_va = mdev->iommu ? true : false;
The replaced fragment is 1:1 with the helper code. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> --- .../gpu/drm/arm/display/komeda/komeda_framebuffer.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-)