change fb size to appropriate one 62/61362/1
authorRoman Peresipkyn <r.peresipkyn@samsung.com>
Tue, 2 Feb 2016 12:46:51 +0000 (14:46 +0200)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 7 Mar 2016 10:52:32 +0000 (19:52 +0900)
Change-Id: Ifef077a51577b101b64c509e83fe7d75de09d729

src/tdm_fbdev_display.c

index d370d17..fa05e8a 100644 (file)
@@ -22,7 +22,7 @@ tdm_error tdm_fbdev_creat_output(tdm_fbdev_data *fbdev_data)
      * TODO: Size of framebuffer must be aligned to system page size before
      *  it is mapped
      */
-    size = fbdev_data->finfo.line_length * fbdev_data->vinfo.yres * MAX_BUF;
+    size = fbdev_data->vinfo.xres * fbdev_data->vinfo.yres * fbdev_data->vinfo.bits_per_pixel / 8 * MAX_BUF;
 
     output->vaddr = mmap(0, size, PROT_READ|PROT_WRITE,
             MAP_SHARED, fbdev_data->fbdev_fd, 0);
@@ -36,7 +36,7 @@ tdm_error tdm_fbdev_creat_output(tdm_fbdev_data *fbdev_data)
 
     output->width = fbdev_data->vinfo.width;
     output->height = fbdev_data->vinfo.height;
-    output->pitch = fbdev_data->finfo.line_length;
+    output->pitch = fbdev_data->vinfo.width;
     output->bpp = fbdev_data->vinfo.bits_per_pixel;
     output->size = size;