Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139259
b: refs/heads/master
c: dd14f71
h: refs/heads/master
i:
  139257: f156aaf
  139255: 2ab0de6
v: v3
  • Loading branch information
Krzysztof Helt authored and Linus Torvalds committed Apr 1, 2009
1 parent fa06a65 commit 17d1b48
Show file tree
Hide file tree
Showing 2 changed files with 19 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: 7cade31cabec33c396b1dfd9c2842e793c2648ef
refs/heads/master: dd14f71cc62dd07b588cc6de935155e6fd3911c9
19 changes: 18 additions & 1 deletion trunk/drivers/video/cirrusfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,25 @@ static int cirrusfb_check_pixclock(const struct fb_var_screeninfo *var,
/* If the frequency is greater than we can support, we might be able
* to use multiplexing for the video mode */
if (freq > maxclock) {
dev_err(info->device,
"Frequency greater than maxclock (%ld kHz)\n",
maxclock);
return -EINVAL;
}
/*
* Additional constraint: 8bpp uses DAC clock doubling to allow maximum
* pixel clock
*/
if (var->bits_per_pixel == 8) {
switch (cinfo->btype) {
case BT_ALPINE:
case BT_PICASSO4:
if (freq > 85500)
cinfo->multiplexing = 1;
break;
case BT_GD5480:
cinfo->multiplexing = 1;
if (freq > 135100)
cinfo->multiplexing = 1;
break;

default:
Expand Down Expand Up @@ -815,6 +830,8 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
freq = PICOS2KHZ(var->pixclock);
if (cinfo->btype == BT_ALPINE && var->bits_per_pixel == 24)
freq *= 3;
if (cinfo->multiplexing)
freq /= 2;

bestclock(freq, &nom, &den, &div);

Expand Down

0 comments on commit 17d1b48

Please sign in to comment.