[PATCHv4 23/36] drm/komeda: Use helper for common tasks
Andrzej Pietrasiewicz
andrzej.p at collabora.com
Fri Dec 13 15:58:54 UTC 2019
The replaced fragment is 1:1 with the helper code.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p at collabora.com>
---
.../gpu/drm/arm/display/komeda/komeda_framebuffer.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
index 1a03318ec73a..74c0caa51bdf 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
@@ -185,17 +185,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;
--
2.17.1
More information about the dri-devel
mailing list