]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/video/s3c2410fb.c
xen: Enable console tty by default in domU if it's not a dummy
[linux-2.6-omap-h63xx.git] / drivers / video / s3c2410fb.c
index 628b9e67f0cab3acbe21e8ece4d7aff37523ee63..13b38cbbe4cf8218e282d159d371a7ca39eb946a 100644 (file)
@@ -430,9 +430,9 @@ static void s3c2410fb_activate_var(struct fb_info *info)
        struct fb_var_screeninfo *var = &info->var;
        int clkdiv = s3c2410fb_calc_pixclk(fbi, var->pixclock) / 2;
 
-       dprintk("%s: var->xres  = %d\n", __FUNCTION__, var->xres);
-       dprintk("%s: var->yres  = %d\n", __FUNCTION__, var->yres);
-       dprintk("%s: var->bpp   = %d\n", __FUNCTION__, var->bits_per_pixel);
+       dprintk("%s: var->xres  = %d\n", __func__, var->xres);
+       dprintk("%s: var->yres  = %d\n", __func__, var->yres);
+       dprintk("%s: var->bpp   = %d\n", __func__, var->bits_per_pixel);
 
        if (type == S3C2410_LCDCON1_TFT) {
                s3c2410fb_calculate_tft_lcd_regs(info, &fbi->regs);
@@ -670,7 +670,7 @@ static int __init s3c2410fb_map_video_memory(struct fb_info *info)
        dma_addr_t map_dma;
        unsigned map_size = PAGE_ALIGN(info->fix.smem_len);
 
-       dprintk("map_video_memory(fbi=%p)\n", fbi);
+       dprintk("map_video_memory(fbi=%p) map_size %u\n", fbi, map_size);
 
        info->screen_base = dma_alloc_writecombine(fbi->dev, map_size,
                                                   &map_dma, GFP_KERNEL);
@@ -679,7 +679,7 @@ static int __init s3c2410fb_map_video_memory(struct fb_info *info)
                /* prevent initial garbage on screen */
                dprintk("map_video_memory: clear %p:%08x\n",
                        info->screen_base, map_size);
-               memset(info->screen_base, 0xf0, map_size);
+               memset(info->screen_base, 0x00, map_size);
 
                info->fix.smem_start = map_dma;
 
@@ -817,6 +817,12 @@ static int __init s3c24xxfb_probe(struct platform_device *pdev,
                return -EINVAL;
        }
 
+       if (mach_info->default_display >= mach_info->num_displays) {
+               dev_err(&pdev->dev, "default is %d but only %d displays\n",
+                       mach_info->default_display, mach_info->num_displays);
+               return -EINVAL;
+       }
+
        display = mach_info->displays + mach_info->default_display;
 
        irq = platform_get_irq(pdev, 0);