diff options
author | Tormod Volden <debian.tormod@gmail.com> | 2011-05-28 15:06:11 +0000 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-06-02 17:05:18 +0900 |
commit | 1bae852fb0beca3cc95b8de84efbc7254cae62e1 (patch) | |
tree | ee718e272f1c6bbd1ab0e168946727f2b1ee592e /drivers/video/savage | |
parent | 554cc1028603587e28ae49e9594b1508df5f29aa (diff) | |
download | kernel_samsung_smdk4412-1bae852fb0beca3cc95b8de84efbc7254cae62e1.zip kernel_samsung_smdk4412-1bae852fb0beca3cc95b8de84efbc7254cae62e1.tar.gz kernel_samsung_smdk4412-1bae852fb0beca3cc95b8de84efbc7254cae62e1.tar.bz2 |
savagefb: Use panel CVT mode as default
If there is no EDID but an LCD panel is detected, generate a CVT
mode from the panel resolution (at 60 Hz), and use this as a
default mode instead of the hardcoded 800x600x8 mode.
Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/video/savage')
-rw-r--r-- | drivers/video/savage/savagefb_driver.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/video/savage/savagefb_driver.c b/drivers/video/savage/savagefb_driver.c index 3b7f2f5..4de541c 100644 --- a/drivers/video/savage/savagefb_driver.c +++ b/drivers/video/savage/savagefb_driver.c @@ -2237,6 +2237,22 @@ static int __devinit savagefb_probe(struct pci_dev* dev, &info->modelist); #endif info->var = savagefb_var800x600x8; + /* if a panel was detected, default to a CVT mode instead */ + if (par->SavagePanelWidth) { + struct fb_videomode cvt_mode; + + memset(&cvt_mode, 0, sizeof(cvt_mode)); + cvt_mode.xres = par->SavagePanelWidth; + cvt_mode.yres = par->SavagePanelHeight; + cvt_mode.refresh = 60; + /* FIXME: if we know there is only the panel + * we can enable reduced blanking as well */ + if (fb_find_mode_cvt(&cvt_mode, 0, 0)) + printk(KERN_WARNING "No CVT mode found for panel\n"); + else if (fb_find_mode(&info->var, info, NULL, NULL, 0, + &cvt_mode, 0) != 3) + info->var = savagefb_var800x600x8; + } if (mode_option) { fb_find_mode(&info->var, info, mode_option, |