Skip to content

Commit

Permalink
Fix dancing cwm
Browse files Browse the repository at this point in the history
Thanks Scritchz

Change-Id: Ifca57963196e86bb0d64941fec76f5a117b6ad86
  • Loading branch information
shardul-seth authored and Daz Jones committed Oct 8, 2013
1 parent 68a419a commit 8c280da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/video/msm/msm_fb.c
Expand Up @@ -84,6 +84,7 @@ static unsigned char *fbram;
static unsigned char *fbram_phys;
static int fbram_size;
static boolean bf_supported;
static bool align_buffer = false;

static struct platform_device *pdev_list[MSM_FB_MAX_DEV_LIST];
static int pdev_list_cnt;
Expand Down Expand Up @@ -1154,6 +1155,11 @@ int calc_fb_offset(struct msm_fb_data_type *mfd, struct fb_info *fbi, int bpp)
struct msm_panel_info *panel_info = &mfd->panel_info;
int remainder, yres, offset;

if (!align_buffer)
{
return fbi->var.xoffset * bpp + fbi->var.yoffset * fbi->fix.line_length;
}

if (panel_info->mode2_yres != 0) {
yres = panel_info->mode2_yres;
remainder = (fbi->fix.line_length*yres) & (PAGE_SIZE - 1);
Expand Down Expand Up @@ -4340,6 +4346,8 @@ int msm_fb_v4l2_update(void *par,
}
EXPORT_SYMBOL(msm_fb_v4l2_update);

module_param(align_buffer, bool, 0644);

module_init(msm_fb_init);
#ifdef CONFIG_HUAWEI_EVALUATE_POWER_CONSUMPTION
module_exit(msm_fb_exit);
Expand Down

0 comments on commit 8c280da

Please sign in to comment.