Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 321021
b: refs/heads/master
c: 41a490e
h: refs/heads/master
i:
  321019: f3a6530
v: v3
  • Loading branch information
Liu Ying authored and Florian Tobias Schandinat committed Jun 27, 2012
1 parent 6fb03c7 commit 4a78789
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cd77e00c00c5da3b6f8546dcb6dfac9611ca10b
refs/heads/master: 41a490ec019fd172f5d0356e01d8101b4708aee2
22 changes: 21 additions & 1 deletion trunk/drivers/video/mx3fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,26 @@ static void mx3fb_dma_done(void *arg)
complete(&mx3_fbi->flip_cmpl);
}

static bool mx3fb_must_set_par(struct fb_info *fbi)
{
struct mx3fb_info *mx3_fbi = fbi->par;
struct fb_var_screeninfo old_var = mx3_fbi->cur_var;
struct fb_var_screeninfo new_var = fbi->var;

if ((fbi->var.activate & FB_ACTIVATE_FORCE) &&
(fbi->var.activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW)
return true;

/*
* Ignore xoffset and yoffset update,
* because pan display handles this case.
*/
old_var.xoffset = new_var.xoffset;
old_var.yoffset = new_var.yoffset;

return !!memcmp(&old_var, &new_var, sizeof(struct fb_var_screeninfo));
}

static int __set_par(struct fb_info *fbi, bool lock)
{
u32 mem_len, cur_xoffset, cur_yoffset;
Expand Down Expand Up @@ -819,7 +839,7 @@ static int mx3fb_set_par(struct fb_info *fbi)

mutex_lock(&mx3_fbi->mutex);

ret = __set_par(fbi, true);
ret = mx3fb_must_set_par(fbi) ? __set_par(fbi, true) : 0;

mutex_unlock(&mx3_fbi->mutex);

Expand Down

0 comments on commit 4a78789

Please sign in to comment.