drm/cirrus: Use drm_fb_helper_fill_info
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Mar 2019 13:19:54 +0000 (14:19 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 Mar 2019 08:57:02 +0000 (09:57 +0100)
Should not result in any changes.

v2: Rebase

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: Gerd Hoffmann <kraxel@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-7-daniel.vetter@ffwll.ch
drivers/gpu/drm/cirrus/cirrus_drv.h
drivers/gpu/drm/cirrus/cirrus_fbdev.c

index f2b2e0d169fabb73a8c55a6ab459720799a682cf..91570973925768b0123d0eb8872ab049b0d11ea5 100644 (file)
@@ -143,7 +143,7 @@ struct cirrus_device {
 
 
 struct cirrus_fbdev {
-       struct drm_fb_helper helper;
+       struct drm_fb_helper helper; /* must be first */
        struct drm_framebuffer *gfb;
        void *sysram;
        int size;
index 39df62acac69d3c200910fd973e9933cde3b4b8d..2e6128069fc3126f018fd98e3f3a7b0123ca51f9 100644 (file)
@@ -195,8 +195,6 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
                goto err_vfree;
        }
 
-       info->par = gfbdev;
-
        fb = kzalloc(sizeof(*fb), GFP_KERNEL);
        if (!fb) {
                ret = -ENOMEM;
@@ -214,13 +212,9 @@ static int cirrusfb_create(struct drm_fb_helper *helper,
        /* setup helper */
        gfbdev->helper.fb = fb;
 
-       strcpy(info->fix.id, "cirrusdrmfb");
-
        info->fbops = &cirrusfb_ops;
 
-       drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-       drm_fb_helper_fill_var(info, &gfbdev->helper, sizes->fb_width,
-                              sizes->fb_height);
+       drm_fb_helper_fill_info(info, &gfbdev->helper, sizes);
 
        /* setup aperture base/size for vesafb takeover */
        info->apertures->ranges[0].base = cdev->dev->mode_config.fb_base;