aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2019-03-26 09:20:06 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2019-03-27 05:08:02 -0400
commit5a3887ba8a529682a71740308e4e67b30a2b87b4 (patch)
treeb4de36c0d06c8a57c354b2dade1f88411f47245f
parentc8613fc6293b0f8c1d303c991338d085cf4d9f12 (diff)
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: Noralf Trønnes <noralf@tronnes.org> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Daniel 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
-rw-r--r--drivers/gpu/drm/udl/udl_fb.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index dd9ffded223b..f8ff5a6f559e 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -32,7 +32,7 @@ module_param(fb_bpp, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
32module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP); 32module_param(fb_defio, int, S_IWUSR | S_IRUSR | S_IWGRP | S_IRGRP);
33 33
34struct udl_fbdev { 34struct udl_fbdev {
35 struct drm_fb_helper helper; 35 struct drm_fb_helper helper; /* must be first */
36 struct udl_framebuffer ufb; 36 struct udl_framebuffer ufb;
37 int fb_count; 37 int fb_count;
38}; 38};
@@ -392,7 +392,6 @@ static int udlfb_create(struct drm_fb_helper *helper,
392 ret = PTR_ERR(info); 392 ret = PTR_ERR(info);
393 goto out_gfree; 393 goto out_gfree;
394 } 394 }
395 info->par = ufbdev;
396 395
397 ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, obj); 396 ret = udl_framebuffer_init(dev, &ufbdev->ufb, &mode_cmd, obj);
398 if (ret) 397 if (ret)
@@ -402,15 +401,12 @@ static int udlfb_create(struct drm_fb_helper *helper,
402 401
403 ufbdev->helper.fb = fb; 402 ufbdev->helper.fb = fb;
404 403
405 strcpy(info->fix.id, "udldrmfb");
406
407 info->screen_base = ufbdev->ufb.obj->vmapping; 404 info->screen_base = ufbdev->ufb.obj->vmapping;
408 info->fix.smem_len = size; 405 info->fix.smem_len = size;
409 info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping; 406 info->fix.smem_start = (unsigned long)ufbdev->ufb.obj->vmapping;
410 407
411 info->fbops = &udlfb_ops; 408 info->fbops = &udlfb_ops;
412 drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth); 409 drm_fb_helper_fill_info(info, &ufbdev->helper, sizes);
413 drm_fb_helper_fill_var(info, &ufbdev->helper, sizes->fb_width, sizes->fb_height);
414 410
415 DRM_DEBUG_KMS("allocated %dx%d vmal %p\n", 411 DRM_DEBUG_KMS("allocated %dx%d vmal %p\n",
416 fb->width, fb->height, 412 fb->width, fb->height,