summaryrefslogtreecommitdiff
path: root/linux-core/drm_fb.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core/drm_fb.c')
-rw-r--r--linux-core/drm_fb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-core/drm_fb.c b/linux-core/drm_fb.c
index 118967bf..5f2b1cea 100644
--- a/linux-core/drm_fb.c
+++ b/linux-core/drm_fb.c
@@ -223,7 +223,7 @@ static int drmfb_set_par(struct fb_info *info)
fb->bits_per_pixel = var->bits_per_pixel;
- info->fix.line_length = fb->pitch * ((fb->bits_per_pixel + 1) / 8);
+ info->fix.line_length = fb->pitch;
info->fix.smem_len = info->fix.line_length * fb->height;
info->fix.visual = (fb->depth == 8) ? FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR;
@@ -319,7 +319,7 @@ int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
info->fix.type_aux = 0;
info->fix.mmio_start = 0;
info->fix.mmio_len = 0;
- info->fix.line_length = fb->pitch * ((fb->bits_per_pixel + 1) / 8);
+ info->fix.line_length = fb->pitch;
info->fix.smem_start = fb->offset + dev->mode_config.fb_base;
info->fix.smem_len = info->fix.line_length * fb->height;
@@ -332,7 +332,7 @@ int drmfb_probe(struct drm_device *dev, struct drm_crtc *crtc)
info->screen_base = fb->virtual_base;
info->screen_size = info->fix.smem_len; /* ??? */
info->pseudo_palette = fb->pseudo_palette;
- info->var.xres_virtual = fb->pitch;
+ info->var.xres_virtual = fb->width;
info->var.yres_virtual = fb->height;
info->var.bits_per_pixel = fb->bits_per_pixel;
info->var.xoffset = 0;