summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Peresipkyn <r.peresipkyn@samsung.com>2016-02-02 14:46:51 +0200
committerRoman Peresipkyn <r.peresipkyn@samsung.com>2016-02-02 14:46:51 +0200
commitf2e285880061af270a6c0045a73eb4aef7129eda (patch)
tree364a3bdaf45ae2f01cb858c397fafc9bb0994cbd
parentf87ee219fd65f355704357df5787abda37057715 (diff)
downloadlibtdm-drm-f2e285880061af270a6c0045a73eb4aef7129eda.tar.gz
libtdm-drm-f2e285880061af270a6c0045a73eb4aef7129eda.tar.bz2
libtdm-drm-f2e285880061af270a6c0045a73eb4aef7129eda.zip
change fb size to appropriate one
Change-Id: Ifef077a51577b101b64c509e83fe7d75de09d729
-rw-r--r--src/tdm_fbdev_display.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tdm_fbdev_display.c b/src/tdm_fbdev_display.c
index d370d17..fa05e8a 100644
--- a/src/tdm_fbdev_display.c
+++ b/src/tdm_fbdev_display.c
@@ -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;