Commit 2b617b14 authored by Daniel Vetter's avatar Daniel Vetter

drm/hibmc: Use drm_fb_helper_fill_info

Should not result in any changes.

v2: Rebase
Acked-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Ajit Negi <ajitn.linux@gmail.com>
Cc: Souptick Joarder <jrdr.linux@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: John Garry <john.garry@huawei.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-10-daniel.vetter@ffwll.ch
parent dfec164e
...@@ -31,7 +31,7 @@ struct hibmc_framebuffer { ...@@ -31,7 +31,7 @@ struct hibmc_framebuffer {
}; };
struct hibmc_fbdev { struct hibmc_fbdev {
struct drm_fb_helper helper; struct drm_fb_helper helper; /* must be first */
struct hibmc_framebuffer *fb; struct hibmc_framebuffer *fb;
int size; int size;
}; };
......
...@@ -116,8 +116,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper, ...@@ -116,8 +116,6 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
goto out_release_fbi; goto out_release_fbi;
} }
info->par = hi_fbdev;
hi_fbdev->fb = hibmc_framebuffer_init(priv->dev, &mode_cmd, gobj); hi_fbdev->fb = hibmc_framebuffer_init(priv->dev, &mode_cmd, gobj);
if (IS_ERR(hi_fbdev->fb)) { if (IS_ERR(hi_fbdev->fb)) {
ret = PTR_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, ...@@ -129,14 +127,9 @@ static int hibmc_drm_fb_create(struct drm_fb_helper *helper,
priv->fbdev->size = size; priv->fbdev->size = size;
hi_fbdev->helper.fb = &hi_fbdev->fb->fb; hi_fbdev->helper.fb = &hi_fbdev->fb->fb;
strcpy(info->fix.id, "hibmcdrmfb");
info->fbops = &hibmc_drm_fb_ops; info->fbops = &hibmc_drm_fb_ops;
drm_fb_helper_fill_fix(info, hi_fbdev->fb->fb.pitches[0], drm_fb_helper_fill_info(info, &priv->fbdev->helper, sizes);
hi_fbdev->fb->fb.format->depth);
drm_fb_helper_fill_var(info, &priv->fbdev->helper, sizes->fb_width,
sizes->fb_height);
info->screen_base = bo->kmap.virtual; info->screen_base = bo->kmap.virtual;
info->screen_size = size; info->screen_size = size;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment