Commit dfec164e authored by Daniel Vetter's avatar Daniel Vetter

drm/gma500: Use drm_fb_helper_fill_info

This will change the fb name from "psbdrmfb" to "gma500drmfb".

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: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-9-daniel.vetter@ffwll.ch
parent fb68e596
...@@ -389,7 +389,6 @@ static int psbfb_create(struct psb_fbdev *fbdev, ...@@ -389,7 +389,6 @@ static int psbfb_create(struct psb_fbdev *fbdev,
ret = PTR_ERR(info); ret = PTR_ERR(info);
goto out; goto out;
} }
info->par = fbdev;
mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth); mode_cmd.pixel_format = drm_mode_legacy_fb_format(bpp, depth);
...@@ -402,9 +401,6 @@ static int psbfb_create(struct psb_fbdev *fbdev, ...@@ -402,9 +401,6 @@ static int psbfb_create(struct psb_fbdev *fbdev,
fbdev->psb_fb_helper.fb = fb; fbdev->psb_fb_helper.fb = fb;
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
strcpy(info->fix.id, "psbdrmfb");
if (dev_priv->ops->accel_2d && pitch_lines > 8) /* 2D engine */ if (dev_priv->ops->accel_2d && pitch_lines > 8) /* 2D engine */
info->fbops = &psbfb_ops; info->fbops = &psbfb_ops;
else if (gtt_roll) { /* GTT rolling seems best */ else if (gtt_roll) { /* GTT rolling seems best */
...@@ -427,8 +423,7 @@ static int psbfb_create(struct psb_fbdev *fbdev, ...@@ -427,8 +423,7 @@ static int psbfb_create(struct psb_fbdev *fbdev,
info->apertures->ranges[0].size = dev_priv->gtt.stolen_size; info->apertures->ranges[0].size = dev_priv->gtt.stolen_size;
} }
drm_fb_helper_fill_var(info, &fbdev->psb_fb_helper, drm_fb_helper_fill_info(info, &fbdev->psb_fb_helper, sizes);
sizes->fb_width, sizes->fb_height);
info->fix.mmio_start = pci_resource_start(dev->pdev, 0); info->fix.mmio_start = pci_resource_start(dev->pdev, 0);
info->fix.mmio_len = pci_resource_len(dev->pdev, 0); info->fix.mmio_len = pci_resource_len(dev->pdev, 0);
......
...@@ -34,7 +34,7 @@ struct psb_framebuffer { ...@@ -34,7 +34,7 @@ struct psb_framebuffer {
}; };
struct psb_fbdev { struct psb_fbdev {
struct drm_fb_helper psb_fb_helper; struct drm_fb_helper psb_fb_helper; /* must be first */
struct psb_framebuffer pfb; struct psb_framebuffer pfb;
}; };
......
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