Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 372247
b: refs/heads/master
c: 934a50b
h: refs/heads/master
i:
  372245: 34ceae5
  372243: 36c4c03
  372239: 358ba19
v: v3
  • Loading branch information
Johan Hovold authored and Nicolas Ferre committed Mar 13, 2013
1 parent d105143 commit 4c52dbd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: 557b7d5d0787997247a798e6f46541fe9dc977fa
refs/heads/master: 934a50bd089789d1ed74f0bef4988a97bd590afe
8 changes: 5 additions & 3 deletions trunk/drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,17 @@ static struct fb_fix_screeninfo atmel_lcdfb_fix __initdata = {
.accel = FB_ACCEL_NONE,
};

static unsigned long compute_hozval(unsigned long xres, unsigned long lcdcon2)
static unsigned long compute_hozval(struct atmel_lcdfb_info *sinfo,
unsigned long xres)
{
unsigned long lcdcon2;
unsigned long value;

if (!(cpu_is_at91sam9261() || cpu_is_at91sam9g10()
|| cpu_is_at32ap7000()))
return xres;

lcdcon2 = lcdc_readl(sinfo, ATMEL_LCDC_LCDCON2);
value = xres;
if ((lcdcon2 & ATMEL_LCDC_DISTYPE) != ATMEL_LCDC_DISTYPE_TFT) {
/* STN display */
Expand Down Expand Up @@ -591,8 +594,7 @@ static int atmel_lcdfb_set_par(struct fb_info *info)
lcdc_writel(sinfo, ATMEL_LCDC_TIM2, value);

/* Horizontal value (aka line size) */
hozval_linesz = compute_hozval(info->var.xres,
lcdc_readl(sinfo, ATMEL_LCDC_LCDCON2));
hozval_linesz = compute_hozval(sinfo, info->var.xres);

/* Display size */
value = (hozval_linesz - 1) << ATMEL_LCDC_HOZVAL_OFFSET;
Expand Down

0 comments on commit 4c52dbd

Please sign in to comment.