drm/mga200g: Use drm_fb_helper_fill_info
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 26 Mar 2019 13:19:59 +0000 (14:19 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 27 Mar 2019 09:02:13 +0000 (10:02 +0100)
Only changes the name of the fb from "mgadrmfb" to "mga200drmfb".

v2: Rebase

v3: Note the name change (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: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-12-daniel.vetter@ffwll.ch
drivers/gpu/drm/mgag200/mgag200_drv.h
drivers/gpu/drm/mgag200/mgag200_fb.c

index 0aaedc5548798ec32dd7133e3041ee8651cd3270..71a235c2d84892bddbd924bdf76447a49fc0b203 100644 (file)
@@ -113,7 +113,7 @@ struct mga_framebuffer {
 };
 
 struct mga_fbdev {
-       struct drm_fb_helper helper;
+       struct drm_fb_helper helper; /* must be first */
        struct mga_framebuffer mfb;
        void *sysram;
        int size;
index 6893934b26c0387a390540b770ec1e49252902bb..5b7e64cac004962a74c416be22db43d784d8a5c8 100644 (file)
@@ -195,8 +195,6 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
                goto err_alloc_fbi;
        }
 
-       info->par = mfbdev;
-
        ret = mgag200_framebuffer_init(dev, &mfbdev->mfb, &mode_cmd, gobj);
        if (ret)
                goto err_alloc_fbi;
@@ -209,17 +207,13 @@ static int mgag200fb_create(struct drm_fb_helper *helper,
        /* setup helper */
        mfbdev->helper.fb = fb;
 
-       strcpy(info->fix.id, "mgadrmfb");
-
        info->fbops = &mgag200fb_ops;
 
        /* setup aperture base/size for vesafb takeover */
        info->apertures->ranges[0].base = mdev->dev->mode_config.fb_base;
        info->apertures->ranges[0].size = mdev->mc.vram_size;
 
-       drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
-       drm_fb_helper_fill_var(info, &mfbdev->helper, sizes->fb_width,
-                              sizes->fb_height);
+       drm_fb_helper_fill_info(info, &mfbdev->helper, sizes);
 
        info->screen_base = sysram;
        info->screen_size = size;