Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 96487
b: refs/heads/master
c: baf6332
h: refs/heads/master
i:
  96485: 10670a2
  96483: c30cb23
  96479: 9109b2a
v: v3
  • Loading branch information
Nicolas Ferre authored and Linus Torvalds committed May 13, 2008
1 parent 5e1b59e commit 411b20f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 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: 945185a69daa457c4c5e46e47f4afad7dcea734f
refs/heads/master: baf6332a238a680ef3add9cfb0729f136da886b8
11 changes: 6 additions & 5 deletions trunk/drivers/video/atmel_lcdfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,14 +441,15 @@ static int atmel_lcdfb_set_par(struct fb_info *info)

value = DIV_ROUND_UP(clk_value_khz, PICOS2KHZ(info->var.pixclock));

value = (value / 2) - 1;
dev_dbg(info->device, " * programming CLKVAL = 0x%08lx\n", value);

if (value <= 0) {
if (value < 2) {
dev_notice(info->device, "Bypassing pixel clock divider\n");
lcdc_writel(sinfo, ATMEL_LCDC_LCDCON1, ATMEL_LCDC_BYPASS);
} else {
lcdc_writel(sinfo, ATMEL_LCDC_LCDCON1, value << ATMEL_LCDC_CLKVAL_OFFSET);
value = (value / 2) - 1;
dev_dbg(info->device, " * programming CLKVAL = 0x%08lx\n",
value);
lcdc_writel(sinfo, ATMEL_LCDC_LCDCON1,
value << ATMEL_LCDC_CLKVAL_OFFSET);
info->var.pixclock = KHZ2PICOS(clk_value_khz / (2 * (value + 1)));
dev_dbg(info->device, " updated pixclk: %lu KHz\n",
PICOS2KHZ(info->var.pixclock));
Expand Down

0 comments on commit 411b20f

Please sign in to comment.