Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d76612b authored by Rob Clark's avatar Rob Clark Committed by Daniel Vetter
Browse files

drm/cma: use correct fb width/height



What is passed to drm_fb_helper_fill_var() should be fb_width/fb_height,
rather than the surface size.

Signed-off-by: default avatarRob Clark <robdclark@gmail.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 08855fae
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -304,7 +304,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
	}
	}


	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth);
	drm_fb_helper_fill_fix(fbi, fb->pitches[0], fb->depth);
	drm_fb_helper_fill_var(fbi, helper, fb->width, fb->height);
	drm_fb_helper_fill_var(fbi, helper, sizes->fb_width, sizes->fb_height);


	offset = fbi->var.xoffset * bytes_per_pixel;
	offset = fbi->var.xoffset * bytes_per_pixel;
	offset += fbi->var.yoffset * fb->pitches[0];
	offset += fbi->var.yoffset * fb->pitches[0];