[PATCHv5 21/34] drm/komeda: Use helper for common tasks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The replaced fragment is 1:1 with the helper code.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxxxx>
---
 .../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 c2b29d4e6fbb..26d1a3cfb587 100644
--- a/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
+++ b/drivers/gpu/drm/arm/display/komeda/komeda_framebuffer.c
@@ -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;
 
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux