Skip to content

Commit

Permalink
drm/radeon: Use drm_fb_helper_fill_info
Browse files Browse the repository at this point in the history
This should not result in any changes.

v2: Rebase

Acked-by: Noralf Trønnes <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Cc: Alex Deucher <[email protected]>
Cc: "Christian König" <[email protected]>
Cc: "David (ChunMing) Zhou" <[email protected]>
Cc: [email protected]
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
danvet committed Mar 27, 2019
1 parent e8f9ad5 commit 19d8a4e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/gpu/drm/radeon/radeon_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* the helper contains a pointer to radeon framebuffer baseclass.
*/
struct radeon_fbdev {
struct drm_fb_helper helper;
struct drm_fb_helper helper; /* must be first */
struct drm_framebuffer fb;
struct radeon_device *rdev;
};
Expand Down Expand Up @@ -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 */
info->skip_vt_switch = false;

info->par = rfbdev;

ret = radeon_framebuffer_init(rdev->ddev, &rfbdev->fb, &mode_cmd, gobj);
if (ret) {
DRM_ERROR("failed to initialize framebuffer %d\n", ret);
Expand All @@ -262,10 +260,6 @@ static int radeonfb_create(struct drm_fb_helper *helper,

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;

tmp = radeon_bo_gpu_offset(rbo) - rdev->mc.vram_start;
Expand All @@ -274,7 +268,7 @@ static int radeonfb_create(struct drm_fb_helper *helper,
info->screen_base = rbo->kptr;
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 */
info->apertures->ranges[0].base = rdev->ddev->mode_config.fb_base;
Expand Down

0 comments on commit 19d8a4e

Please sign in to comment.