fbdev: move FBIO_WAITFORVSYNC to linux/fb.h
[safe/jmp/linux-2.6] / drivers / video / intelfb / intelfbdrv.c
index a09e236..5ba3999 100644 (file)
@@ -182,6 +182,7 @@ static struct pci_device_id intelfb_pci_table[] __devinitdata = {
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_845G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_845G },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_85XGM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_85XGM },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_865G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_865G },
+       { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_854, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_854 },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_915G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_915G },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_915GM, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_915GM },
        { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_945G, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_DISPLAY_VGA << 8, INTELFB_CLASS_MASK, INTEL_945G },
@@ -873,6 +874,9 @@ static int __devinit intelfb_pci_register(struct pci_dev *pdev,
        if (bailearly == 18)
                bailout(dinfo);
 
+       /* read active pipe */
+       dinfo->pipe = intelfbhw_active_pipe(&dinfo->save_state);
+
        /* Cursor initialisation */
        if (dinfo->hwcursor) {
                intelfbhw_cursor_init(dinfo);
@@ -1364,6 +1368,11 @@ static int intelfb_set_par(struct fb_info *info)
        DBG_MSG("intelfb_set_par (%dx%d-%d)\n", info->var.xres,
                info->var.yres, info->var.bits_per_pixel);
 
+       /*
+        * Disable VCO prior to timing register change.
+        */
+       OUTREG(DPLL_A, INREG(DPLL_A) & ~DPLL_VCO_ENABLE);
+
        intelfb_blank(FB_BLANK_POWERDOWN, info);
 
        if (ACCEL(dinfo, info))
@@ -1493,8 +1502,10 @@ static void intelfb_fillrect (struct fb_info *info,
        DBG_MSG("intelfb_fillrect\n");
 #endif
 
-       if (!ACCEL(dinfo, info) || dinfo->depth == 4)
-               return cfb_fillrect(info, rect);
+       if (!ACCEL(dinfo, info) || dinfo->depth == 4) {
+               cfb_fillrect(info, rect);
+               return;
+       }
 
        if (rect->rop == ROP_COPY)
                rop = PAT_ROP_GXCOPY;
@@ -1521,8 +1532,10 @@ static void intelfb_copyarea(struct fb_info *info,
        DBG_MSG("intelfb_copyarea\n");
 #endif
 
-       if (!ACCEL(dinfo, info) || dinfo->depth == 4)
-               return cfb_copyarea(info, region);
+       if (!ACCEL(dinfo, info) || dinfo->depth == 4) {
+               cfb_copyarea(info, region);
+               return;
+       }
 
        intelfbhw_do_bitblt(dinfo, region->sx, region->sy, region->dx,
                            region->dy, region->width, region->height,
@@ -1540,8 +1553,10 @@ static void intelfb_imageblit(struct fb_info *info,
 #endif
 
        if (!ACCEL(dinfo, info) || dinfo->depth == 4
-           || image->depth != 1)
-               return cfb_imageblit(info, image);
+           || image->depth != 1) {
+               cfb_imageblit(info, image);
+               return;
+       }
 
        if (dinfo->depth != 8) {
                fgcolor = dinfo->pseudo_palette[image->fg_color];
@@ -1554,8 +1569,10 @@ static void intelfb_imageblit(struct fb_info *info,
        if (!intelfbhw_do_drawglyph(dinfo, fgcolor, bgcolor, image->width,
                                    image->height, image->data,
                                    image->dx, image->dy,
-                                   dinfo->pitch, info->var.bits_per_pixel))
-               return cfb_imageblit(info, image);
+                                   dinfo->pitch, info->var.bits_per_pixel)) {
+               cfb_imageblit(info, image);
+               return;
+       }
 }
 
 static int intelfb_cursor(struct fb_info *info, struct fb_cursor *cursor)