[PATCH] update control video driver

From: Paul Mackerras (paulus@samba.org)
Date: Mon Mar 24 2003 - 07:02:26 EST


The patch below fixes the controlfb driver to access the
pseudo_palette as 32-bit quantities and takes out the font option
handling.

Paul.

diff -urN linux-2.5/drivers/video/controlfb.c linuxppc-2.5/drivers/video/controlfb.c
--- linux-2.5/drivers/video/controlfb.c 2003-03-23 16:29:31.000000000 +1100
+++ linuxppc-2.5/drivers/video/controlfb.c 2003-03-23 21:42:33.000000000 +1100
@@ -376,13 +376,12 @@
                 int i;
                 switch (p->par.cmode) {
                 case CMODE_16:
- ((u16 *) (info->pseudo_palette))[regno] =
+ p->pseudo_palette[regno] =
                             (regno << 10) | (regno << 5) | regno;
                         break;
                 case CMODE_32:
                         i = (regno << 8) | regno;
- ((u32 *) (info->pseudo_palette))[regno] =
- (i << 16) | i;
+ p->pseudo_palette[regno] = (i << 16) | i;
                         break;
                 }
         }
@@ -475,7 +474,6 @@
                 var.yres_virtual = vyres;
 
         /* Apply default var */
- p->info.var = var;
         var.activate = FB_ACTIVATE_NOW;
         rc = fb_set_var(&var, &p->info);
         if (rc && (vmode != VMODE_640_480_60 || cmode != CMODE_8))
@@ -1068,17 +1066,7 @@
                 return;
 
         while ((this_opt = strsep(&options, ",")) != NULL) {
- if (!strncmp(this_opt, "font:", 5)) {
- char *p;
- int i;
-
- p = this_opt +5;
- for (i = 0; i < sizeof(fontname) - 1; i++)
- if (!*p || *p == ' ' || *p == ',')
- break;
- memcpy(fontname, this_opt + 5, i);
- fontname[i] = 0;
- } else if (!strncmp(this_opt, "vmode:", 6)) {
+ if (!strncmp(this_opt, "vmode:", 6)) {
                         int vmode = simple_strtoul(this_opt+6, NULL, 0);
                         if (vmode > 0 && vmode <= VMODE_MAX &&
                             control_mac_modes[vmode - 1].m[1] >= 0)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:15 EST