aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorMichal Piotrowski <michal.k.k.piotrowski@gmail.com>2006-10-03 04:15:00 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-03 11:04:11 -0400
commit4370409a924b5e065f9f0905d243ab69a95b52f4 (patch)
treecc1d0fea6cb704c8ebc9ea13281c134986db4c2b /drivers/video
parent2dc350283d3ea194c954428d86025190cab47366 (diff)
[PATCH] drivers/video/sis/sis_main.c: removal of old code
Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Thomas Winischhofer <thomas@winischhofer.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/sis/sis_main.c232
1 files changed, 3 insertions, 229 deletions
diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
index 895ebda7d9e3..baaf495a0a6d 100644
--- a/drivers/video/sis/sis_main.c
+++ b/drivers/video/sis/sis_main.c
@@ -35,9 +35,7 @@
35 35
36#include <linux/version.h> 36#include <linux/version.h>
37#include <linux/module.h> 37#include <linux/module.h>
38#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
39#include <linux/moduleparam.h> 38#include <linux/moduleparam.h>
40#endif
41#include <linux/kernel.h> 39#include <linux/kernel.h>
42#include <linux/smp_lock.h> 40#include <linux/smp_lock.h>
43#include <linux/spinlock.h> 41#include <linux/spinlock.h>
@@ -58,9 +56,6 @@
58#include <linux/init.h> 56#include <linux/init.h>
59#include <linux/pci.h> 57#include <linux/pci.h>
60#include <linux/vmalloc.h> 58#include <linux/vmalloc.h>
61#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
62#include <linux/vt_kern.h>
63#endif
64#include <linux/capability.h> 59#include <linux/capability.h>
65#include <linux/fs.h> 60#include <linux/fs.h>
66#include <linux/types.h> 61#include <linux/types.h>
@@ -70,35 +65,9 @@
70#include <asm/mtrr.h> 65#include <asm/mtrr.h>
71#endif 66#endif
72 67
73#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
74#include <video/fbcon.h>
75#include <video/fbcon-cfb8.h>
76#include <video/fbcon-cfb16.h>
77#include <video/fbcon-cfb24.h>
78#include <video/fbcon-cfb32.h>
79#endif
80
81#include "sis.h" 68#include "sis.h"
82#include "sis_main.h" 69#include "sis_main.h"
83 70
84#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
85#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,3)
86#error "This version of sisfb requires at least 2.6.3"
87#endif
88#endif
89
90#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
91#ifdef FBCON_HAS_CFB8
92extern struct display_switch fbcon_sis8;
93#endif
94#ifdef FBCON_HAS_CFB16
95extern struct display_switch fbcon_sis16;
96#endif
97#ifdef FBCON_HAS_CFB32
98extern struct display_switch fbcon_sis32;
99#endif
100#endif
101
102static void sisfb_handle_command(struct sis_video_info *ivideo, 71static void sisfb_handle_command(struct sis_video_info *ivideo,
103 struct sisfb_cmd *sisfb_command); 72 struct sisfb_cmd *sisfb_command);
104 73
@@ -114,17 +83,7 @@ sisfb_setdefaultparms(void)
114 sisfb_max = -1; 83 sisfb_max = -1;
115 sisfb_userom = -1; 84 sisfb_userom = -1;
116 sisfb_useoem = -1; 85 sisfb_useoem = -1;
117#ifdef MODULE
118 /* Module: "None" for 2.4, default mode for 2.5+ */
119#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
120 sisfb_mode_idx = -1;
121#else
122 sisfb_mode_idx = MODE_INDEX_NONE;
123#endif
124#else
125 /* Static: Default mode */
126 sisfb_mode_idx = -1; 86 sisfb_mode_idx = -1;
127#endif
128 sisfb_parm_rate = -1; 87 sisfb_parm_rate = -1;
129 sisfb_crt1off = 0; 88 sisfb_crt1off = 0;
130 sisfb_forcecrt1 = -1; 89 sisfb_forcecrt1 = -1;
@@ -142,10 +101,6 @@ sisfb_setdefaultparms(void)
142 sisfb_tvxposoffset = 0; 101 sisfb_tvxposoffset = 0;
143 sisfb_tvyposoffset = 0; 102 sisfb_tvyposoffset = 0;
144 sisfb_nocrt2rate = 0; 103 sisfb_nocrt2rate = 0;
145#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
146 sisfb_inverse = 0;
147 sisfb_fontname[0] = 0;
148#endif
149#if !defined(__i386__) && !defined(__x86_64__) 104#if !defined(__i386__) && !defined(__x86_64__)
150 sisfb_resetcard = 0; 105 sisfb_resetcard = 0;
151 sisfb_videoram = 0; 106 sisfb_videoram = 0;
@@ -162,14 +117,11 @@ sisfb_search_vesamode(unsigned int vesamode, BOOLEAN quiet)
162 /* We don't know the hardware specs yet and there is no ivideo */ 117 /* We don't know the hardware specs yet and there is no ivideo */
163 118
164 if(vesamode == 0) { 119 if(vesamode == 0) {
165#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
166 sisfb_mode_idx = MODE_INDEX_NONE;
167#else
168 if(!quiet) 120 if(!quiet)
169 printk(KERN_ERR "sisfb: Invalid mode. Using default.\n"); 121 printk(KERN_ERR "sisfb: Invalid mode. Using default.\n");
170 122
171 sisfb_mode_idx = DEFAULT_MODE; 123 sisfb_mode_idx = DEFAULT_MODE;
172#endif 124
173 return; 125 return;
174 } 126 }
175 127
@@ -215,7 +167,6 @@ sisfb_search_mode(char *name, BOOLEAN quiet)
215 return; 167 return;
216 } 168 }
217 169
218#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
219 if(!strnicmp(name, sisbios_mode[MODE_INDEX_NONE].name, strlen(name))) { 170 if(!strnicmp(name, sisbios_mode[MODE_INDEX_NONE].name, strlen(name))) {
220 if(!quiet) 171 if(!quiet)
221 printk(KERN_ERR "sisfb: Mode 'none' not supported anymore. Using default.\n"); 172 printk(KERN_ERR "sisfb: Mode 'none' not supported anymore. Using default.\n");
@@ -223,7 +174,7 @@ sisfb_search_mode(char *name, BOOLEAN quiet)
223 sisfb_mode_idx = DEFAULT_MODE; 174 sisfb_mode_idx = DEFAULT_MODE;
224 return; 175 return;
225 } 176 }
226#endif 177
227 if(strlen(name) <= 19) { 178 if(strlen(name) <= 19) {
228 strcpy(strbuf1, name); 179 strcpy(strbuf1, name);
229 for(i = 0; i < strlen(strbuf1); i++) { 180 for(i = 0; i < strlen(strbuf1); i++) {
@@ -1315,20 +1266,7 @@ sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, struct fb_info *in
1315 ivideo->refresh_rate = 60; 1266 ivideo->refresh_rate = 60;
1316 } 1267 }
1317 1268
1318#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
1319 if(ivideo->sisfb_thismonitor.datavalid) {
1320 if(!sisfb_verify_rate(ivideo, &ivideo->sisfb_thismonitor, ivideo->sisfb_mode_idx,
1321 ivideo->rate_idx, ivideo->refresh_rate)) {
1322 printk(KERN_INFO "sisfb: WARNING: Refresh rate exceeds monitor specs!\n");
1323 }
1324 }
1325#endif
1326
1327#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
1328 if(((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) && isactive) {
1329#else
1330 if(isactive) { 1269 if(isactive) {
1331#endif
1332 /* If acceleration to be used? Need to know 1270 /* If acceleration to be used? Need to know
1333 * before pre/post_set_mode() 1271 * before pre/post_set_mode()
1334 */ 1272 */
@@ -1367,9 +1305,7 @@ sisfb_do_set_var(struct fb_var_screeninfo *var, int isactive, struct fb_info *in
1367 ivideo->current_linelength = ivideo->video_linelength; 1305 ivideo->current_linelength = ivideo->video_linelength;
1368 ivideo->current_pixclock = var->pixclock; 1306 ivideo->current_pixclock = var->pixclock;
1369 ivideo->current_refresh_rate = ivideo->refresh_rate; 1307 ivideo->current_refresh_rate = ivideo->refresh_rate;
1370#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
1371 ivideo->sisfb_lastrates[ivideo->mode_no] = ivideo->refresh_rate; 1308 ivideo->sisfb_lastrates[ivideo->mode_no] = ivideo->refresh_rate;
1372#endif
1373 } 1309 }
1374 1310
1375 return 0; 1311 return 0;
@@ -1435,18 +1371,6 @@ sisfb_pan_var(struct sis_video_info *ivideo, struct fb_var_screeninfo *var)
1435 return 0; 1371 return 0;
1436} 1372}
1437 1373
1438/* ------------ FBDev related routines for 2.4 series ----------- */
1439
1440#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
1441
1442#include "sisfb_fbdev_2_4.h"
1443
1444#endif
1445
1446/* ------------ FBDev related routines for 2.6 series ----------- */
1447
1448#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
1449
1450static int 1374static int
1451sisfb_open(struct fb_info *info, int user) 1375sisfb_open(struct fb_info *info, int user)
1452{ 1376{
@@ -1744,8 +1668,6 @@ sisfb_blank(int blank, struct fb_info *info)
1744 return sisfb_myblank(ivideo, blank); 1668 return sisfb_myblank(ivideo, blank);
1745} 1669}
1746 1670
1747#endif
1748
1749/* ----------- FBDev related routines for all series ---------- */ 1671/* ----------- FBDev related routines for all series ---------- */
1750 1672
1751#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15) 1673#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
@@ -1969,20 +1891,6 @@ sisfb_get_fix(struct fb_fix_screeninfo *fix, int con, struct fb_info *info)
1969 1891
1970/* ---------------- fb_ops structures ----------------- */ 1892/* ---------------- fb_ops structures ----------------- */
1971 1893
1972#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
1973static struct fb_ops sisfb_ops = {
1974 .owner = THIS_MODULE,
1975 .fb_get_fix = sisfb_get_fix,
1976 .fb_get_var = sisfb_get_var,
1977 .fb_set_var = sisfb_set_var,
1978 .fb_get_cmap = sisfb_get_cmap,
1979 .fb_set_cmap = sisfb_set_cmap,
1980 .fb_pan_display = sisfb_pan_display,
1981 .fb_ioctl = sisfb_ioctl
1982};
1983#endif
1984
1985#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
1986static struct fb_ops sisfb_ops = { 1894static struct fb_ops sisfb_ops = {
1987 .owner = THIS_MODULE, 1895 .owner = THIS_MODULE,
1988 .fb_open = sisfb_open, 1896 .fb_open = sisfb_open,
@@ -2004,7 +1912,6 @@ static struct fb_ops sisfb_ops = {
2004#endif 1912#endif
2005 .fb_ioctl = sisfb_ioctl 1913 .fb_ioctl = sisfb_ioctl
2006}; 1914};
2007#endif
2008 1915
2009/* ---------------- Chip generation dependent routines ---------------- */ 1916/* ---------------- Chip generation dependent routines ---------------- */
2010 1917
@@ -4100,16 +4007,6 @@ sisfb_setup(char *options)
4100 sisfb_search_mode(this_opt + 5, FALSE); 4007 sisfb_search_mode(this_opt + 5, FALSE);
4101 } else if(!strnicmp(this_opt, "vesa:", 5)) { 4008 } else if(!strnicmp(this_opt, "vesa:", 5)) {
4102 sisfb_search_vesamode(simple_strtoul(this_opt + 5, NULL, 0), FALSE); 4009 sisfb_search_vesamode(simple_strtoul(this_opt + 5, NULL, 0), FALSE);
4103#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
4104 } else if(!strnicmp(this_opt, "inverse", 7)) {
4105 sisfb_inverse = 1;
4106 /* fb_invert_cmaps(); */
4107 } else if(!strnicmp(this_opt, "font:", 5)) {
4108 if(strlen(this_opt + 5) < 40) {
4109 strncpy(sisfb_fontname, this_opt + 5, sizeof(sisfb_fontname) - 1);
4110 sisfb_fontname[sizeof(sisfb_fontname) - 1] = '\0';
4111 }
4112#endif
4113 } else if(!strnicmp(this_opt, "rate:", 5)) { 4010 } else if(!strnicmp(this_opt, "rate:", 5)) {
4114 sisfb_parm_rate = simple_strtoul(this_opt + 5, NULL, 0); 4011 sisfb_parm_rate = simple_strtoul(this_opt + 5, NULL, 0);
4115 } else if(!strnicmp(this_opt, "forcecrt1:", 10)) { 4012 } else if(!strnicmp(this_opt, "forcecrt1:", 10)) {
@@ -5870,17 +5767,9 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5870 if(sisfb_off) 5767 if(sisfb_off)
5871 return -ENXIO; 5768 return -ENXIO;
5872 5769
5873#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3))
5874 sis_fb_info = framebuffer_alloc(sizeof(*ivideo), &pdev->dev); 5770 sis_fb_info = framebuffer_alloc(sizeof(*ivideo), &pdev->dev);
5875 if(!sis_fb_info) 5771 if(!sis_fb_info)
5876 return -ENOMEM; 5772 return -ENOMEM;
5877#else
5878 sis_fb_info = kmalloc(sizeof(*sis_fb_info) + sizeof(*ivideo), GFP_KERNEL);
5879 if(!sis_fb_info)
5880 return -ENOMEM;
5881 memset(sis_fb_info, 0, sizeof(*sis_fb_info) + sizeof(*ivideo));
5882 sis_fb_info->par = ((char *)sis_fb_info + sizeof(*sis_fb_info));
5883#endif
5884 5773
5885 ivideo = (struct sis_video_info *)sis_fb_info->par; 5774 ivideo = (struct sis_video_info *)sis_fb_info->par;
5886 ivideo->memyselfandi = sis_fb_info; 5775 ivideo->memyselfandi = sis_fb_info;
@@ -5970,10 +5859,6 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
5970 ivideo->tvxpos = sisfb_tvxposoffset; 5859 ivideo->tvxpos = sisfb_tvxposoffset;
5971 ivideo->tvypos = sisfb_tvyposoffset; 5860 ivideo->tvypos = sisfb_tvyposoffset;
5972 ivideo->sisfb_nocrt2rate = sisfb_nocrt2rate; 5861 ivideo->sisfb_nocrt2rate = sisfb_nocrt2rate;
5973#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
5974 ivideo->sisfb_inverse = sisfb_inverse;
5975#endif
5976
5977 ivideo->refresh_rate = 0; 5862 ivideo->refresh_rate = 0;
5978 if(ivideo->sisfb_parm_rate != -1) { 5863 if(ivideo->sisfb_parm_rate != -1) {
5979 ivideo->refresh_rate = ivideo->sisfb_parm_rate; 5864 ivideo->refresh_rate = ivideo->sisfb_parm_rate;
@@ -6049,10 +5934,6 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6049 } 5934 }
6050 } 5935 }
6051 5936
6052#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6053 strcpy(sis_fb_info->modename, ivideo->myid);
6054#endif
6055
6056 ivideo->SiS_Pr.ChipType = ivideo->chip; 5937 ivideo->SiS_Pr.ChipType = ivideo->chip;
6057 5938
6058 ivideo->SiS_Pr.ivideo = (void *)ivideo; 5939 ivideo->SiS_Pr.ivideo = (void *)ivideo;
@@ -6134,20 +6015,6 @@ sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
6134#endif 6015#endif
6135 } 6016 }
6136 6017
6137#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6138#ifdef MODULE
6139 if((reg & 0x80) && (reg != 0xff)) {
6140 if((sisbios_mode[ivideo->sisfb_mode_idx].mode_no[ivideo->mni])
6141 != 0xFF) {
6142 printk(KERN_INFO "sisfb: Cannot initialize display mode, "
6143 "X server is active\n");
6144 ret = -EBUSY;
6145 goto error_4;
6146 }
6147 }
6148#endif
6149#endif
6150
6151 /* Search and copy ROM image */ 6018 /* Search and copy ROM image */
6152 ivideo->bios_abase = NULL; 6019 ivideo->bios_abase = NULL;
6153 ivideo->SiS_Pr.VirtualRomBase = NULL; 6020 ivideo->SiS_Pr.VirtualRomBase = NULL;
@@ -6281,9 +6148,6 @@ error_0: iounmap(ivideo->video_vbase);
6281error_1: release_mem_region(ivideo->video_base, ivideo->video_size); 6148error_1: release_mem_region(ivideo->video_base, ivideo->video_size);
6282error_2: release_mem_region(ivideo->mmio_base, ivideo->mmio_size); 6149error_2: release_mem_region(ivideo->mmio_base, ivideo->mmio_size);
6283error_3: vfree(ivideo->bios_abase); 6150error_3: vfree(ivideo->bios_abase);
6284#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6285error_4:
6286#endif
6287 if(ivideo->lpcdev) 6151 if(ivideo->lpcdev)
6288 SIS_PCI_PUT_DEVICE(ivideo->lpcdev); 6152 SIS_PCI_PUT_DEVICE(ivideo->lpcdev);
6289 if(ivideo->nbridge) 6153 if(ivideo->nbridge)
@@ -6586,7 +6450,6 @@ error_4:
6586 sis_fb_info->fix = ivideo->sisfb_fix; 6450 sis_fb_info->fix = ivideo->sisfb_fix;
6587 sis_fb_info->screen_base = ivideo->video_vbase + ivideo->video_offset; 6451 sis_fb_info->screen_base = ivideo->video_vbase + ivideo->video_offset;
6588 sis_fb_info->fbops = &sisfb_ops; 6452 sis_fb_info->fbops = &sisfb_ops;
6589
6590 sisfb_get_fix(&sis_fb_info->fix, -1, sis_fb_info); 6453 sisfb_get_fix(&sis_fb_info->fix, -1, sis_fb_info);
6591 sis_fb_info->pseudo_palette = ivideo->pseudo_palette; 6454 sis_fb_info->pseudo_palette = ivideo->pseudo_palette;
6592 6455
@@ -6603,10 +6466,6 @@ error_4:
6603 } 6466 }
6604#endif 6467#endif
6605 6468
6606#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6607 vc_resize_con(1, 1, 0);
6608#endif
6609
6610 if(register_framebuffer(sis_fb_info) < 0) { 6469 if(register_framebuffer(sis_fb_info) < 0) {
6611 printk(KERN_ERR "sisfb: Fatal error: Failed to register framebuffer\n"); 6470 printk(KERN_ERR "sisfb: Fatal error: Failed to register framebuffer\n");
6612 ret = -EINVAL; 6471 ret = -EINVAL;
@@ -6653,12 +6512,7 @@ error_4:
6653 6512
6654 6513
6655 printk(KERN_INFO "fb%d: %s frame buffer device version %d.%d.%d\n", 6514 printk(KERN_INFO "fb%d: %s frame buffer device version %d.%d.%d\n",
6656#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) 6515 sis_fb_info->node, ivideo->myid, VER_MAJOR, VER_MINOR, VER_LEVEL);
6657 GET_FB_IDX(sis_fb_info->node),
6658#else
6659 sis_fb_info->node,
6660#endif
6661 ivideo->myid, VER_MAJOR, VER_MINOR, VER_LEVEL);
6662 6516
6663 printk(KERN_INFO "sisfb: Copyright (C) 2001-2005 Thomas Winischhofer\n"); 6517 printk(KERN_INFO "sisfb: Copyright (C) 2001-2005 Thomas Winischhofer\n");
6664 6518
@@ -6732,11 +6586,7 @@ static void __devexit sisfb_remove(struct pci_dev *pdev)
6732 /* Unregister the framebuffer */ 6586 /* Unregister the framebuffer */
6733 if(ivideo->registered) { 6587 if(ivideo->registered) {
6734 unregister_framebuffer(sis_fb_info); 6588 unregister_framebuffer(sis_fb_info);
6735#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,3))
6736 framebuffer_release(sis_fb_info); 6589 framebuffer_release(sis_fb_info);
6737#else
6738 kfree(sis_fb_info);
6739#endif
6740 } 6590 }
6741 6591
6742 /* OK, our ivideo is gone for good from here. */ 6592 /* OK, our ivideo is gone for good from here. */
@@ -6762,7 +6612,6 @@ static struct pci_driver sisfb_driver = {
6762 6612
6763SISINITSTATIC int __init sisfb_init(void) 6613SISINITSTATIC int __init sisfb_init(void)
6764{ 6614{
6765#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
6766#ifndef MODULE 6615#ifndef MODULE
6767 char *options = NULL; 6616 char *options = NULL;
6768 6617
@@ -6771,15 +6620,12 @@ SISINITSTATIC int __init sisfb_init(void)
6771 6620
6772 sisfb_setup(options); 6621 sisfb_setup(options);
6773#endif 6622#endif
6774#endif
6775 return pci_register_driver(&sisfb_driver); 6623 return pci_register_driver(&sisfb_driver);
6776} 6624}
6777 6625
6778#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
6779#ifndef MODULE 6626#ifndef MODULE
6780module_init(sisfb_init); 6627module_init(sisfb_init);
6781#endif 6628#endif
6782#endif
6783 6629
6784/*****************************************************/ 6630/*****************************************************/
6785/* MODULE */ 6631/* MODULE */
@@ -6799,9 +6645,6 @@ static int pdc1 = -1;
6799static int noaccel = -1; 6645static int noaccel = -1;
6800static int noypan = -1; 6646static int noypan = -1;
6801static int nomax = -1; 6647static int nomax = -1;
6802#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6803static int inverse = 0;
6804#endif
6805static int userom = -1; 6648static int userom = -1;
6806static int useoem = -1; 6649static int useoem = -1;
6807static char *tvstandard = NULL; 6650static char *tvstandard = NULL;
@@ -6861,10 +6704,6 @@ static int __init sisfb_init_module(void)
6861 else if(nomax == 0) 6704 else if(nomax == 0)
6862 sisfb_max = 1; 6705 sisfb_max = 1;
6863 6706
6864#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6865 if(inverse) sisfb_inverse = 1;
6866#endif
6867
6868 if(mem) 6707 if(mem)
6869 sisfb_parm_mem = mem; 6708 sisfb_parm_mem = mem;
6870 6709
@@ -6913,35 +6752,6 @@ MODULE_DESCRIPTION("SiS 300/540/630/730/315/55x/65x/661/74x/330/76x/34x, XGI V3X
6913MODULE_LICENSE("GPL"); 6752MODULE_LICENSE("GPL");
6914MODULE_AUTHOR("Thomas Winischhofer <thomas@winischhofer.net>, Others"); 6753MODULE_AUTHOR("Thomas Winischhofer <thomas@winischhofer.net>, Others");
6915 6754
6916#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6917MODULE_PARM(mem, "i");
6918MODULE_PARM(noaccel, "i");
6919MODULE_PARM(noypan, "i");
6920MODULE_PARM(nomax, "i");
6921MODULE_PARM(userom, "i");
6922MODULE_PARM(useoem, "i");
6923MODULE_PARM(mode, "s");
6924MODULE_PARM(vesa, "i");
6925MODULE_PARM(rate, "i");
6926MODULE_PARM(forcecrt1, "i");
6927MODULE_PARM(forcecrt2type, "s");
6928MODULE_PARM(scalelcd, "i");
6929MODULE_PARM(pdc, "i");
6930MODULE_PARM(pdc1, "i");
6931MODULE_PARM(specialtiming, "s");
6932MODULE_PARM(lvdshl, "i");
6933MODULE_PARM(tvstandard, "s");
6934MODULE_PARM(tvxposoffset, "i");
6935MODULE_PARM(tvyposoffset, "i");
6936MODULE_PARM(nocrt2rate, "i");
6937MODULE_PARM(inverse, "i");
6938#if !defined(__i386__) && !defined(__x86_64__)
6939MODULE_PARM(resetcard, "i");
6940MODULE_PARM(videoram, "i");
6941#endif
6942#endif
6943
6944#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
6945module_param(mem, int, 0); 6755module_param(mem, int, 0);
6946module_param(noaccel, int, 0); 6756module_param(noaccel, int, 0);
6947module_param(noypan, int, 0); 6757module_param(noypan, int, 0);
@@ -6966,18 +6776,7 @@ module_param(nocrt2rate, int, 0);
6966module_param(resetcard, int, 0); 6776module_param(resetcard, int, 0);
6967module_param(videoram, int, 0); 6777module_param(videoram, int, 0);
6968#endif 6778#endif
6969#endif
6970 6779
6971#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
6972MODULE_PARM_DESC(mem,
6973 "\nDetermines the beginning of the video memory heap in KB. This heap is used\n"
6974 "for video RAM management for eg. DRM/DRI. On 300 series, the default depends\n"
6975 "on the amount of video RAM available. If 8MB of video RAM or less is available,\n"
6976 "the heap starts at 4096KB, if between 8 and 16MB are available at 8192KB,\n"
6977 "otherwise at 12288KB. On 315/330/340 series, the heap size is 32KB by default.\n"
6978 "The value is to be specified without 'KB' and must match the MaxXFBMem setting\n"
6979 "for XFree86 4.x/X.org 6.7 and later.\n");
6980#else
6981MODULE_PARM_DESC(mem, 6780MODULE_PARM_DESC(mem,
6982 "\nDetermines the beginning of the video memory heap in KB. This heap is used\n" 6781 "\nDetermines the beginning of the video memory heap in KB. This heap is used\n"
6983 "for video RAM management for eg. DRM/DRI. On 300 series, the default depends\n" 6782 "for video RAM management for eg. DRM/DRI. On 300 series, the default depends\n"
@@ -6985,7 +6784,6 @@ MODULE_PARM_DESC(mem,
6985 "the heap starts at 4096KB, if between 8 and 16MB are available at 8192KB,\n" 6784 "the heap starts at 4096KB, if between 8 and 16MB are available at 8192KB,\n"
6986 "otherwise at 12288KB. On 315/330/340 series, the heap size is 32KB by default.\n" 6785 "otherwise at 12288KB. On 315/330/340 series, the heap size is 32KB by default.\n"
6987 "The value is to be specified without 'KB'.\n"); 6786 "The value is to be specified without 'KB'.\n");
6988#endif
6989 6787
6990MODULE_PARM_DESC(noaccel, 6788MODULE_PARM_DESC(noaccel,
6991 "\nIf set to anything other than 0, 2D acceleration will be disabled.\n" 6789 "\nIf set to anything other than 0, 2D acceleration will be disabled.\n"
@@ -7002,23 +6800,6 @@ MODULE_PARM_DESC(nomax,
7002 "enable the user to positively specify a virtual Y size of the screen using\n" 6800 "enable the user to positively specify a virtual Y size of the screen using\n"
7003 "fbset. (default: 0)\n"); 6801 "fbset. (default: 0)\n");
7004 6802
7005#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
7006MODULE_PARM_DESC(mode,
7007 "\nSelects the desired display mode in the format [X]x[Y]x[Depth], eg.\n"
7008 "1024x768x16. Other formats supported include XxY-Depth and\n"
7009 "XxY-Depth@Rate. If the parameter is only one (decimal or hexadecimal)\n"
7010 "number, it will be interpreted as a VESA mode number. (default: none if\n"
7011 "sisfb is a module; this leaves the console untouched and the driver will\n"
7012 "only do the video memory management for eg. DRM/DRI; 800x600x8 if sisfb\n"
7013 "is in the kernel)\n");
7014MODULE_PARM_DESC(vesa,
7015 "\nSelects the desired display mode by VESA defined mode number, eg. 0x117\n"
7016 "(default: 0x0000 if sisfb is a module; this leaves the console untouched\n"
7017 "and the driver will only do the video memory management for eg. DRM/DRI;\n"
7018 "0x0103 if sisfb is in the kernel)\n");
7019#endif
7020
7021#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
7022MODULE_PARM_DESC(mode, 6803MODULE_PARM_DESC(mode,
7023 "\nSelects the desired default display mode in the format XxYxDepth,\n" 6804 "\nSelects the desired default display mode in the format XxYxDepth,\n"
7024 "eg. 1024x768x16. Other formats supported include XxY-Depth and\n" 6805 "eg. 1024x768x16. Other formats supported include XxY-Depth and\n"
@@ -7028,7 +6809,6 @@ MODULE_PARM_DESC(mode,
7028MODULE_PARM_DESC(vesa, 6809MODULE_PARM_DESC(vesa,
7029 "\nSelects the desired default display mode by VESA defined mode number, eg.\n" 6810 "\nSelects the desired default display mode by VESA defined mode number, eg.\n"
7030 "0x117 (default: 0x0103)\n"); 6811 "0x117 (default: 0x0103)\n");
7031#endif
7032 6812
7033MODULE_PARM_DESC(rate, 6813MODULE_PARM_DESC(rate,
7034 "\nSelects the desired vertical refresh rate for CRT1 (external VGA) in Hz.\n" 6814 "\nSelects the desired vertical refresh rate for CRT1 (external VGA) in Hz.\n"
@@ -7094,12 +6874,6 @@ MODULE_PARM_DESC(nocrt2rate,
7094 "\nSetting this to 1 will force the driver to use the default refresh rate for\n" 6874 "\nSetting this to 1 will force the driver to use the default refresh rate for\n"
7095 "CRT2 if CRT2 type is VGA. (default: 0, use same rate as CRT1)\n"); 6875 "CRT2 if CRT2 type is VGA. (default: 0, use same rate as CRT1)\n");
7096 6876
7097#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
7098MODULE_PARM_DESC(inverse,
7099 "\nSetting this to anything but 0 should invert the display colors, but this\n"
7100 "does not seem to work. (default: 0)\n");
7101#endif
7102
7103#if !defined(__i386__) && !defined(__x86_64__) 6877#if !defined(__i386__) && !defined(__x86_64__)
7104#ifdef CONFIG_FB_SIS_300 6878#ifdef CONFIG_FB_SIS_300
7105MODULE_PARM_DESC(resetcard, 6879MODULE_PARM_DESC(resetcard,