Commit 5a3887ba authored by Daniel Vetter's avatar Daniel Vetter

drm/udl: Use drm_fb_helper_fill_info

This should not result in any changes.

v2: Rebase

v3: Don't forget to remove the info->par assignment (Noralf)
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: Sean Paul <sean@poorly.run>
Cc: Mikulas Patocka <mpatocka@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Emil Lundmark <lndmrk@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-19-daniel.vetter@ffwll.ch
parent c8613fc6
...@@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); ...@@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
struct udl_fbdev { struct udl_fbdev {
struct drm_fb_helper helper; struct drm_fb_helper helper; /* must be first */
struct udl_framebuffer ufb; struct udl_framebuffer ufb;
int fb_count; int fb_count;
}; };
...@@ -392,7 +392,6 @@ static int udlfb_create(struct drm_fb_helper *helper, ...@@ -392,7 +392,6 @@ static int udlfb_create(struct drm_fb_helper *helper,
ret = PTR_ERR(info); ret = PTR_ERR(info);
goto out_gfree; goto out_gfree;
} }
info->par = ufbdev;
ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, obj); ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, obj);
if (ret) if (ret)
...@@ -402,15 +401,12 @@ static int udlfb_create(struct drm_fb_helper *helper, ...@@ -402,15 +401,12 @@ static int udlfb_create(struct drm_fb_helper *helper,
ufbdev->helper.fb = fb; ufbdev->helper.fb = fb;
strcpy(info->fix.id, "udldrmfb");
info->screen_base = ufbdev->ufb.obj->vmapping; info->screen_base = ufbdev->ufb.obj->vmapping;
info->fix.smem_len = size; info->fix.smem_len = size;
info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping; info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping;
info->fbops = &udlfb_ops; info->fbops = &udlfb_ops;
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); drm_fb_helper_fill_info(info, &ufbdev->helper, sizes);
drm_fb_helper_fill_var(info, &ufbdev->helper, sizes->fb_width, sizes->fb_height);
DRM_DEBUG_KMS("allocated %dx%d vmal %p\n", DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
fb->width, fb->height, fb->width, fb->height,
......
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