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

Commit 01f2c773 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Dave Airlie
Browse files

drm: Replace pitch with pitches[] in drm_framebuffer



Otherwise each driver would need to keep the information inside
their own framebuffer object structure. Also add offsets[]. BOs
on the other hand are driver specific, so those can be kept in
driver specific structures.

Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 935b5977
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2292,7 +2292,7 @@ int drm_mode_getfb(struct drm_device *dev,
	r->width = fb->width;
	r->depth = fb->depth;
	r->bpp = fb->bits_per_pixel;
	r->pitch = fb->pitch;
	r->pitch = fb->pitches[0];
	fb->funcs->create_handle(fb, file_priv, &r->handle);

out:
+6 −1
Original line number Diff line number Diff line
@@ -814,9 +814,14 @@ EXPORT_SYMBOL(drm_helper_connector_dpms);
int drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
				   struct drm_mode_fb_cmd2 *mode_cmd)
{
	int i;

	fb->width = mode_cmd->width;
	fb->height = mode_cmd->height;
	fb->pitch = mode_cmd->pitches[0];
	for (i = 0; i < 4; i++) {
		fb->pitches[i] = mode_cmd->pitches[i];
		fb->offsets[i] = mode_cmd->offsets[i];
	}
	drm_fb_get_bpp_depth(mode_cmd->pixel_format, &fb->depth,
				    &fb->bits_per_pixel);
	fb->pixel_format = mode_cmd->pixel_format;
+1 −1
Original line number Diff line number Diff line
@@ -119,7 +119,7 @@ static int exynos_drm_overlay_update(struct exynos_drm_overlay *overlay,
	overlay->fb_width = fb->width;
	overlay->fb_height = fb->height;
	overlay->bpp = fb->bits_per_pixel;
	overlay->pitch = fb->pitch;
	overlay->pitch = fb->pitches[0];

	/* set overlay range to be displayed. */
	overlay->crtc_x = pos->crtc_x;
+2 −2
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,

	exynos_fb->fb = fb;

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

	entry = exynos_drm_fb_get_buf(fb);
@@ -110,7 +110,7 @@ static int exynos_drm_fbdev_update(struct drm_fb_helper *helper,
	}

	offset = fbi->var.xoffset * (fb->bits_per_pixel >> 3);
	offset += fbi->var.yoffset * fb->pitch;
	offset += fbi->var.yoffset * fb->pitches[0];

	dev->mode_config.fb_base = entry->paddr;
	fbi->screen_base = entry->vaddr + offset;
+1 −1
Original line number Diff line number Diff line
@@ -253,7 +253,7 @@ static void psbfb_copyarea_accel(struct fb_info *info,
		return;

	offset = psbfb->gtt->offset;
	stride = fb->pitch;
	stride = fb->pitches[0];

	switch (fb->depth) {
	case 8:
Loading