aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/cirrusfb.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c
index 65a1831ddd0d..15e2e6bfcbff 100644
--- a/drivers/video/cirrusfb.c
+++ b/drivers/video/cirrusfb.c
@@ -470,10 +470,25 @@ static int cirrusfb_check_pixclock(const struct fb_var_screeninfo *var,
470 /* If the frequency is greater than we can support, we might be able 470 /* If the frequency is greater than we can support, we might be able
471 * to use multiplexing for the video mode */ 471 * to use multiplexing for the video mode */
472 if (freq > maxclock) { 472 if (freq > maxclock) {
473 dev_err(info->device,
474 "Frequency greater than maxclock (%ld kHz)\n",
475 maxclock);
476 return -EINVAL;
477 }
478 /*
479 * Additional constraint: 8bpp uses DAC clock doubling to allow maximum
480 * pixel clock
481 */
482 if (var->bits_per_pixel == 8) {
473 switch (cinfo->btype) { 483 switch (cinfo->btype) {
474 case BT_ALPINE: 484 case BT_ALPINE:
485 case BT_PICASSO4:
486 if (freq > 85500)
487 cinfo->multiplexing = 1;
488 break;
475 case BT_GD5480: 489 case BT_GD5480:
476 cinfo->multiplexing = 1; 490 if (freq > 135100)
491 cinfo->multiplexing = 1;
477 break; 492 break;
478 493
479 default: 494 default:
@@ -815,6 +830,8 @@ static int cirrusfb_set_par_foo(struct fb_info *info)
815 freq = PICOS2KHZ(var->pixclock); 830 freq = PICOS2KHZ(var->pixclock);
816 if (cinfo->btype == BT_ALPINE && var->bits_per_pixel == 24) 831 if (cinfo->btype == BT_ALPINE && var->bits_per_pixel == 24)
817 freq *= 3; 832 freq *= 3;
833 if (cinfo->multiplexing)
834 freq /= 2;
818 835
819 bestclock(freq, &nom, &den, &div); 836 bestclock(freq, &nom, &den, &div);
820 837