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

Commit a8c19ff3 authored by Jeevan Shriram's avatar Jeevan Shriram Committed by Matt Wagantall
Browse files

msm: mdss: align frame buffer size to PAGE_SIZE



When updating userspace with the shared memory length,
the size of each buffer needs to be 4k aligned for
performance. This is also required to avoid mmap failures
in the case of recovery and other usecases where the
requested size is 4k aligned.

Change-Id: I6e97f9c76ea1aff07572c500f30f888b6e12f9b4
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent 030a6843
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1840,10 +1840,10 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)

	/*
	 * Populate smem length here for uspace to get the
	 * Franebuffer size when FBIO_FSCREENINFO ioctl is
	 * Framebuffer size when FBIO_FSCREENINFO ioctl is
	 * called.
	 */
	fix->smem_len = fix->line_length * var->yres_virtual;
	fix->smem_len = PAGE_ALIGN(fix->line_length * var->yres) * mfd->fb_page;

	/* id field for fb app  */
	id = (int *)&mfd->panel;