1
0
Fork 0
Commit Graph

65 Commits (c39aada6926c915f8f3bdee19fa9b27800b8cb09)

Author SHA1 Message Date
Aaro Koskinen c39aada692 staging: xgifb: eliminate #ifdef XGIFB_PAN
XGIFB_PAN is always defined and checks can be eliminated.

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:46 -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 e684f4682d Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main_26.c
This is a patch to the XGI_main_26.c 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
Jesper Juhl 7e978a115f Remove unneeded version.h includes from drivers/staging/xgifb/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/xgifb/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:39:37 -07:00
Kenji Toyama a12c27c5ea Staging: xgifb: Fixed style issues.
Not all warnings/errors were silenced, some of them are related to
simple printk() messages that imho should not be split across multiple
lines (it makes it harder to grep for example), and some of them are
related to long lines that are pretty much impossible to split without
proper code refactoring.

Resubmitting this patch because of conflicts.

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 8a94d1aaf6 staging: xgifb: main: make internal functions static
Make remaining non-static internal functions static.

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 49192c4564 staging: xgifb: main: delete unused functions
Delete unused/dead code.

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 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 65283d4296 staging: xgifb: replace setXGIIDXREG() with xgifb_reg_and_or()
Replace setXGIIDXREG() with xgifb_reg_and_or().

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 b2135e4460 staging: xgifb: replace andXGIIDXREG() with xgifb_reg_and()
Replace andXGIIDXREG() with xgifb_reg_and().

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 e67f4d4d9e staging: xgifb: replace orXGIIDXREG() with xgifb_reg_or()
Replace orXGIIDXREG() with xgifb_reg_or().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:26 -07:00
Aaro Koskinen b6e2dc3948 staging: xgifb: replace outXGIIDXREG() with xgifb_reg_set()
Replace outXGIIDXREG() with xgifb_reg_set().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:26 -07:00
Aaro Koskinen 7e119b750d staging: xgifb: replace inXGIIDXREG() with xgifb_reg_get()
Replace inXGIIDXREG() with xgifb_reg_get().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:25 -07:00
Aaro Koskinen e3d5ceb090 staging: xgifb: replace outXGIREG() with outb()
Replace outXGIREG() with outb().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:26:25 -07:00
Aaro Koskinen 8104e32996 staging: xgifb: rename XGINew_SetReg1() to xgifb_reg_set()
Rename XGINew_SetReg1() to xgifb_reg_set().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:31 -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 8a1ed67b51 staging: xgifb: delete redundant extended register access enable
The extended register access enable in !XGIvga_enabled case is not needed.
The driver has enabled the access unconditionally already earlier in
the routine.

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 0658733528 staging: xgifb: eliminate redudant chip type >= XG40 checks
Since all chips supported by the driver are >= XG40, these checks are
redundant and the code can be modified accordingly.

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 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 95befb5818 staging: xgifb: delete nomax module parameter
The parameter is not used.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 16:02:53 -08:00
Aaro Koskinen dbbc2989a7 staging: xgifb: delete bIntegratedMMEnabled
bIntegratedMMEnabled is always true, so the field and checks can be
eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 16:02:52 -08:00
Aaro Koskinen 66c2458c79 staging: xgifb: delete unused fields from xgi_hw_device_info
Delete unused fields from xgi_hw_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 16:02:52 -08: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 83a8c24162 staging: xgifb: delete command queue selection/init
The driver does not utilize HW command queue in any way, so the code
can be dropped. The support for the default mode (MMIO) and AGP have
been disabled already anyway.

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 daa484ec96 staging: xgifb: delete HW cursor memory allocation
HW cursor area is not used in any way.

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 6653eb317f staging: xgifb: delete unused module parameter "noaccel"
The parameter is not used by the driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:19 -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
Aaro Koskinen 1b402967bc staging: xgifb: eliminate fbcon_XGI_fillrect()
fbcon_XGI_fillrect() implementation is trivial and can be replaced with
cfb_fillrect().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:17 -08:00
Aaro Koskinen 85c3c562aa staging: xgifb: eliminate fbcon_XGI_copyarea()
fbcon_XGI_copyarea() implementation is trivial and can be replaced with
cfb_copyarea().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:17 -08:00
Aaro Koskinen 3f60554cb1 staging: xgifb: delete redundant XGIhw_ext fields
pSR and pCR fields can be deleted with no changes in the functionality.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:22:15 -08:00
Aaro Koskinen 7bc5e8374f staging: xgifb: delete dead code for skipping the video memory sizing
Delete dead code for skipping the video memory sizing.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:22:15 -08:00
Javier Martinez Canillas da1545c0f2 Staging: xgifb: Remove unused function fbcon_XGI_sync
Due a cleanup in earlier patches, the function fbcon_XGI_sync now does nothing
so it has to be removed.

This patches removes the unused function.

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
Javier Martinez Canillas 0089bf1fb1 Staging: xgifb: Remove all the references to XGIfb_accel
xgifb framebuffer driver has an option to use an accelerator engine that never
get used (XGIfb_accel is always 0).

An earlier patchset remove the code that depends on the accelerator being
activated. This patch removes all the references to XGIfb_accel.

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
Aaro Koskinen 45dcfaf150 staging: xgifb: clean up xgifb_remove()
Delete redudant comments, blank lines and a redundant semicolon.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:18 -08:00
Aaro Koskinen 5c0ef2ac36 staging: xgifb: release and unmap I/O memory
Release and unmap memory on probe error paths and when the module
is removed.

The patch enables unloading and reloading the xgifb module.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:18 -08:00
Aaro Koskinen 0f07d945f4 staging: xgifb: copy PCI ROM properly
Use proper helper functions to copy the PCI ROM. Also use dynamic memory
allocation. The original code mapped incorrect amount of memory and will
crash on some platforms.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:17 -08:00
Aaro Koskinen 6af8172043 staging: xgifb: fix some memory leaks
Some xgifb_probe() error paths are missing proper vfree()s. Move them
all into a single place.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:17 -08:00
Aaro Koskinen bb29223453 staging: xgifb: xgifb_probe() error paths missing framebuffer_release()
framebuffer_release() is missing from error paths.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:17 -08:00
Joe Perches 5b84cc7810 staging: Use vzalloc
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 16:34:01 -08:00
Atul Sowani fc2347e202 Staging: xgifb: change obsolete pci_find_device() with pci_get_device()
Replaced obsolete pci_find_device() calls with pci_get_device() calls.
This is recommended in pci.txt filei in PCI Documentation.

Signed-off-by: Atul Sowani <sowani@gmail.com>
Acked-by: Arnaud Patard <arnaud.patard@rtp-net.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-11-09 15:17:18 -08:00
Javier Martinez Canillas 15b9e32769 staging: xgifb: Removes unnecesary log
This patch fixes a compile warning removing an unnecessary log message.
I redo the patch against today linux-next.

Thanks a lot

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:07:12 -07:00
Javier Martinez Canillas 328f55baae staging : xgifb: Removes compilation conditionals
This patch fixes a compilation warning in today linux-next
removing some compilation conditionals.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 02:07:12 -07:00
Prashant P. Shah b654f878ba Staging: xgifb: fixed many style issues in XGI_main_26.c
This is a patch to the XGI_main_26 file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style

Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-06 19:43:01 -07:00
Javier Martinez Canillas 430eb1baae staging: xgifb: Removes unused variable
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-05 00:35:37 -07:00