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

Commit 1e45a92c authored by Jeevan Shriram's avatar Jeevan Shriram
Browse files

mdss: fb: ensure that shared memory is available during probe



Populate shared memory length during probe for availability
to userspace through FSCREENINFO ioctl. Also, ensure that fb
length is always available.

Change-Id: I94d3f83098fbfd81a7aa20f6fc1f19e756aebc4e
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent 61b52bcb
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -1129,7 +1129,6 @@ void mdss_fb_free_fb_ion_memory(struct msm_fb_data_type *mfd)

	mfd->fbi->screen_base = NULL;
	mfd->fbi->fix.smem_start = 0;
	mfd->fbi->fix.smem_len = 0;

	ion_unmap_kernel(mfd->fb_ion_client, mfd->fb_ion_handle);

@@ -1646,8 +1645,14 @@ static int mdss_fb_register(struct msm_fb_data_type *mfd)
	var->hsync_len = panel_info->lcdc.h_pulse_width;
	var->pixclock = panel_info->clk_rate / 1000;

	/* id field for fb app  */
	/*
	 * Populate smem length here for uspace to get the
	 * Franebuffer size when FBIO_FSCREENINFO ioctl is
	 * called.
	 */
	fix->smem_len = fix->line_length * var->yres_virtual;

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

	snprintf(fix->id, sizeof(fix->id), "mdssfb_%x", (u32) *id);