[PATCH 13/26] drm/hibmc: Use drm_fb_helper_fill_info

Daniel Vetter daniel.vetter at ffwll.ch
Thu Jan 24 16:58:18 UTC 2019


Should not result in any changes.

Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
Cc: Alex Deucher <alexander.deucher at amd.com>
Cc: Junwei Zhang <Jerry.Zhang at amd.com>
Cc: Xinliang Liu <z.liuxinliang at hisilicon.com>
Cc: "Christian König" <christian.koenig at amd.com>
Cc: Ajit Negi <ajitn.linux at gmail.com>
Cc: Souptick Joarder <jrdr.linux at gmail.com>
Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
Cc: John Garry <john.garry at huawei.com>
---
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   | 2 +-
 drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c | 9 +--------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
index 3c168ae77b0c..0a381c22de26 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h
@@ -31,7 +31,7 @@ struct hibmc_framebuffer {
 };
 
 struct hibmc_fbdev {
-	struct drm_fb_helper helper;
+	struct drm_fb_helper helper; /* must be first */
 	struct hibmc_framebuffer *fb;
 	int size;
 };
diff --git a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
index de9d7cc97e44..620fca7e2cdc 100644
--- a/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
+++ b/drivers/gpu/drm/hisilicon/hibmc/hibmc_drm_fbdev.c
@@ -116,8 +116,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
 		goto out_release_fbi;
 	}
 
-	info->par = hi_fbdev;
-
 	hi_fbdev->fb = hibmc_framebuffer_init(priv->dev, &mode_cmd, gobj);
 	if (IS_ERR(hi_fbdev->fb)) {
 		ret = PTR_ERR(hi_fbdev->fb);
@@ -129,14 +127,9 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
 	priv->fbdev->size = size;
 	hi_fbdev->helper.fb = &hi_fbdev->fb->fb;
 
-	strcpy(info->fix.id, "hibmcdrmfb");
-
 	info->fbops = &hibmc_drm_fb_ops;
 
-	drm_fb_helper_fill_fix(info, hi_fbdev->fb->fb.pitches[0],
-			       hi_fbdev->fb->fb.format->depth);
-	drm_fb_helper_fill_var(info, &priv->fbdev->helper, sizes->fb_width,
-			       sizes->fb_height);
+	drm_fb_helper_fill_info(info, &priv->fbdev->helper);
 
 	info->screen_base = bo->kmap.virtual;
 	info->screen_size = size;
-- 
2.20.1



More information about the dri-devel mailing list