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

drm/ast: 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: Dave Airlie <airlied@redhat.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Sean Paul <sean@poorly.run>
Cc: YueHaibing <yuehaibing@huawei.com>
Cc: Sam Bobroff <sbobroff@linux.ibm.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-6-daniel.vetter@ffwll.ch
parent f21b6e47
...@@ -259,7 +259,7 @@ struct ast_framebuffer { ...@@ -259,7 +259,7 @@ struct ast_framebuffer {
}; };
struct ast_fbdev { struct ast_fbdev {
struct drm_fb_helper helper; struct drm_fb_helper helper; /* must be first */
struct ast_framebuffer afb; struct ast_framebuffer afb;
void *sysram; void *sysram;
int size; int size;
......
...@@ -217,8 +217,6 @@ static int astfb_create(struct drm_fb_helper *helper, ...@@ -217,8 +217,6 @@ static int astfb_create(struct drm_fb_helper *helper,
ret = PTR_ERR(info); ret = PTR_ERR(info);
goto out; goto out;
} }
info->par = afbdev;
ret = ast_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj); ret = ast_framebuffer_init(dev, &afbdev->afb, &mode_cmd, gobj);
if (ret) if (ret)
goto out; goto out;
...@@ -229,15 +227,12 @@ static int astfb_create(struct drm_fb_helper *helper, ...@@ -229,15 +227,12 @@ static int astfb_create(struct drm_fb_helper *helper,
fb = &afbdev->afb.base; fb = &afbdev->afb.base;
afbdev->helper.fb = fb; afbdev->helper.fb = fb;
strcpy(info->fix.id, "astdrmfb");
info->fbops = &astfb_ops; info->fbops = &astfb_ops;
info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0); info->apertures->ranges[0].base = pci_resource_start(dev->pdev, 0);
info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0); info->apertures->ranges[0].size = pci_resource_len(dev->pdev, 0);
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); drm_fb_helper_fill_info(info, &afbdev->helper, sizes);
drm_fb_helper_fill_var(info, &afbdev->helper, sizes->fb_width, sizes->fb_height);
info->screen_base = sysram; info->screen_base = sysram;
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