summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2012-04-07 01:13:54 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-10 10:19:08 -0700
commitf47f12d62141b39581e6e099c2210b5ae5b4ab0c (patch)
tree6dfb9eb56082763f4341af668c2337e457c7f9e4 /drivers
parentb07b3a90599e6032103c76bed8f03ba1327f54b9 (diff)
staging: xgifb: delete rate_idx from mode table
The default rate_idx is same for all video modes, no need to keep that in the table. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/xgifb/XGI_main.h145
-rw-r--r--drivers/staging/xgifb/XGI_main_26.c6
2 files changed, 74 insertions, 77 deletions
diff --git a/drivers/staging/xgifb/XGI_main.h b/drivers/staging/xgifb/XGI_main.h
index 513e4e0af84c..ae778a18b37f 100644
--- a/drivers/staging/xgifb/XGI_main.h
+++ b/drivers/staging/xgifb/XGI_main.h
@@ -91,156 +91,155 @@ static const struct _XGIbios_mode {
u16 xres;
u16 yres;
u16 bpp;
- u16 rate_idx;
u16 cols;
u16 rows;
u8 chipset;
} XGIbios_mode[] = {
- {"320x240x16", 0x56, 0x0000, 0x0000, 320, 240, 16, 1, 40, 15,
+ {"320x240x16", 0x56, 0x0000, 0x0000, 320, 240, 16, 40, 15,
MD_XGI315},
- {"320x480x8", 0x5A, 0x0000, 0x0000, 320, 480, 8, 1, 40, 30,
+ {"320x480x8", 0x5A, 0x0000, 0x0000, 320, 480, 8, 40, 30,
MD_XGI315}, /* TW: FSTN */
- {"320x480x16", 0x5B, 0x0000, 0x0000, 320, 480, 16, 1, 40, 30,
+ {"320x480x16", 0x5B, 0x0000, 0x0000, 320, 480, 16, 40, 30,
MD_XGI315}, /* TW: FSTN */
- {"640x480x8", 0x2E, 0x0101, 0x0101, 640, 480, 8, 1, 80, 30,
+ {"640x480x8", 0x2E, 0x0101, 0x0101, 640, 480, 8, 80, 30,
MD_XGI300|MD_XGI315},
- {"640x480x16", 0x44, 0x0111, 0x0111, 640, 480, 16, 1, 80, 30,
+ {"640x480x16", 0x44, 0x0111, 0x0111, 640, 480, 16, 80, 30,
MD_XGI300|MD_XGI315},
- {"640x480x24", 0x62, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30,
+ {"640x480x24", 0x62, 0x013a, 0x0112, 640, 480, 32, 80, 30,
MD_XGI300|MD_XGI315}, /* TW: That's for people who mix up color-
and fb depth */
- {"640x480x32", 0x62, 0x013a, 0x0112, 640, 480, 32, 1, 80, 30,
+ {"640x480x32", 0x62, 0x013a, 0x0112, 640, 480, 32, 80, 30,
MD_XGI300|MD_XGI315},
- {"720x480x8", 0x31, 0x0000, 0x0000, 720, 480, 8, 1, 90, 30,
+ {"720x480x8", 0x31, 0x0000, 0x0000, 720, 480, 8, 90, 30,
MD_XGI300|MD_XGI315},
- {"720x480x16", 0x33, 0x0000, 0x0000, 720, 480, 16, 1, 90, 30,
+ {"720x480x16", 0x33, 0x0000, 0x0000, 720, 480, 16, 90, 30,
MD_XGI300|MD_XGI315},
- {"720x480x24", 0x35, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30,
+ {"720x480x24", 0x35, 0x0000, 0x0000, 720, 480, 32, 90, 30,
MD_XGI300|MD_XGI315},
- {"720x480x32", 0x35, 0x0000, 0x0000, 720, 480, 32, 1, 90, 30,
+ {"720x480x32", 0x35, 0x0000, 0x0000, 720, 480, 32, 90, 30,
MD_XGI300|MD_XGI315},
- {"720x576x8", 0x32, 0x0000, 0x0000, 720, 576, 8, 1, 90, 36,
+ {"720x576x8", 0x32, 0x0000, 0x0000, 720, 576, 8, 90, 36,
MD_XGI300|MD_XGI315},
- {"720x576x16", 0x34, 0x0000, 0x0000, 720, 576, 16, 1, 90, 36,
+ {"720x576x16", 0x34, 0x0000, 0x0000, 720, 576, 16, 90, 36,
MD_XGI300|MD_XGI315},
- {"720x576x24", 0x36, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36,
+ {"720x576x24", 0x36, 0x0000, 0x0000, 720, 576, 32, 90, 36,
MD_XGI300|MD_XGI315},
- {"720x576x32", 0x36, 0x0000, 0x0000, 720, 576, 32, 1, 90, 36,
+ {"720x576x32", 0x36, 0x0000, 0x0000, 720, 576, 32, 90, 36,
MD_XGI300|MD_XGI315},
- {"800x480x8", 0x70, 0x0000, 0x0000, 800, 480, 8, 1, 100, 30,
+ {"800x480x8", 0x70, 0x0000, 0x0000, 800, 480, 8, 100, 30,
MD_XGI300|MD_XGI315},
- {"800x480x16", 0x7a, 0x0000, 0x0000, 800, 480, 16, 1, 100, 30,
+ {"800x480x16", 0x7a, 0x0000, 0x0000, 800, 480, 16, 100, 30,
MD_XGI300|MD_XGI315},
- {"800x480x24", 0x76, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30,
+ {"800x480x24", 0x76, 0x0000, 0x0000, 800, 480, 32, 100, 30,
MD_XGI300|MD_XGI315},
- {"800x480x32", 0x76, 0x0000, 0x0000, 800, 480, 32, 1, 100, 30,
+ {"800x480x32", 0x76, 0x0000, 0x0000, 800, 480, 32, 100, 30,
MD_XGI300|MD_XGI315},
- {"800x600x8", 0x30, 0x0103, 0x0103, 800, 600, 8, 1, 100, 37,
+ {"800x600x8", 0x30, 0x0103, 0x0103, 800, 600, 8, 100, 37,
MD_XGI300|MD_XGI315},
#define DEFAULT_MODE 20 /* index for 800x600x16 */
- {"800x600x16", 0x47, 0x0114, 0x0114, 800, 600, 16, 1, 100, 37,
+ {"800x600x16", 0x47, 0x0114, 0x0114, 800, 600, 16, 100, 37,
MD_XGI300|MD_XGI315},
- {"800x600x24", 0x63, 0x013b, 0x0115, 800, 600, 32, 1, 100, 37,
+ {"800x600x24", 0x63, 0x013b, 0x0115, 800, 600, 32, 100, 37,
MD_XGI300|MD_XGI315},
- {"800x600x32", 0x63, 0x013b, 0x0115, 800, 600, 32, 1, 100, 37,
+ {"800x600x32", 0x63, 0x013b, 0x0115, 800, 600, 32, 100, 37,
MD_XGI300|MD_XGI315},
- {"1024x576x8", 0x71, 0x0000, 0x0000, 1024, 576, 8, 1, 128, 36,
+ {"1024x576x8", 0x71, 0x0000, 0x0000, 1024, 576, 8, 128, 36,
MD_XGI300|MD_XGI315},
- {"1024x576x16", 0x74, 0x0000, 0x0000, 1024, 576, 16, 1, 128, 36,
+ {"1024x576x16", 0x74, 0x0000, 0x0000, 1024, 576, 16, 128, 36,
MD_XGI300|MD_XGI315},
- {"1024x576x24", 0x77, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36,
+ {"1024x576x24", 0x77, 0x0000, 0x0000, 1024, 576, 32, 128, 36,
MD_XGI300|MD_XGI315},
- {"1024x576x32", 0x77, 0x0000, 0x0000, 1024, 576, 32, 1, 128, 36,
+ {"1024x576x32", 0x77, 0x0000, 0x0000, 1024, 576, 32, 128, 36,
MD_XGI300|MD_XGI315},
- {"1024x600x8", 0x20, 0x0000, 0x0000, 1024, 600, 8, 1, 128, 37,
+ {"1024x600x8", 0x20, 0x0000, 0x0000, 1024, 600, 8, 128, 37,
MD_XGI300 }, /* TW: 300 series only */
- {"1024x600x16", 0x21, 0x0000, 0x0000, 1024, 600, 16, 1, 128, 37,
+ {"1024x600x16", 0x21, 0x0000, 0x0000, 1024, 600, 16, 128, 37,
MD_XGI300 },
- {"1024x600x24", 0x22, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37,
+ {"1024x600x24", 0x22, 0x0000, 0x0000, 1024, 600, 32, 128, 37,
MD_XGI300 },
- {"1024x600x32", 0x22, 0x0000, 0x0000, 1024, 600, 32, 1, 128, 37,
+ {"1024x600x32", 0x22, 0x0000, 0x0000, 1024, 600, 32, 128, 37,
MD_XGI300 },
- {"1024x768x8", 0x38, 0x0105, 0x0105, 1024, 768, 8, 1, 128, 48,
+ {"1024x768x8", 0x38, 0x0105, 0x0105, 1024, 768, 8, 128, 48,
MD_XGI300|MD_XGI315},
- {"1024x768x16", 0x4A, 0x0117, 0x0117, 1024, 768, 16, 1, 128, 48,
+ {"1024x768x16", 0x4A, 0x0117, 0x0117, 1024, 768, 16, 128, 48,
MD_XGI300|MD_XGI315},
- {"1024x768x24", 0x64, 0x013c, 0x0118, 1024, 768, 32, 1, 128, 48,
+ {"1024x768x24", 0x64, 0x013c, 0x0118, 1024, 768, 32, 128, 48,
MD_XGI300|MD_XGI315},
- {"1024x768x32", 0x64, 0x013c, 0x0118, 1024, 768, 32, 1, 128, 48,
+ {"1024x768x32", 0x64, 0x013c, 0x0118, 1024, 768, 32, 128, 48,
MD_XGI300|MD_XGI315},
- {"1152x768x8", 0x23, 0x0000, 0x0000, 1152, 768, 8, 1, 144, 48,
+ {"1152x768x8", 0x23, 0x0000, 0x0000, 1152, 768, 8, 144, 48,
MD_XGI300 }, /* TW: 300 series only */
- {"1152x768x16", 0x24, 0x0000, 0x0000, 1152, 768, 16, 1, 144, 48,
+ {"1152x768x16", 0x24, 0x0000, 0x0000, 1152, 768, 16, 144, 48,
MD_XGI300 },
- {"1152x768x24", 0x25, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48,
+ {"1152x768x24", 0x25, 0x0000, 0x0000, 1152, 768, 32, 144, 48,
MD_XGI300 },
- {"1152x768x32", 0x25, 0x0000, 0x0000, 1152, 768, 32, 1, 144, 48,
+ {"1152x768x32", 0x25, 0x0000, 0x0000, 1152, 768, 32, 144, 48,
MD_XGI300 },
- {"1280x720x8", 0x79, 0x0000, 0x0000, 1280, 720, 8, 1, 160, 45,
+ {"1280x720x8", 0x79, 0x0000, 0x0000, 1280, 720, 8, 160, 45,
MD_XGI300|MD_XGI315},
- {"1280x720x16", 0x75, 0x0000, 0x0000, 1280, 720, 16, 1, 160, 45,
+ {"1280x720x16", 0x75, 0x0000, 0x0000, 1280, 720, 16, 160, 45,
MD_XGI300|MD_XGI315},
- {"1280x720x24", 0x78, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45,
+ {"1280x720x24", 0x78, 0x0000, 0x0000, 1280, 720, 32, 160, 45,
MD_XGI300|MD_XGI315},
- {"1280x720x32", 0x78, 0x0000, 0x0000, 1280, 720, 32, 1, 160, 45,
+ {"1280x720x32", 0x78, 0x0000, 0x0000, 1280, 720, 32, 160, 45,
MD_XGI300|MD_XGI315},
- {"1280x768x8", 0x23, 0x0000, 0x0000, 1280, 768, 8, 1, 160, 48,
+ {"1280x768x8", 0x23, 0x0000, 0x0000, 1280, 768, 8, 160, 48,
MD_XGI315}, /* TW: 310/325 series only */
- {"1280x768x16", 0x24, 0x0000, 0x0000, 1280, 768, 16, 1, 160, 48,
+ {"1280x768x16", 0x24, 0x0000, 0x0000, 1280, 768, 16, 160, 48,
MD_XGI315},
- {"1280x768x24", 0x25, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48,
+ {"1280x768x24", 0x25, 0x0000, 0x0000, 1280, 768, 32, 160, 48,
MD_XGI315},
- {"1280x768x32", 0x25, 0x0000, 0x0000, 1280, 768, 32, 1, 160, 48,
+ {"1280x768x32", 0x25, 0x0000, 0x0000, 1280, 768, 32, 160, 48,
MD_XGI315},
- {"1280x960x8", 0x7C, 0x0000, 0x0000, 1280, 960, 8, 1, 160, 60,
+ {"1280x960x8", 0x7C, 0x0000, 0x0000, 1280, 960, 8, 160, 60,
MD_XGI300|MD_XGI315},
- {"1280x960x16", 0x7D, 0x0000, 0x0000, 1280, 960, 16, 1, 160, 60,
+ {"1280x960x16", 0x7D, 0x0000, 0x0000, 1280, 960, 16, 160, 60,
MD_XGI300|MD_XGI315},
- {"1280x960x24", 0x7E, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60,
+ {"1280x960x24", 0x7E, 0x0000, 0x0000, 1280, 960, 32, 160, 60,
MD_XGI300|MD_XGI315},
- {"1280x960x32", 0x7E, 0x0000, 0x0000, 1280, 960, 32, 1, 160, 60,
+ {"1280x960x32", 0x7E, 0x0000, 0x0000, 1280, 960, 32, 160, 60,
MD_XGI300|MD_XGI315},
- {"1280x1024x8", 0x3A, 0x0107, 0x0107, 1280, 1024, 8, 1, 160, 64,
+ {"1280x1024x8", 0x3A, 0x0107, 0x0107, 1280, 1024, 8, 160, 64,
MD_XGI300|MD_XGI315},
- {"1280x1024x16", 0x4D, 0x011a, 0x011a, 1280, 1024, 16, 1, 160, 64,
+ {"1280x1024x16", 0x4D, 0x011a, 0x011a, 1280, 1024, 16, 160, 64,
MD_XGI300|MD_XGI315},
- {"1280x1024x24", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 1, 160, 64,
+ {"1280x1024x24", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 160, 64,
MD_XGI300|MD_XGI315},
- {"1280x1024x32", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 1, 160, 64,
+ {"1280x1024x32", 0x65, 0x013d, 0x011b, 1280, 1024, 32, 160, 64,
MD_XGI300|MD_XGI315},
- {"1400x1050x8", 0x26, 0x0000, 0x0000, 1400, 1050, 8, 1, 175, 65,
+ {"1400x1050x8", 0x26, 0x0000, 0x0000, 1400, 1050, 8, 175, 65,
MD_XGI315}, /* TW: 310/325 series only */
- {"1400x1050x16", 0x27, 0x0000, 0x0000, 1400, 1050, 16, 1, 175, 65,
+ {"1400x1050x16", 0x27, 0x0000, 0x0000, 1400, 1050, 16, 175, 65,
MD_XGI315},
- {"1400x1050x24", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,
+ {"1400x1050x24", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 175, 65,
MD_XGI315},
- {"1400x1050x32", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 1, 175, 65,
+ {"1400x1050x32", 0x28, 0x0000, 0x0000, 1400, 1050, 32, 175, 65,
MD_XGI315},
- {"1600x1200x8", 0x3C, 0x0130, 0x011c, 1600, 1200, 8, 1, 200, 75,
+ {"1600x1200x8", 0x3C, 0x0130, 0x011c, 1600, 1200, 8, 200, 75,
MD_XGI300|MD_XGI315},
- {"1600x1200x16", 0x3D, 0x0131, 0x011e, 1600, 1200, 16, 1, 200, 75,
+ {"1600x1200x16", 0x3D, 0x0131, 0x011e, 1600, 1200, 16, 200, 75,
MD_XGI300|MD_XGI315},
- {"1600x1200x24", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75,
+ {"1600x1200x24", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 200, 75,
MD_XGI300|MD_XGI315},
- {"1600x1200x32", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 1, 200, 75,
+ {"1600x1200x32", 0x66, 0x013e, 0x011f, 1600, 1200, 32, 200, 75,
MD_XGI300|MD_XGI315},
- {"1920x1440x8", 0x68, 0x013f, 0x0000, 1920, 1440, 8, 1, 240, 75,
+ {"1920x1440x8", 0x68, 0x013f, 0x0000, 1920, 1440, 8, 240, 75,
MD_XGI300|MD_XGI315},
- {"1920x1440x16", 0x69, 0x0140, 0x0000, 1920, 1440, 16, 1, 240, 75,
+ {"1920x1440x16", 0x69, 0x0140, 0x0000, 1920, 1440, 16, 240, 75,
MD_XGI300|MD_XGI315},
- {"1920x1440x24", 0x6B, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75,
+ {"1920x1440x24", 0x6B, 0x0141, 0x0000, 1920, 1440, 32, 240, 75,
MD_XGI300|MD_XGI315},
- {"1920x1440x32", 0x6B, 0x0141, 0x0000, 1920, 1440, 32, 1, 240, 75,
+ {"1920x1440x32", 0x6B, 0x0141, 0x0000, 1920, 1440, 32, 240, 75,
MD_XGI300|MD_XGI315},
- {"2048x1536x8", 0x6c, 0x0000, 0x0000, 2048, 1536, 8, 1, 256, 96,
+ {"2048x1536x8", 0x6c, 0x0000, 0x0000, 2048, 1536, 8, 256, 96,
MD_XGI315}, /* TW: 310/325 series only */
- {"2048x1536x16", 0x6d, 0x0000, 0x0000, 2048, 1536, 16, 1, 256, 96,
+ {"2048x1536x16", 0x6d, 0x0000, 0x0000, 2048, 1536, 16, 256, 96,
MD_XGI315},
- {"2048x1536x24", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,
+ {"2048x1536x24", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 256, 96,
MD_XGI315},
- {"2048x1536x32", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 1, 256, 96,
+ {"2048x1536x32", 0x6e, 0x0000, 0x0000, 2048, 1536, 32, 256, 96,
MD_XGI315},
- {"\0", 0x00, 0, 0, 0, 0, 0, 0, 0}
+ {"\0", 0x00, 0, 0, 0, 0, 0, 0}
};
static const unsigned short XGI310paneltype[] = {
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c
index 3eeb58ad8b4d..5982c0d6f1a3 100644
--- a/drivers/staging/xgifb/XGI_main_26.c
+++ b/drivers/staging/xgifb/XGI_main_26.c
@@ -1138,8 +1138,7 @@ static int XGIfb_do_set_var(struct fb_var_screeninfo *var, int isactive,
if (XGIfb_search_refresh_rate(xgifb_info,
xgifb_info->refresh_rate) == 0) {
- xgifb_info->rate_idx =
- XGIbios_mode[xgifb_info->mode_idx].rate_idx;
+ xgifb_info->rate_idx = 1;
xgifb_info->refresh_rate = 60;
}
@@ -2134,8 +2133,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
xgifb_info->refresh_rate = 60;
if (XGIfb_search_refresh_rate(xgifb_info,
xgifb_info->refresh_rate) == 0) {
- xgifb_info->rate_idx =
- XGIbios_mode[xgifb_info->mode_idx].rate_idx;
+ xgifb_info->rate_idx = 1;
xgifb_info->refresh_rate = 60;
}