Commit f68aeae6 authored by Daniel Vetter's avatar Daniel Vetter

drm/cirrus: 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: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-7-daniel.vetter@ffwll.ch
parent 2f5791cd
...@@ -143,7 +143,7 @@ struct cirrus_device { ...@@ -143,7 +143,7 @@ struct cirrus_device {
struct cirrus_fbdev { struct cirrus_fbdev {
struct drm_fb_helper helper; struct drm_fb_helper helper; /* must be first */
struct drm_framebuffer *gfb; struct drm_framebuffer *gfb;
void *sysram; void *sysram;
int size; int size;
......
...@@ -195,8 +195,6 @@ static int cirrusfb_create(struct drm_fb_helper *helper, ...@@ -195,8 +195,6 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
goto err_vfree; goto err_vfree;
} }
info->par = gfbdev;
fb = kzalloc(sizeof(*fb), GFP_KERNEL); fb = kzalloc(sizeof(*fb), GFP_KERNEL);
if (!fb) { if (!fb) {
ret = -ENOMEM; ret = -ENOMEM;
...@@ -214,13 +212,9 @@ static int cirrusfb_create(struct drm_fb_helper *helper, ...@@ -214,13 +212,9 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
/* setup helper */ /* setup helper */
gfbdev->helper.fb = fb; gfbdev->helper.fb = fb;
strcpy(info->fix.id, "cirrusdrmfb");
info->fbops = &cirrusfb_ops; info->fbops = &cirrusfb_ops;
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); drm_fb_helper_fill_info(info, &gfbdev->helper, sizes);
drm_fb_helper_fill_var(info, &gfbdev->helper, sizes->fb_width,
sizes->fb_height);
/* setup aperture base/size for vesafb takeover */ /* setup aperture base/size for vesafb takeover */
info->apertures->ranges[0].base = cdev->dev->mode_config.fb_base; info->apertures->ranges[0].base = cdev->dev->mode_config.fb_base;
......
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