git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
drivers
/
video
/
cirrusfb.c
diff --git
a/drivers/video/cirrusfb.c
b/drivers/video/cirrusfb.c
index
8132b3b
..
617f63e
100644
(file)
--- a/
drivers/video/cirrusfb.c
+++ b/
drivers/video/cirrusfb.c
@@
-391,9
+391,9
@@
typedef enum {
struct cirrusfb_info {
struct fb_info *info;
struct cirrusfb_info {
struct fb_info *info;
-
caddr_t
fbmem;
-
caddr_t
regbase;
-
caddr_t
mem;
+
u8 __iomem *
fbmem;
+
u8 __iomem *
regbase;
+
u8 __iomem *
mem;
unsigned long size;
cirrusfb_board_t btype;
unsigned char SFR; /* Shadow of special function register */
unsigned long size;
cirrusfb_board_t btype;
unsigned char SFR; /* Shadow of special function register */
@@
-571,13
+571,13
@@
static void RClut (struct cirrusfb_info *cinfo, unsigned char regnum, unsigned c
unsigned char *green,
unsigned char *blue);
#endif
unsigned char *green,
unsigned char *blue);
#endif
-static void cirrusfb_WaitBLT (
caddr_t
regbase);
-static void cirrusfb_BitBLT (
caddr_t
regbase, int bits_per_pixel,
+static void cirrusfb_WaitBLT (
u8 __iomem *
regbase);
+static void cirrusfb_BitBLT (
u8 __iomem *
regbase, int bits_per_pixel,
u_short curx, u_short cury,
u_short destx, u_short desty,
u_short width, u_short height,
u_short line_length);
u_short curx, u_short cury,
u_short destx, u_short desty,
u_short width, u_short height,
u_short line_length);
-static void cirrusfb_RectFill (
caddr_t
regbase, int bits_per_pixel,
+static void cirrusfb_RectFill (
u8 __iomem *
regbase, int bits_per_pixel,
u_short x, u_short y,
u_short width, u_short height,
u_char color, u_short line_length);
u_short x, u_short y,
u_short width, u_short height,
u_char color, u_short line_length);
@@
-1016,7
+1016,7
@@
static int cirrusfb_set_par_foo (struct fb_info *info)
struct cirrusfb_info *cinfo = info->par;
struct fb_var_screeninfo *var = &info->var;
struct cirrusfb_regs regs;
struct cirrusfb_info *cinfo = info->par;
struct fb_var_screeninfo *var = &info->var;
struct cirrusfb_regs regs;
-
caddr_t
regbase = cinfo->regbase;
+
u8 __iomem *
regbase = cinfo->regbase;
unsigned char tmp;
int offset = 0, err;
const struct cirrusfb_board_info_rec *bi;
unsigned char tmp;
int offset = 0, err;
const struct cirrusfb_board_info_rec *bi;
@@
-1727,7
+1727,8
@@
int cirrusfb_blank (int blank_mode, struct fb_info *info)
}
/* Undo current */
}
/* Undo current */
- if (current_mode != VESA_NO_BLANKING) {
+ if (current_mode == FB_BLANK_NORMAL ||
+ current_mode == FB_BLANK_UNBLANK) {
/* unblank the screen */
val = vga_rseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE);
vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, val & 0xdf); /* clear "FullBandwidth" bit */
/* unblank the screen */
val = vga_rseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE);
vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, val & 0xdf); /* clear "FullBandwidth" bit */
@@
-1736,22
+1737,23
@@
int cirrusfb_blank (int blank_mode, struct fb_info *info)
}
/* set new */
}
/* set new */
- if(blank_mode
!= VESA_NO_BLANKING
) {
+ if(blank_mode
> FB_BLANK_NORMAL
) {
/* blank the screen */
val = vga_rseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE);
vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, val | 0x20); /* set "FullBandwidth" bit */
}
switch (blank_mode) {
/* blank the screen */
val = vga_rseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE);
vga_wseq (cinfo->regbase, VGA_SEQ_CLOCK_MODE, val | 0x20); /* set "FullBandwidth" bit */
}
switch (blank_mode) {
- case VESA_NO_BLANKING:
+ case FB_BLANK_UNBLANK:
+ case FB_BLANK_NORMAL:
break;
break;
- case
VESA
_VSYNC_SUSPEND:
+ case
FB_BLANK
_VSYNC_SUSPEND:
vga_wgfx (cinfo->regbase, CL_GRE, 0x04);
break;
vga_wgfx (cinfo->regbase, CL_GRE, 0x04);
break;
- case
VESA
_HSYNC_SUSPEND:
+ case
FB_BLANK
_HSYNC_SUSPEND:
vga_wgfx (cinfo->regbase, CL_GRE, 0x02);
break;
vga_wgfx (cinfo->regbase, CL_GRE, 0x02);
break;
- case
VESA
_POWERDOWN:
+ case
FB_BLANK
_POWERDOWN:
vga_wgfx (cinfo->regbase, CL_GRE, 0x06);
break;
default:
vga_wgfx (cinfo->regbase, CL_GRE, 0x06);
break;
default:
@@
-1761,7
+1763,9
@@
int cirrusfb_blank (int blank_mode, struct fb_info *info)
cinfo->blank_mode = blank_mode;
DPRINTK ("EXIT, returning 0\n");
cinfo->blank_mode = blank_mode;
DPRINTK ("EXIT, returning 0\n");
- return 0;
+
+ /* Let fbcon do a soft blank for us */
+ return (blank_mode == FB_BLANK_NORMAL) ? 1 : 0;
}
/**** END Hardware specific Routines **************************************/
/****************************************************************************/
}
/**** END Hardware specific Routines **************************************/
/****************************************************************************/
@@
-2149,7
+2153,7
@@
static int release_io_ports = 0;
* based on the DRAM bandwidth bit and DRAM bank switching bit. This
* works with 1MB, 2MB and 4MB configurations (which the Motorola boards
* seem to have. */
* based on the DRAM bandwidth bit and DRAM bank switching bit. This
* works with 1MB, 2MB and 4MB configurations (which the Motorola boards
* seem to have. */
-static unsigned int cirrusfb_get_memsize (
caddr_t
regbase)
+static unsigned int cirrusfb_get_memsize (
u8 __iomem *
regbase)
{
unsigned long mem;
unsigned char SRF;
{
unsigned long mem;
unsigned char SRF;
@@
-2246,7
+2250,6
@@
static int cirrusfb_set_fbinfo(struct cirrusfb_info *cinfo)
struct fb_info *info = cinfo->info;
struct fb_var_screeninfo *var = &info->var;
struct fb_info *info = cinfo->info;
struct fb_var_screeninfo *var = &info->var;
- info->currcon = -1;
info->par = cinfo;
info->pseudo_palette = cinfo->pseudo_palette;
info->flags = FBINFO_DEFAULT
info->par = cinfo;
info->pseudo_palette = cinfo->pseudo_palette;
info->flags = FBINFO_DEFAULT
@@
-2394,7
+2397,7
@@
static int cirrusfb_pci_register (struct pci_dev *pdev,
get_prep_addrs (&board_addr, &cinfo->fbregs_phys);
#endif
/* PReP dies if we ioremap the IO registers, but it works w/out... */
get_prep_addrs (&board_addr, &cinfo->fbregs_phys);
#endif
/* PReP dies if we ioremap the IO registers, but it works w/out... */
- cinfo->regbase = (char *) cinfo->fbregs_phys;
+ cinfo->regbase = (char
__iomem
*) cinfo->fbregs_phys;
} else {
DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n");
get_pci_addrs (pdev, &board_addr, &cinfo->fbregs_phys);
} else {
DPRINTK ("Attempt to get PCI info for Cirrus Graphics Card\n");
get_pci_addrs (pdev, &board_addr, &cinfo->fbregs_phys);
@@
-2865,7
+2868,7
@@
static void RClut (struct cirrusfb_info *cinfo, unsigned char regnum, unsigned c
*********************************************************************/
/* FIXME: use interrupts instead */
*********************************************************************/
/* FIXME: use interrupts instead */
-static void cirrusfb_WaitBLT (
caddr_t
regbase)
+static void cirrusfb_WaitBLT (
u8 __iomem *
regbase)
{
/* now busy-wait until we're done */
while (vga_rgfx (regbase, CL_GR31) & 0x08)
{
/* now busy-wait until we're done */
while (vga_rgfx (regbase, CL_GR31) & 0x08)
@@
-2878,7
+2881,7
@@
static void cirrusfb_WaitBLT (caddr_t regbase)
perform accelerated "scrolling"
********************************************************************/
perform accelerated "scrolling"
********************************************************************/
-static void cirrusfb_BitBLT (
caddr_t
regbase, int bits_per_pixel,
+static void cirrusfb_BitBLT (
u8 __iomem *
regbase, int bits_per_pixel,
u_short curx, u_short cury, u_short destx, u_short desty,
u_short width, u_short height, u_short line_length)
{
u_short curx, u_short cury, u_short destx, u_short desty,
u_short width, u_short height, u_short line_length)
{
@@
-2969,7
+2972,7
@@
static void cirrusfb_BitBLT (caddr_t regbase, int bits_per_pixel,
perform accelerated rectangle fill
********************************************************************/
perform accelerated rectangle fill
********************************************************************/
-static void cirrusfb_RectFill (
caddr_t
regbase, int bits_per_pixel,
+static void cirrusfb_RectFill (
u8 __iomem *
regbase, int bits_per_pixel,
u_short x, u_short y, u_short width, u_short height,
u_char color, u_short line_length)
{
u_short x, u_short y, u_short width, u_short height,
u_char color, u_short line_length)
{