1
0
Fork 0
Commit Graph

33 Commits (eaaa7ec71bff4cb34d9025ed89068d4b3cac3df0)

Author SHA1 Message Date
Peter Huewe 8cedcc7022 staging/xgifb: mttr must be (signed) int
The mttr field must be declared as signed int (as in every other fb
driver) for the mttr functions to work properly.
Moreover the value should be initialized with -1.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-04 10:46:27 -08: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
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 c38d044bf2 staging: xgifb: drop XG45 code
XG45 is not recognized/supported by the driver.

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
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
Dmitry Eremin-Solenikov f650caaa49 staging/xgifb: fix addressing issues on platform with long physical addressing
Some platforms (e.g. ppc460ex) have 36-bit physical addressing, while
sizeof(unsigned long) == 4. Adapt xgifb driver to use phys_addr_t for
physical address variables instead of unsigned long.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 09:52:58 -07: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 25aa75f142 staging: xgifb: enable forcecrt2type on XG21
Make "forcecrt2type" to apply also for XG21. The patch enables user to
switch LVDS LCD ON/OFF without the need to update the video BIOS.

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
Aaro Koskinen fab04b97be staging: xgifb: move XGI21_LVDSCapStruct into xgifb_video_info
Move the LVDS data into a device-specific data, and eliminate the global
variable usage.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-08 12:26:07 -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 3261f2a171 staging: xgifb: delete CRT1 state
The driver does not need to manage CRT1 state.

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 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 fcbdda90ef staging: xgifb: dynamically allocate xgifb_video_info
Delete global xgi_video_info and dynamically allocate the data.

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:45 -06:00
Aaro Koskinen ab886ff86d staging: xgifb: rename struct video_info to xgifb_video_info
Rename struct video_info to 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:45 -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 c44fa627c7 staging: xgifb: vb_init: use readl()/writel() to access iomapped memory
Use readl() and writel() in FB memory test instead of direct pointer
access, and also add iomem annotations for the FB memory.

The patch eliminates the following sparse warnings:

drivers/staging/xgifb/XGI_main_26.c:2113:69: warning: incorrect type in assignment (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2113:69:    expected unsigned char *static [addressable] [toplevel] [assigned] pjVideoMemoryAddress
drivers/staging/xgifb/XGI_main_26.c:2113:69:    got void [noderef] <asn:2>*
drivers/staging/xgifb/XGI_main_26.c:2399:30: warning: incorrect type in assignment (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2399:30:    expected char [noderef] <asn:2>*screen_base
drivers/staging/xgifb/XGI_main_26.c:2399:30:    got char *[addressable] [toplevel] [assigned] video_vbase
drivers/staging/xgifb/XGI_main_26.c:2430:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2430:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2430:31:    got char *[addressable] [toplevel] [assigned] video_vbase
drivers/staging/xgifb/XGI_main_26.c:2454:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2454:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2454:31:    got char *[addressable] [toplev

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16 20:16:48 +02:00
Aaro Koskinen 863c02af58 staging: xgifb: main: use readb()/readw() to access iomapped memory
Use readb()/readw() instead of direct pointer access to read I/O mapped
memory and also add __iomem annotation.

The patch eliminates the following sparse warnings:

drivers/staging/xgifb/XGI_main_26.c:2125:35: warning: incorrect type in assignment (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2125:35:    expected char *[addressable] [toplevel] [assigned] mmio_vbase
drivers/staging/xgifb/XGI_main_26.c:2125:35:    got void [noderef] <asn:2>*
drivers/staging/xgifb/XGI_main_26.c:2439:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2439:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2439:31:    got char *[addressable] [toplevel] [assigned] mmio_vbase
drivers/staging/xgifb/XGI_main_26.c:2463:31: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/xgifb/XGI_main_26.c:2463:31:    expected void volatile [noderef] <asn:2>*addr
drivers/staging/xgifb/XGI_main_26.c:2463:31:    got char *[addressable] [toplevel] [assigned] mmio_vbase

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-16 20:16:47 +02: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
Kenji Toyama a17379e73b Staging: xgifb: Fixed styles issues.
All the warnings about styles have been removed.

Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:31:46 -07:00
Aaro Koskinen ebe7846def staging: xgifb: delete unsupported chip types
The probe routine will fail if the chip is other than XG40..XG27, so
the other types can be dropped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:25 -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
Aaro Koskinen 817368f19a staging: xgifb: remove private ioctls
Drop the badly defined and broken private ioctl interface. Since the
driver is in staging, and some of the ioctls are clearly unsafe or not
even working, it's unlikely that there are any users.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-07 13:23:26 -08:00
Aaro Koskinen 5b863c34ec staging: xgifb: eliminate "accel" field from video_info
The value is always false, so the field can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:18 -08:00
Javier Martinez Canillas 522f1f63cf Staging: xgifb: Remove unused spinlock in struct video_info
xgifb framebuffer driver had an option to use an accelerator engine that never
got used (XGIfb_accel was always 0).

An earlier patchset removed the code relevant to the accelerator.
Since this spinlock was used only for that code, it can be deleted as well.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:19:33 -08:00
Aaro Koskinen 1b3909e5c5 staging: xgifb: eliminate a global variable
Move the XGIfb_mmio_size global variable into the video_info struct.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:19 -08:00
Bill Pemberton a9253883a6 Staging: xgifb: remove __KERNEL__ #ifdef in XGIfb.h
The code inside this #ifdef declared a couple extern functions that
weren't used anywhere, so remove the whole #ifdef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:36 -07:00
Bill Pemberton a3e735a5a2 Staging: xgifb: Remove XGI_TV_PLUG typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:34 -07:00
Bill Pemberton 716083c63b Staging: xgifb: Remove typedefs in XGIfb.h
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:34 -07:00
apatard@mandriva.com d7636e0b07 staging: Add framebuffer driver for XGI chipsets
This driver handles XG20, XG21, XG40, XG42 chipsets from XGI. They're
also known as Z7,Z9,Z11 chipsets. It's based on the SiS fb driver but
has been heavily modified by XGI to support their newer chipsets.


Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:51 -07:00