Commit 19d8a4e3 authored by Daniel Vetter's avatar Daniel Vetter

drm/radeon: Use drm_fb_helper_fill_info

This should not result in any changes.

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: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Link: https://patchwork.freedesktop.org/patch/msgid/20190326132008.11781-16-daniel.vetter@ffwll.ch
parent e8f9ad5a
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
* the helper contains a pointer to radeon framebuffer baseclass. * the helper contains a pointer to radeon framebuffer baseclass.
*/ */
struct radeon_fbdev { struct radeon_fbdev {
struct drm_fb_helper helper; struct drm_fb_helper helper; /* must be first */
struct drm_framebuffer fb; struct drm_framebuffer fb;
struct radeon_device *rdev; struct radeon_device *rdev;
}; };
...@@ -247,8 +247,6 @@ static int radeonfb_create(struct drm_fb_helper *helper, ...@@ -247,8 +247,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
/* radeon resume is fragile and needs a vt switch to help it along */ /* radeon resume is fragile and needs a vt switch to help it along */
info->skip_vt_switch = false; info->skip_vt_switch = false;
info->par = rfbdev;
ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->fb, &mode_cmd, gobj); ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->fb, &mode_cmd, gobj);
if (ret) { if (ret) {
DRM_ERROR("failed to initialize framebuffer %d\n", ret); DRM_ERROR("failed to initialize framebuffer %d\n", ret);
...@@ -262,10 +260,6 @@ static int radeonfb_create(struct drm_fb_helper *helper, ...@@ -262,10 +260,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,
memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo)); memset_io(rbo->kptr, 0x0, radeon_bo_size(rbo));
strcpy(info->fix.id, "radeondrmfb");
drm_fb_helper_fill_fix(info, fb->pitches[0], fb->format->depth);
info->fbops = &radeonfb_ops; info->fbops = &radeonfb_ops;
tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start; tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start;
...@@ -274,7 +268,7 @@ static int radeonfb_create(struct drm_fb_helper *helper, ...@@ -274,7 +268,7 @@ static int radeonfb_create(struct drm_fb_helper *helper,
info->screen_base = rbo->kptr; info->screen_base = rbo->kptr;
info->screen_size = radeon_bo_size(rbo); info->screen_size = radeon_bo_size(rbo);
drm_fb_helper_fill_var(info, &rfbdev->helper, sizes->fb_width, sizes->fb_height); drm_fb_helper_fill_info(info, &rfbdev->helper, sizes);
/* setup aperture base/size for vesafb takeover */ /* setup aperture base/size for vesafb takeover */
info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base; info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base;
......
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