This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / video / tdfxfb.c
index 6cf29b3..503ecc3 100644 (file)
@@ -202,6 +202,7 @@ static unsigned long do_lfb_size(struct tdfx_par *par, unsigned short);
  */
 static int  nopan   = 0;
 static int  nowrap  = 1;      // not implemented (yet)
+static int  inverse = 0;
 static char *mode_option __initdata = NULL;
 
 /* ------------------------------------------------------------------------- 
@@ -837,23 +838,23 @@ static int tdfxfb_blank(int blank, struct fb_info *info)
        dacmode = tdfx_inl(par, DACMODE);
 
        switch (blank) {
-               case FB_BLANK_UNBLANK: /* Screen: On; HSync: On, VSync: On */
+               case 0: /* Screen: On; HSync: On, VSync: On */    
                        state    = 0;
                        vgablank = 0;
                        break;
-               case FB_BLANK_NORMAL: /* Screen: Off; HSync: On, VSync: On */
+               case 1: /* Screen: Off; HSync: On, VSync: On */
                        state    = 0;
                        vgablank = 1;
                        break;
-               case FB_BLANK_VSYNC_SUSPEND: /* Screen: Off; HSync: On, VSync: Off */
+               case 2: /* Screen: Off; HSync: On, VSync: Off */
                        state    = BIT(3);
                        vgablank = 1;
                        break;
-               case FB_BLANK_HSYNC_SUSPEND: /* Screen: Off; HSync: Off, VSync: On */
+               case 3: /* Screen: Off; HSync: Off, VSync: On */
                        state    = BIT(1);
                        vgablank = 1;
                        break;
-               case FB_BLANK_POWERDOWN: /* Screen: Off; HSync: Off, VSync: Off */
+               case 4: /* Screen: Off; HSync: Off, VSync: Off */
                        state    = BIT(1) | BIT(3);
                        vgablank = 1;
                        break;
@@ -920,6 +921,7 @@ static void tdfxfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect
        tdfx_outl(par,  COMMAND_2D, COMMAND_2D_FILLRECT | (tdfx_rop << 24));
        tdfx_outl(par,  DSTSIZE,    rect->width | (rect->height << 16));
        tdfx_outl(par,  LAUNCH_2D,  rect->dx | (rect->dy << 16));
+       banshee_wait_idle(info);
 }
 
 /*
@@ -955,6 +957,7 @@ static void tdfxfb_copyarea(struct fb_info *info, const struct fb_copyarea *area
        tdfx_outl(par,  DSTSIZE,   area->width | (area->height << 16));
        tdfx_outl(par,  DSTXY,     dx | (dy << 16));
        tdfx_outl(par,  LAUNCH_2D, sx | (sy << 16)); 
+       banshee_wait_idle(info);
 }
 
 static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image) 
@@ -1022,6 +1025,7 @@ static void tdfxfb_imageblit(struct fb_info *info, const struct fb_image *image)
                case 2:  tdfx_outl(par, LAUNCH_2D,*(u16*)chardata); break;
                case 3:  tdfx_outl(par, LAUNCH_2D,*(u16*)chardata | ((chardata[3]) << 24)); break;
        }
+       banshee_wait_idle(info);
 }
 #endif /* CONFIG_FB_3DFX_ACCEL */
 
@@ -1393,7 +1397,10 @@ void tdfxfb_setup(char *options)
        while ((this_opt = strsep(&options, ",")) != NULL) {    
                if (!*this_opt)
                        continue;
-               if(!strcmp(this_opt, "nopan")) {
+               if (!strcmp(this_opt, "inverse")) {
+                       inverse = 1;
+                       fb_invert_cmaps();
+               } else if(!strcmp(this_opt, "nopan")) {
                        nopan = 1;
                } else if(!strcmp(this_opt, "nowrap")) {
                        nowrap = 1;