1
0
Fork 0
Commit Graph

67 Commits (05bf3aac930752408bf38a3f070061fc5f1b9c73)

Author SHA1 Message Date
Miguel Gómez 61439fa873 Staging: xgifb: Remove unused struct _chswtable.
Struct _chswtable and the variable mychswtable are not used anywhere, so remove
them.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 16:59:28 -07:00
Miguel Gómez 949eb0aeb9 Staging: xgifb: Comment cleaning.
Remove commented code and useless comments. Leave only those with relevant
hints to the code.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-11 16:59:27 -07:00
Miguel Gómez 47cee13d1d Staging: xgifb: Remove XGIFAIL() macro and its calls.
XGIFAIL() prints a message and returns a value, but it's used only in one
place. Better remove it and replace the call with the macro content.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-18 17:20:20 -07:00
Peter Huewe f3ca589baf staging/xgifb: Remove superfluous header includes
This patch removes all unnecessary, redundant and superfluous header
includes from xgifb.

Tested on hp t5325 (XGI Z11)

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:14:49 -07:00
Aaro Koskinen 77f3e4b159 staging: xgifb: unwrap mode table lines
Unwrap lines to improve readability. Comments were deleted as they were not
really informative.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:20:07 -07:00
Aaro Koskinen ac64fdf488 staging: xgifb: delete MD_XGI300
Nobody cares about this bit.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:19:09 -07:00
Aaro Koskinen c6d5841b5f staging: xgifb: delete mode rows and columns
Delete redudant rows and columns data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:19:08 -07:00
Aaro Koskinen 283b846940 staging: xgifb: delete mode names from the mode table
Delete mode names from the table. They are just redundant data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:19:08 -07:00
Aaro Koskinen ba6288f6ac staging: xgifb: drop redudant mode table entries
Since the mode search is not string-based anymore, we can drop XxYx24
entries which were just duplicated XxYx32 entries.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:19:08 -07:00
Aaro Koskinen f47f12d621 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>
2012-04-10 10:19:08 -07:00
Aaro Koskinen b07b3a9059 staging: xgifb: delete XGI300paneltype
Delete unused table.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:19:08 -07:00
Aaro Koskinen 18408da0e8 staging: xgifb: drop XG41 code
XG_41 is not listed in xgifb_pci_table, so the code can be safely dropped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 10:19:07 -07:00
Peter Huewe 7ad6651d78 staging/xgifb: Remove remaining duplicate structs and defines
This patch removes the now unused structs and defines which were mere
duplicates of the ones in the sgi headers

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:21:57 -08:00
Peter Huewe b33704dffa staging/xgifb: Include sis headers
This patch includes the headers of the sis driver and reorders some
includes.

Since the xgi driver used to redefine a lot of stuff from the sis
driver, we can simply include the headers of the sis driver itself, so
we can remove duplicated stuff later on.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:21:56 -08:00
Aaro Koskinen 776091018b staging: xgifb: delete "userom" option
Delete a redundant option.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 12:26:08 -08:00
Peter Huewe 27d73f1a5a staging/xgifb: Convert pci_table entries to PCI_DEVICE (if PCI_ANY_ID is used)
This patch converts pci_table entries to use the PCI_DEVICE macro,
if .subvendor and .subdevice are set to PCI_ANY_ID,
and thus improves readability.

v2:
Since the driver_data field isn't used anywhere we can also drop the
assignments for class, class_mask and driver_data.
(found by Aaro Koskinen)

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-26 18:00:09 -08:00
Aaro Koskinen 289ea5249c staging: xgifb: clean up 2nd display state
Convert the display type to enum and rename disp_state to display2.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:49 -06:00
Aaro Koskinen f2df8c097a staging: xgifb: eliminate global XGI_Pr data
Move vb_device_info into xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:48 -06:00
Aaro Koskinen 7d2ab0c62d staging: xgifb: make XGIbios_mode const
Comments are wrong, the table is read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen 84a6c46eb2 staging: xgifb: eliminate filter_tb global variable
filter_tb is only used inside a single function, and it does not need
to be static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen c11d0ef3e2 staging: xgifb: eliminate XGIfb_fix
Eliminate XGIfb_fix and initialize needed fields of fb_info->fix
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen e9865d47d4 staging: xgifb: eliminate default_var
Eliminate default_var and initialize needed fields of fb_info->var
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen 39f10bf18c staging: xgifb: eliminate XGIfb_CRT2_write_enable variable
Replace XGIfb_CRT2_write_enable with IND_XGI_CRT2_WRITE_ENABLE_315.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:47 -06:00
Aaro Koskinen 76cabaa428 staging: xgifb: move pseudo_palette into xgifb_video_info
pseudo_palette should be dynamically allocated for each fb.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen 5aa55d9f97 staging: xgifb: move XGIfb_rate_idx into xgifb_video_info
The current refresh rate index should be stored in the device-specific
data allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen ccf265ad57 staging: xgifb: move xgifb_mode_idx into xgifb_video_info
The current mode index should be stored in the device-specific data
allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen 6928c18ee5 staging: xgifb: eliminate XGIfb_mode_no
We can get the information from the table with mode index.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:46 -06:00
Aaro Koskinen c62f2e466f staging: xgifb: eliminate global XGIhw_ext data
Move xgi_hw_device_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:44 -06:00
Aaro Koskinen 19c1e88e02 staging: xgifb: eliminate global fb_info variable
Move fb_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-12 09:51:44 -06:00
Aaro Koskinen c32283089c staging: xgifb: delete all references to mode "none"
Delete all references to mode "none". It should be handled like any
other invalid mode.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:41:25 -07:00
Aaro Koskinen 44d0244021 staging: xgifb: correct the default mode comment
According to the comment, the default mode should be 800x600x8 while
the index points actually to 800x600x16. Change the comment and move
the definition instead of changing the current behaviour.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:41:25 -07:00
Aaro Koskinen c8bec1f067 staging: xgifb: simplify default mode setup
The default mode is the same regardless of the display type, except for
XG21/LCD which is determined dynamically.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:41:24 -07:00
Aaro Koskinen 69a1869861 staging: xgifb: assume the default video mode also when module
The same default video mode should be assumed regardless if the driver
is a module or not. This won't change the current behaviour, but it will
simplify further changes.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:41:23 -07:00
Aaro Koskinen 87c8b8b346 staging: xgifb: delete "off" option handling
It's possible to disable the built-in xgifb driver with the kernel
command line option:

	video=xgifb:off

This is already handled by the generic framebuffer layer (fb_get_options()
will return TRUE resulting in init failure), so no need to process the
option in the driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:41:20 -07:00
Aaro Koskinen e1b7f9155e staging: xgifb: delete unused module parameters and options
Delete parameters which have no effect.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:41:20 -07:00
Aaro Koskinen b64aa655c2 staging: xgifb: delete an empty string
Delete a string which is always empty.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-24 14:27:58 -07:00
Aaro Koskinen 8145f9febb staging: xgifb: delete driver version information
Delete version information, it's just noise and serves no purpose.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-24 14:27:57 -07:00
Aaro Koskinen 883dac4153 staging: xgifb: delete write-only variables
Delete couple write-only variables.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-24 14:27:57 -07:00
Aaro Koskinen de351ba690 staging: xgifb: replace video_type with FB_TYPE_PACKED_PIXELS
Replace a global variable with a constant.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:24:26 -07:00
Aaro Koskinen fa4c212f2b staging: xgifb: delete unused definitions
Delete some more unused definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:45 -07:00
Ruslan Pisarev 032abf7bf9 Staging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.h
This is a patch to the XGI_main.h and XGI_main_26.c file that fixed up a define warrning found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:45 -07:00
Ruslan Pisarev 44c4ec78c9 Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main.h
This is a patch to the XGI_main.h file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 14:21:44 -07:00
Kenji Toyama 14e43851de Staging: xgifb: Fixed style issues.
Now there's only 10 errors and 1 warning given by checkpatch.pl, and
these are related initialization of statics. The only warning left can
be safely ignored I believe.

I'm resending this patch as the previous one was conflicting with the
newer version updated by Aaro Koskinen.

Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-26 15:46:28 -07:00
Aaro Koskinen d542af50cc staging: xgifb: main: delete redudant extern declarations
Delete redudant declarations and include proper .h files.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:28 -07:00
Aaro Koskinen c4fa7dfe57 staging: xgifb: main: move functions to avoid forward declarations
Move functions so that all forward declarations of internal functions
can be deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:27 -07:00
Aaro Koskinen f45f59d763 staging: xgifb: delete unused register I/O functions
Delete unused register I/O functions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:27 -07:00
Aaro Koskinen 7a60d7728d staging: xgifb: delete unused register I/O macros
Delete unused register I/O macros.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:27 -07:00
Aaro Koskinen 8277cf87bd staging: xgifb: delete incorrect I/O mapping
If the PCI device was disabled when the probe() routine started, the
driver will create 256 MB video memory mapping which is never used or
properly released. It's also unsafe as the size is incorrect for many
video cards. Deleting it also allows eliminating XGIvga_enable global
variable.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:27 -07:00
Aaro Koskinen 38583420d3 staging: xgifb: delete unused LINUXBIOS code
Delete unused LINUXBIOS code.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:26 -07:00
Aaro Koskinen 3259bb5a13 staging: xgifb: delete offscreen memory management
The offscreen memory area currently conflicts with the video memory
exported to the framebuffer layer. The driver does not utilize offscreen
memory, so the functionality can be deleted.

The patch also eliminates the one last memory leak when the driver
is unloaded.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 16:02:51 -08:00