mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
fbdev fixes and updates for kernel 6.4-rc2:
- use after free fix in imsttfb (Zheng Wang) - fix error handling in arcfb (Zongjie Li) - lots of whitespace cleanups (Thomas Zimmermann) - add 1920x1080 modedb entry (me) -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCZGAdYgAKCRD3ErUQojoP XxxaAQDEHzqPYzNomG3dttowRZs5qTLsFb+axPMNghlk/3bR2AEA/PX+SNQ3zRn7 ejlYc32i+zaDoIzX9Igtf9mx1E/kqQY= =12QA -----END PGP SIGNATURE----- Merge tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: - use after free fix in imsttfb (Zheng Wang) - fix error handling in arcfb (Zongjie Li) - lots of whitespace cleanups (Thomas Zimmermann) - add 1920x1080 modedb entry (me) * tag 'fbdev-for-6.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: stifb: Fix info entry in sti_struct on error path fbdev: modedb: Add 1920x1080 at 60 Hz video mode fbdev: imsttfb: Fix use after free bug in imsttfb_probe fbdev: vfb: Remove trailing whitespaces fbdev: valkyriefb: Remove trailing whitespaces fbdev: stifb: Remove trailing whitespaces fbdev: sa1100fb: Remove trailing whitespaces fbdev: platinumfb: Remove trailing whitespaces fbdev: p9100: Remove trailing whitespaces fbdev: maxinefb: Remove trailing whitespaces fbdev: macfb: Remove trailing whitespaces fbdev: hpfb: Remove trailing whitespaces fbdev: hgafb: Remove trailing whitespaces fbdev: g364fb: Remove trailing whitespaces fbdev: controlfb: Remove trailing whitespaces fbdev: cg14: Remove trailing whitespaces fbdev: atmel_lcdfb: Remove trailing whitespaces fbdev: 68328fb: Remove trailing whitespaces fbdev: arcfb: Fix error handling in arcfb_probe()
This commit is contained in:
commit
adfbf653a3
@ -124,7 +124,7 @@ static u_long get_line_length(int xres_virtual, int bpp)
|
|||||||
* First part, xxxfb_check_var, must not write anything
|
* First part, xxxfb_check_var, must not write anything
|
||||||
* to hardware, it should only verify and adjust var.
|
* to hardware, it should only verify and adjust var.
|
||||||
* This means it doesn't alter par but it does use hardware
|
* This means it doesn't alter par but it does use hardware
|
||||||
* data from it to check this var.
|
* data from it to check this var.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
|
static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
|
||||||
@ -182,7 +182,7 @@ static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that we checked it we alter var. The reason being is that the video
|
* Now that we checked it we alter var. The reason being is that the video
|
||||||
* mode passed in might not work but slight changes to it might make it
|
* mode passed in might not work but slight changes to it might make it
|
||||||
* work. This way we let the user know what is acceptable.
|
* work. This way we let the user know what is acceptable.
|
||||||
*/
|
*/
|
||||||
switch (var->bits_per_pixel) {
|
switch (var->bits_per_pixel) {
|
||||||
@ -257,8 +257,8 @@ static int mc68x328fb_check_var(struct fb_var_screeninfo *var,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This routine actually sets the video mode. It's in here where we
|
/* This routine actually sets the video mode. It's in here where we
|
||||||
* the hardware state info->par and fix which can be affected by the
|
* the hardware state info->par and fix which can be affected by the
|
||||||
* change in par. For this driver it doesn't do much.
|
* change in par. For this driver it doesn't do much.
|
||||||
*/
|
*/
|
||||||
static int mc68x328fb_set_par(struct fb_info *info)
|
static int mc68x328fb_set_par(struct fb_info *info)
|
||||||
{
|
{
|
||||||
@ -295,7 +295,7 @@ static int mc68x328fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
|||||||
* {hardwarespecific} contains width of RAMDAC
|
* {hardwarespecific} contains width of RAMDAC
|
||||||
* cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset)
|
* cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset)
|
||||||
* RAMDAC[X] is programmed to (red, green, blue)
|
* RAMDAC[X] is programmed to (red, green, blue)
|
||||||
*
|
*
|
||||||
* Pseudocolor:
|
* Pseudocolor:
|
||||||
* uses offset = 0 && length = RAMDAC register width.
|
* uses offset = 0 && length = RAMDAC register width.
|
||||||
* var->{color}.offset is 0
|
* var->{color}.offset is 0
|
||||||
@ -384,7 +384,7 @@ static int mc68x328fb_pan_display(struct fb_var_screeninfo *var,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Most drivers don't need their own mmap function
|
* Most drivers don't need their own mmap function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
static int mc68x328fb_mmap(struct fb_info *info, struct vm_area_struct *vma)
|
||||||
|
@ -523,7 +523,7 @@ static int arcfb_probe(struct platform_device *dev)
|
|||||||
|
|
||||||
info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
|
info = framebuffer_alloc(sizeof(struct arcfb_par), &dev->dev);
|
||||||
if (!info)
|
if (!info)
|
||||||
goto err;
|
goto err_fb_alloc;
|
||||||
|
|
||||||
info->screen_base = (char __iomem *)videomemory;
|
info->screen_base = (char __iomem *)videomemory;
|
||||||
info->fbops = &arcfb_ops;
|
info->fbops = &arcfb_ops;
|
||||||
@ -535,7 +535,7 @@ static int arcfb_probe(struct platform_device *dev)
|
|||||||
|
|
||||||
if (!dio_addr || !cio_addr || !c2io_addr) {
|
if (!dio_addr || !cio_addr || !c2io_addr) {
|
||||||
printk(KERN_WARNING "no IO addresses supplied\n");
|
printk(KERN_WARNING "no IO addresses supplied\n");
|
||||||
goto err1;
|
goto err_addr;
|
||||||
}
|
}
|
||||||
par->dio_addr = dio_addr;
|
par->dio_addr = dio_addr;
|
||||||
par->cio_addr = cio_addr;
|
par->cio_addr = cio_addr;
|
||||||
@ -551,12 +551,12 @@ static int arcfb_probe(struct platform_device *dev)
|
|||||||
printk(KERN_INFO
|
printk(KERN_INFO
|
||||||
"arcfb: Failed req IRQ %d\n", par->irq);
|
"arcfb: Failed req IRQ %d\n", par->irq);
|
||||||
retval = -EBUSY;
|
retval = -EBUSY;
|
||||||
goto err1;
|
goto err_addr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
retval = register_framebuffer(info);
|
retval = register_framebuffer(info);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
goto err1;
|
goto err_register_fb;
|
||||||
platform_set_drvdata(dev, info);
|
platform_set_drvdata(dev, info);
|
||||||
fb_info(info, "Arc frame buffer device, using %dK of video memory\n",
|
fb_info(info, "Arc frame buffer device, using %dK of video memory\n",
|
||||||
videomemorysize >> 10);
|
videomemorysize >> 10);
|
||||||
@ -580,9 +580,12 @@ static int arcfb_probe(struct platform_device *dev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
err1:
|
|
||||||
|
err_register_fb:
|
||||||
|
free_irq(par->irq, info);
|
||||||
|
err_addr:
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
err:
|
err_fb_alloc:
|
||||||
vfree(videomemory);
|
vfree(videomemory);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ static inline void atmel_lcdfb_free_video_memory(struct atmel_lcdfb_info *sinfo)
|
|||||||
/**
|
/**
|
||||||
* atmel_lcdfb_alloc_video_memory - Allocate framebuffer memory
|
* atmel_lcdfb_alloc_video_memory - Allocate framebuffer memory
|
||||||
* @sinfo: the frame buffer to allocate memory for
|
* @sinfo: the frame buffer to allocate memory for
|
||||||
*
|
*
|
||||||
* This function is called only from the atmel_lcdfb_probe()
|
* This function is called only from the atmel_lcdfb_probe()
|
||||||
* so no locking by fb_info->mm_lock around smem_len setting is needed.
|
* so no locking by fb_info->mm_lock around smem_len setting is needed.
|
||||||
*/
|
*/
|
||||||
|
@ -512,7 +512,7 @@ static int cg14_probe(struct platform_device *op)
|
|||||||
is_8mb = (resource_size(&op->resource[1]) == (8 * 1024 * 1024));
|
is_8mb = (resource_size(&op->resource[1]) == (8 * 1024 * 1024));
|
||||||
|
|
||||||
BUILD_BUG_ON(sizeof(par->mmap_map) != sizeof(__cg14_mmap_map));
|
BUILD_BUG_ON(sizeof(par->mmap_map) != sizeof(__cg14_mmap_map));
|
||||||
|
|
||||||
memcpy(&par->mmap_map, &__cg14_mmap_map, sizeof(par->mmap_map));
|
memcpy(&par->mmap_map, &__cg14_mmap_map, sizeof(par->mmap_map));
|
||||||
|
|
||||||
for (i = 0; i < CG14_MMAP_ENTRIES; i++) {
|
for (i = 0; i < CG14_MMAP_ENTRIES; i++) {
|
||||||
|
@ -113,14 +113,14 @@ struct fb_info_control {
|
|||||||
struct fb_info info;
|
struct fb_info info;
|
||||||
struct fb_par_control par;
|
struct fb_par_control par;
|
||||||
u32 pseudo_palette[16];
|
u32 pseudo_palette[16];
|
||||||
|
|
||||||
struct cmap_regs __iomem *cmap_regs;
|
struct cmap_regs __iomem *cmap_regs;
|
||||||
unsigned long cmap_regs_phys;
|
unsigned long cmap_regs_phys;
|
||||||
|
|
||||||
struct control_regs __iomem *control_regs;
|
struct control_regs __iomem *control_regs;
|
||||||
unsigned long control_regs_phys;
|
unsigned long control_regs_phys;
|
||||||
unsigned long control_regs_size;
|
unsigned long control_regs_size;
|
||||||
|
|
||||||
__u8 __iomem *frame_buffer;
|
__u8 __iomem *frame_buffer;
|
||||||
unsigned long frame_buffer_phys;
|
unsigned long frame_buffer_phys;
|
||||||
unsigned long fb_orig_base;
|
unsigned long fb_orig_base;
|
||||||
@ -196,7 +196,7 @@ static void set_control_clock(unsigned char *params)
|
|||||||
while (!req.complete)
|
while (!req.complete)
|
||||||
cuda_poll();
|
cuda_poll();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -233,19 +233,19 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro
|
|||||||
if (p->par.xoffset != par->xoffset ||
|
if (p->par.xoffset != par->xoffset ||
|
||||||
p->par.yoffset != par->yoffset)
|
p->par.yoffset != par->yoffset)
|
||||||
set_screen_start(par->xoffset, par->yoffset, p);
|
set_screen_start(par->xoffset, par->yoffset, p);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
p->par = *par;
|
p->par = *par;
|
||||||
cmode = p->par.cmode;
|
cmode = p->par.cmode;
|
||||||
r = &par->regvals;
|
r = &par->regvals;
|
||||||
|
|
||||||
/* Turn off display */
|
/* Turn off display */
|
||||||
out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl);
|
out_le32(CNTRL_REG(p,ctrl), 0x400 | par->ctrl);
|
||||||
|
|
||||||
set_control_clock(r->clock_params);
|
set_control_clock(r->clock_params);
|
||||||
|
|
||||||
RADACAL_WRITE(0x20, r->radacal_ctrl);
|
RADACAL_WRITE(0x20, r->radacal_ctrl);
|
||||||
RADACAL_WRITE(0x21, p->control_use_bank2 ? 0 : 1);
|
RADACAL_WRITE(0x21, p->control_use_bank2 ? 0 : 1);
|
||||||
RADACAL_WRITE(0x10, 0);
|
RADACAL_WRITE(0x10, 0);
|
||||||
@ -254,7 +254,7 @@ static void control_set_hardware(struct fb_info_control *p, struct fb_par_contro
|
|||||||
rp = &p->control_regs->vswin;
|
rp = &p->control_regs->vswin;
|
||||||
for (i = 0; i < 16; ++i, ++rp)
|
for (i = 0; i < 16; ++i, ++rp)
|
||||||
out_le32(&rp->r, r->regs[i]);
|
out_le32(&rp->r, r->regs[i]);
|
||||||
|
|
||||||
out_le32(CNTRL_REG(p,pitch), par->pitch);
|
out_le32(CNTRL_REG(p,pitch), par->pitch);
|
||||||
out_le32(CNTRL_REG(p,mode), r->mode);
|
out_le32(CNTRL_REG(p,mode), r->mode);
|
||||||
out_le32(CNTRL_REG(p,vram_attr), p->vram_attr);
|
out_le32(CNTRL_REG(p,vram_attr), p->vram_attr);
|
||||||
@ -366,7 +366,7 @@ static int read_control_sense(struct fb_info_control *p)
|
|||||||
sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0x180) >> 7;
|
sense |= (in_le32(CNTRL_REG(p,mon_sense)) & 0x180) >> 7;
|
||||||
|
|
||||||
out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */
|
out_le32(CNTRL_REG(p,mon_sense), 077); /* turn off drivers */
|
||||||
|
|
||||||
return sense;
|
return sense;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -558,9 +558,9 @@ static int control_var_to_par(struct fb_var_screeninfo *var,
|
|||||||
static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
|
static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeninfo *var)
|
||||||
{
|
{
|
||||||
struct control_regints *rv;
|
struct control_regints *rv;
|
||||||
|
|
||||||
rv = (struct control_regints *) par->regvals.regs;
|
rv = (struct control_regints *) par->regvals.regs;
|
||||||
|
|
||||||
memset(var, 0, sizeof(*var));
|
memset(var, 0, sizeof(*var));
|
||||||
var->xres = par->xres;
|
var->xres = par->xres;
|
||||||
var->yres = par->yres;
|
var->yres = par->yres;
|
||||||
@ -568,7 +568,7 @@ static void control_par_to_var(struct fb_par_control *par, struct fb_var_screeni
|
|||||||
var->yres_virtual = par->vyres;
|
var->yres_virtual = par->vyres;
|
||||||
var->xoffset = par->xoffset;
|
var->xoffset = par->xoffset;
|
||||||
var->yoffset = par->yoffset;
|
var->yoffset = par->yoffset;
|
||||||
|
|
||||||
switch(par->cmode) {
|
switch(par->cmode) {
|
||||||
default:
|
default:
|
||||||
case CMODE_8:
|
case CMODE_8:
|
||||||
@ -634,7 +634,7 @@ static int controlfb_check_var (struct fb_var_screeninfo *var, struct fb_info *i
|
|||||||
|
|
||||||
err = control_var_to_par(var, &par, info);
|
err = control_var_to_par(var, &par, info);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
control_par_to_var(&par, var);
|
control_par_to_var(&par, var);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -655,7 +655,7 @@ static int controlfb_set_par (struct fb_info *info)
|
|||||||
" control_var_to_par: %d.\n", err);
|
" control_var_to_par: %d.\n", err);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
control_set_hardware(p, &par);
|
control_set_hardware(p, &par);
|
||||||
|
|
||||||
info->fix.visual = (p->par.cmode == CMODE_8) ?
|
info->fix.visual = (p->par.cmode == CMODE_8) ?
|
||||||
@ -840,7 +840,7 @@ static int __init init_control(struct fb_info_control *p)
|
|||||||
int full, sense, vmode, cmode, vyres;
|
int full, sense, vmode, cmode, vyres;
|
||||||
struct fb_var_screeninfo var;
|
struct fb_var_screeninfo var;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
printk(KERN_INFO "controlfb: ");
|
printk(KERN_INFO "controlfb: ");
|
||||||
|
|
||||||
full = p->total_vram == 0x400000;
|
full = p->total_vram == 0x400000;
|
||||||
|
@ -257,6 +257,11 @@ static const struct fb_videomode modedb[] = {
|
|||||||
{ NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
|
{ NULL, 72, 480, 300, 33386, 40, 24, 11, 19, 80, 3, 0,
|
||||||
FB_VMODE_DOUBLE },
|
FB_VMODE_DOUBLE },
|
||||||
|
|
||||||
|
/* 1920x1080 @ 60 Hz, 67.3 kHz hsync */
|
||||||
|
{ NULL, 60, 1920, 1080, 6734, 148, 88, 36, 4, 44, 5, 0,
|
||||||
|
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||||
|
FB_VMODE_NONINTERLACED },
|
||||||
|
|
||||||
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
|
/* 1920x1200 @ 60 Hz, 74.5 Khz hsync */
|
||||||
{ NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
|
{ NULL, 60, 1920, 1200, 5177, 128, 336, 1, 38, 208, 3,
|
||||||
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* This driver is based on tgafb.c
|
* This driver is based on tgafb.c
|
||||||
*
|
*
|
||||||
* Copyright (C) 1997 Geert Uytterhoeven
|
* Copyright (C) 1997 Geert Uytterhoeven
|
||||||
* Copyright (C) 1995 Jay Estabrook
|
* Copyright (C) 1995 Jay Estabrook
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
@ -28,7 +28,7 @@
|
|||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/jazz.h>
|
#include <asm/jazz.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Various defines for the G364
|
* Various defines for the G364
|
||||||
*/
|
*/
|
||||||
#define G364_MEM_BASE 0xe4400000
|
#define G364_MEM_BASE 0xe4400000
|
||||||
@ -125,7 +125,7 @@ static const struct fb_ops g364fb_ops = {
|
|||||||
*
|
*
|
||||||
* This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
|
* This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag
|
||||||
*/
|
*/
|
||||||
static int g364fb_pan_display(struct fb_var_screeninfo *var,
|
static int g364fb_pan_display(struct fb_var_screeninfo *var,
|
||||||
struct fb_info *info)
|
struct fb_info *info)
|
||||||
{
|
{
|
||||||
if (var->xoffset ||
|
if (var->xoffset ||
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
|
* linux/drivers/video/hgafb.c -- Hercules graphics adaptor frame buffer device
|
||||||
*
|
*
|
||||||
* Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu)
|
* Created 25 Nov 1999 by Ferenc Bakonyi (fero@drama.obuda.kando.hu)
|
||||||
* Based on skeletonfb.c by Geert Uytterhoeven and
|
* Based on skeletonfb.c by Geert Uytterhoeven and
|
||||||
* mdacon.c by Andrew Apted
|
* mdacon.c by Andrew Apted
|
||||||
@ -8,14 +8,14 @@
|
|||||||
* History:
|
* History:
|
||||||
*
|
*
|
||||||
* - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
|
* - Revision 0.1.8 (23 Oct 2002): Ported to new framebuffer api.
|
||||||
*
|
*
|
||||||
* - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
|
* - Revision 0.1.7 (23 Jan 2001): fix crash resulting from MDA only cards
|
||||||
* being detected as Hercules. (Paul G.)
|
* being detected as Hercules. (Paul G.)
|
||||||
* - Revision 0.1.6 (17 Aug 2000): new style structs
|
* - Revision 0.1.6 (17 Aug 2000): new style structs
|
||||||
* documentation
|
* documentation
|
||||||
* - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
|
* - Revision 0.1.5 (13 Mar 2000): spinlocks instead of saveflags();cli();etc
|
||||||
* minor fixes
|
* minor fixes
|
||||||
* - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
|
* - Revision 0.1.4 (24 Jan 2000): fixed a bug in hga_card_detect() for
|
||||||
* HGA-only systems
|
* HGA-only systems
|
||||||
* - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
|
* - Revision 0.1.3 (22 Jan 2000): modified for the new fb_info structure
|
||||||
* screen is cleared after rmmod
|
* screen is cleared after rmmod
|
||||||
@ -143,7 +143,7 @@ static bool nologo = 0;
|
|||||||
|
|
||||||
static void write_hga_b(unsigned int val, unsigned char reg)
|
static void write_hga_b(unsigned int val, unsigned char reg)
|
||||||
{
|
{
|
||||||
outb_p(reg, HGA_INDEX_PORT);
|
outb_p(reg, HGA_INDEX_PORT);
|
||||||
outb_p(val, HGA_VALUE_PORT);
|
outb_p(val, HGA_VALUE_PORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,7 +155,7 @@ static void write_hga_w(unsigned int val, unsigned char reg)
|
|||||||
|
|
||||||
static int test_hga_b(unsigned char val, unsigned char reg)
|
static int test_hga_b(unsigned char val, unsigned char reg)
|
||||||
{
|
{
|
||||||
outb_p(reg, HGA_INDEX_PORT);
|
outb_p(reg, HGA_INDEX_PORT);
|
||||||
outb (val, HGA_VALUE_PORT);
|
outb (val, HGA_VALUE_PORT);
|
||||||
udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
|
udelay(20); val = (inb_p(HGA_VALUE_PORT) == val);
|
||||||
return val;
|
return val;
|
||||||
@ -244,7 +244,7 @@ static void hga_show_logo(struct fb_info *info)
|
|||||||
void __iomem *dest = hga_vram;
|
void __iomem *dest = hga_vram;
|
||||||
char *logo = linux_logo_bw;
|
char *logo = linux_logo_bw;
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
|
for (y = 134; y < 134 + 80 ; y++) * this needs some cleanup *
|
||||||
for (x = 0; x < 10 ; x++)
|
for (x = 0; x < 10 ; x++)
|
||||||
writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
|
writeb(~*(logo++),(dest + HGA_ROWADDR(y) + x + 40));
|
||||||
@ -255,7 +255,7 @@ static void hga_pan(unsigned int xoffset, unsigned int yoffset)
|
|||||||
{
|
{
|
||||||
unsigned int base;
|
unsigned int base;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
base = (yoffset / 8) * 90 + xoffset;
|
base = (yoffset / 8) * 90 + xoffset;
|
||||||
spin_lock_irqsave(&hga_reg_lock, flags);
|
spin_lock_irqsave(&hga_reg_lock, flags);
|
||||||
write_hga_w(base, 0x0c); /* start address */
|
write_hga_w(base, 0x0c); /* start address */
|
||||||
@ -310,7 +310,7 @@ static int hga_card_detect(void)
|
|||||||
/* Ok, there is definitely a card registering at the correct
|
/* Ok, there is definitely a card registering at the correct
|
||||||
* memory location, so now we do an I/O port test.
|
* memory location, so now we do an I/O port test.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
|
if (!test_hga_b(0x66, 0x0f)) /* cursor low register */
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
@ -321,7 +321,7 @@ static int hga_card_detect(void)
|
|||||||
* bit of the status register is changing. This test lasts for
|
* bit of the status register is changing. This test lasts for
|
||||||
* approximately 1/10th of a second.
|
* approximately 1/10th of a second.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
|
p_save = q_save = inb_p(HGA_STATUS_PORT) & HGA_STATUS_VSYNC;
|
||||||
|
|
||||||
for (count=0; count < 50000 && p_save == q_save; count++) {
|
for (count=0; count < 50000 && p_save == q_save; count++) {
|
||||||
@ -329,7 +329,7 @@ static int hga_card_detect(void)
|
|||||||
udelay(2);
|
udelay(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_save == q_save)
|
if (p_save == q_save)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
switch (inb_p(HGA_STATUS_PORT) & 0x70) {
|
switch (inb_p(HGA_STATUS_PORT) & 0x70) {
|
||||||
@ -415,7 +415,7 @@ static int hgafb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
|||||||
* @info:pointer to fb_info object containing info for current hga board
|
* @info:pointer to fb_info object containing info for current hga board
|
||||||
*
|
*
|
||||||
* This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
|
* This function looks only at xoffset, yoffset and the %FB_VMODE_YWRAP
|
||||||
* flag in @var. If input parameters are correct it calls hga_pan() to
|
* flag in @var. If input parameters are correct it calls hga_pan() to
|
||||||
* program the hardware. @info->var is updated to the new values.
|
* program the hardware. @info->var is updated to the new values.
|
||||||
* A zero is returned on success and %-EINVAL for failure.
|
* A zero is returned on success and %-EINVAL for failure.
|
||||||
*/
|
*/
|
||||||
@ -442,9 +442,9 @@ static int hgafb_pan_display(struct fb_var_screeninfo *var,
|
|||||||
* hgafb_blank - (un)blank the screen
|
* hgafb_blank - (un)blank the screen
|
||||||
* @blank_mode:blanking method to use
|
* @blank_mode:blanking method to use
|
||||||
* @info:unused
|
* @info:unused
|
||||||
*
|
*
|
||||||
* Blank the screen if blank_mode != 0, else unblank.
|
* Blank the screen if blank_mode != 0, else unblank.
|
||||||
* Implements VESA suspend and powerdown modes on hardware that supports
|
* Implements VESA suspend and powerdown modes on hardware that supports
|
||||||
* disabling hsync/vsync:
|
* disabling hsync/vsync:
|
||||||
* @blank_mode == 2 means suspend vsync,
|
* @blank_mode == 2 means suspend vsync,
|
||||||
* @blank_mode == 3 means suspend hsync,
|
* @blank_mode == 3 means suspend hsync,
|
||||||
@ -539,15 +539,15 @@ static const struct fb_ops hgafb_ops = {
|
|||||||
.fb_copyarea = hgafb_copyarea,
|
.fb_copyarea = hgafb_copyarea,
|
||||||
.fb_imageblit = hgafb_imageblit,
|
.fb_imageblit = hgafb_imageblit,
|
||||||
};
|
};
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- *
|
/* ------------------------------------------------------------------------- *
|
||||||
*
|
*
|
||||||
* Functions in fb_info
|
* Functions in fb_info
|
||||||
*
|
*
|
||||||
* ------------------------------------------------------------------------- */
|
* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/* ------------------------------------------------------------------------- */
|
/* ------------------------------------------------------------------------- */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialization
|
* Initialization
|
||||||
*/
|
*/
|
||||||
|
@ -92,7 +92,7 @@ static int hpfb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
|||||||
|
|
||||||
if (regno >= info->cmap.len)
|
if (regno >= info->cmap.len)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
while (in_be16(fb_regs + 0x6002) & 0x4) udelay(1);
|
while (in_be16(fb_regs + 0x6002) & 0x4) udelay(1);
|
||||||
|
|
||||||
out_be16(fb_regs + 0x60ba, 0xff);
|
out_be16(fb_regs + 0x60ba, 0xff);
|
||||||
@ -143,7 +143,7 @@ static void topcat_blit(int x0, int y0, int x1, int y1, int w, int h, int rr)
|
|||||||
out_8(fb_regs + WMOVE, fb_bitmask);
|
out_8(fb_regs + WMOVE, fb_bitmask);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void hpfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
|
static void hpfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
|
||||||
{
|
{
|
||||||
topcat_blit(area->sx, area->sy, area->dx, area->dy, area->width, area->height, RR_COPY);
|
topcat_blit(area->sx, area->sy, area->dx, area->dy, area->width, area->height, RR_COPY);
|
||||||
}
|
}
|
||||||
@ -315,7 +315,7 @@ unmap_screen_base:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check that the secondary ID indicates that we have some hope of working with this
|
* Check that the secondary ID indicates that we have some hope of working with this
|
||||||
* framebuffer. The catseye boards are pretty much like topcats and we can muddle through.
|
* framebuffer. The catseye boards are pretty much like topcats and we can muddle through.
|
||||||
*/
|
*/
|
||||||
@ -323,7 +323,7 @@ unmap_screen_base:
|
|||||||
#define topcat_sid_ok(x) (((x) == DIO_ID2_LRCATSEYE) || ((x) == DIO_ID2_HRCCATSEYE) \
|
#define topcat_sid_ok(x) (((x) == DIO_ID2_LRCATSEYE) || ((x) == DIO_ID2_HRCCATSEYE) \
|
||||||
|| ((x) == DIO_ID2_HRMCATSEYE) || ((x) == DIO_ID2_TOPCAT))
|
|| ((x) == DIO_ID2_HRMCATSEYE) || ((x) == DIO_ID2_TOPCAT))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialise the framebuffer
|
* Initialise the framebuffer
|
||||||
*/
|
*/
|
||||||
static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
|
static int hpfb_dio_probe(struct dio_dev *d, const struct dio_device_id *ent)
|
||||||
|
@ -1347,7 +1347,7 @@ static const struct fb_ops imsttfb_ops = {
|
|||||||
.fb_ioctl = imsttfb_ioctl,
|
.fb_ioctl = imsttfb_ioctl,
|
||||||
};
|
};
|
||||||
|
|
||||||
static void init_imstt(struct fb_info *info)
|
static int init_imstt(struct fb_info *info)
|
||||||
{
|
{
|
||||||
struct imstt_par *par = info->par;
|
struct imstt_par *par = info->par;
|
||||||
__u32 i, tmp, *ip, *end;
|
__u32 i, tmp, *ip, *end;
|
||||||
@ -1420,7 +1420,7 @@ static void init_imstt(struct fb_info *info)
|
|||||||
|| !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) {
|
|| !(compute_imstt_regvals(par, info->var.xres, info->var.yres))) {
|
||||||
printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel);
|
printk("imsttfb: %ux%ux%u not supported\n", info->var.xres, info->var.yres, info->var.bits_per_pixel);
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
return;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(info->fix.id, "IMS TT (%s)", par->ramdac == IBM ? "IBM" : "TVP");
|
sprintf(info->fix.id, "IMS TT (%s)", par->ramdac == IBM ? "IBM" : "TVP");
|
||||||
@ -1456,12 +1456,13 @@ static void init_imstt(struct fb_info *info)
|
|||||||
|
|
||||||
if (register_framebuffer(info) < 0) {
|
if (register_framebuffer(info) < 0) {
|
||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
return;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8;
|
tmp = (read_reg_le32(par->dc_regs, SSTATUS) & 0x0f00) >> 8;
|
||||||
fb_info(info, "%s frame buffer; %uMB vram; chip version %u\n",
|
fb_info(info, "%s frame buffer; %uMB vram; chip version %u\n",
|
||||||
info->fix.id, info->fix.smem_len >> 20, tmp);
|
info->fix.id, info->fix.smem_len >> 20, tmp);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
@ -1529,10 +1530,10 @@ static int imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|||||||
if (!par->cmap_regs)
|
if (!par->cmap_regs)
|
||||||
goto error;
|
goto error;
|
||||||
info->pseudo_palette = par->palette;
|
info->pseudo_palette = par->palette;
|
||||||
init_imstt(info);
|
ret = init_imstt(info);
|
||||||
|
if (!ret)
|
||||||
pci_set_drvdata(pdev, info);
|
pci_set_drvdata(pdev, info);
|
||||||
return 0;
|
return ret;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (par->dc_regs)
|
if (par->dc_regs)
|
||||||
|
@ -339,7 +339,7 @@ static int civic_setpalette(unsigned int regno, unsigned int red,
|
|||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int clut_status;
|
int clut_status;
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
|
|
||||||
/* Set the register address */
|
/* Set the register address */
|
||||||
@ -439,7 +439,7 @@ static int macfb_setcolreg(unsigned regno, unsigned red, unsigned green,
|
|||||||
* (according to the entries in the `var' structure).
|
* (according to the entries in the `var' structure).
|
||||||
* Return non-zero for invalid regno.
|
* Return non-zero for invalid regno.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (regno >= fb_info->cmap.len)
|
if (regno >= fb_info->cmap.len)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
@ -548,7 +548,7 @@ static int __init macfb_init(void)
|
|||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
macfb_setup(option);
|
macfb_setup(option);
|
||||||
|
|
||||||
if (!MACH_IS_MAC)
|
if (!MACH_IS_MAC)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
if (mac_bi_data.id == MAC_MODEL_Q630 ||
|
if (mac_bi_data.id == MAC_MODEL_Q630 ||
|
||||||
@ -644,7 +644,7 @@ static int __init macfb_init(void)
|
|||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto fail_unmap;
|
goto fail_unmap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We take a wild guess that if the video physical address is
|
* We take a wild guess that if the video physical address is
|
||||||
* in nubus slot space, that the nubus card is driving video.
|
* in nubus slot space, that the nubus card is driving video.
|
||||||
@ -774,7 +774,7 @@ static int __init macfb_init(void)
|
|||||||
civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
|
civic_cmap_regs = ioremap(CIVIC_BASE, 0x1000);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Assorted weirdos
|
* Assorted weirdos
|
||||||
* We think this may be like the LC II
|
* We think this may be like the LC II
|
||||||
|
@ -138,7 +138,7 @@ int __init maxinefb_init(void)
|
|||||||
*(volatile unsigned char *)fboff = 0x0;
|
*(volatile unsigned char *)fboff = 0x0;
|
||||||
|
|
||||||
maxinefb_fix.smem_start = fb_start;
|
maxinefb_fix.smem_start = fb_start;
|
||||||
|
|
||||||
/* erase hardware cursor */
|
/* erase hardware cursor */
|
||||||
for (i = 0; i < 512; i++) {
|
for (i = 0; i < 512; i++) {
|
||||||
maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i,
|
maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i,
|
||||||
|
@ -65,7 +65,7 @@ static const struct fb_ops p9100_ops = {
|
|||||||
#define P9100_FB_OFF 0x0UL
|
#define P9100_FB_OFF 0x0UL
|
||||||
|
|
||||||
/* 3 bits: 2=8bpp 3=16bpp 5=32bpp 7=24bpp */
|
/* 3 bits: 2=8bpp 3=16bpp 5=32bpp 7=24bpp */
|
||||||
#define SYS_CONFIG_PIXELSIZE_SHIFT 26
|
#define SYS_CONFIG_PIXELSIZE_SHIFT 26
|
||||||
|
|
||||||
#define SCREENPAINT_TIMECTL1_ENABLE_VIDEO 0x20 /* 0 = off, 1 = on */
|
#define SCREENPAINT_TIMECTL1_ENABLE_VIDEO 0x20 /* 0 = off, 1 = on */
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ struct p9100_regs {
|
|||||||
u32 vram_xxx[25];
|
u32 vram_xxx[25];
|
||||||
|
|
||||||
/* Registers for IBM RGB528 Palette */
|
/* Registers for IBM RGB528 Palette */
|
||||||
u32 ramdac_cmap_wridx;
|
u32 ramdac_cmap_wridx;
|
||||||
u32 ramdac_palette_data;
|
u32 ramdac_palette_data;
|
||||||
u32 ramdac_pixel_mask;
|
u32 ramdac_pixel_mask;
|
||||||
u32 ramdac_palette_rdaddr;
|
u32 ramdac_palette_rdaddr;
|
||||||
|
@ -52,17 +52,17 @@ struct fb_info_platinum {
|
|||||||
__u8 red, green, blue;
|
__u8 red, green, blue;
|
||||||
} palette[256];
|
} palette[256];
|
||||||
u32 pseudo_palette[16];
|
u32 pseudo_palette[16];
|
||||||
|
|
||||||
volatile struct cmap_regs __iomem *cmap_regs;
|
volatile struct cmap_regs __iomem *cmap_regs;
|
||||||
unsigned long cmap_regs_phys;
|
unsigned long cmap_regs_phys;
|
||||||
|
|
||||||
volatile struct platinum_regs __iomem *platinum_regs;
|
volatile struct platinum_regs __iomem *platinum_regs;
|
||||||
unsigned long platinum_regs_phys;
|
unsigned long platinum_regs_phys;
|
||||||
|
|
||||||
__u8 __iomem *frame_buffer;
|
__u8 __iomem *frame_buffer;
|
||||||
volatile __u8 __iomem *base_frame_buffer;
|
volatile __u8 __iomem *base_frame_buffer;
|
||||||
unsigned long frame_buffer_phys;
|
unsigned long frame_buffer_phys;
|
||||||
|
|
||||||
unsigned long total_vram;
|
unsigned long total_vram;
|
||||||
int clktype;
|
int clktype;
|
||||||
int dactype;
|
int dactype;
|
||||||
@ -133,7 +133,7 @@ static int platinumfb_set_par (struct fb_info *info)
|
|||||||
platinum_set_hardware(pinfo);
|
platinum_set_hardware(pinfo);
|
||||||
|
|
||||||
init = platinum_reg_init[pinfo->vmode-1];
|
init = platinum_reg_init[pinfo->vmode-1];
|
||||||
|
|
||||||
if ((pinfo->vmode == VMODE_832_624_75) && (pinfo->cmode > CMODE_8))
|
if ((pinfo->vmode == VMODE_832_624_75) && (pinfo->cmode > CMODE_8))
|
||||||
offset = 0x10;
|
offset = 0x10;
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ static int platinumfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -269,7 +269,7 @@ static void platinum_set_hardware(struct fb_info_platinum *pinfo)
|
|||||||
struct platinum_regvals *init;
|
struct platinum_regvals *init;
|
||||||
int i;
|
int i;
|
||||||
int vmode, cmode;
|
int vmode, cmode;
|
||||||
|
|
||||||
vmode = pinfo->vmode;
|
vmode = pinfo->vmode;
|
||||||
cmode = pinfo->cmode;
|
cmode = pinfo->cmode;
|
||||||
|
|
||||||
@ -436,7 +436,7 @@ static int read_platinum_sense(struct fb_info_platinum *info)
|
|||||||
* This routine takes a user-supplied var, and picks the best vmode/cmode from it.
|
* This routine takes a user-supplied var, and picks the best vmode/cmode from it.
|
||||||
* It also updates the var structure to the actual mode data obtained
|
* It also updates the var structure to the actual mode data obtained
|
||||||
*/
|
*/
|
||||||
static int platinum_var_to_par(struct fb_var_screeninfo *var,
|
static int platinum_var_to_par(struct fb_var_screeninfo *var,
|
||||||
struct fb_info_platinum *pinfo,
|
struct fb_info_platinum *pinfo,
|
||||||
int check_only)
|
int check_only)
|
||||||
{
|
{
|
||||||
@ -478,12 +478,12 @@ static int platinum_var_to_par(struct fb_var_screeninfo *var,
|
|||||||
pinfo->yoffset = 0;
|
pinfo->yoffset = 0;
|
||||||
pinfo->vxres = pinfo->xres;
|
pinfo->vxres = pinfo->xres;
|
||||||
pinfo->vyres = pinfo->yres;
|
pinfo->vyres = pinfo->yres;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parse user specified options (`video=platinumfb:')
|
* Parse user specified options (`video=platinumfb:')
|
||||||
*/
|
*/
|
||||||
static int __init platinumfb_setup(char *options)
|
static int __init platinumfb_setup(char *options)
|
||||||
@ -624,7 +624,7 @@ static int platinumfb_probe(struct platform_device* odev)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
dev_set_drvdata(&odev->dev, info);
|
dev_set_drvdata(&odev->dev, info);
|
||||||
|
|
||||||
rc = platinum_init_fb(info);
|
rc = platinum_init_fb(info);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
iounmap(pinfo->frame_buffer);
|
iounmap(pinfo->frame_buffer);
|
||||||
@ -640,9 +640,9 @@ static void platinumfb_remove(struct platform_device* odev)
|
|||||||
{
|
{
|
||||||
struct fb_info *info = dev_get_drvdata(&odev->dev);
|
struct fb_info *info = dev_get_drvdata(&odev->dev);
|
||||||
struct fb_info_platinum *pinfo = info->par;
|
struct fb_info_platinum *pinfo = info->par;
|
||||||
|
|
||||||
unregister_framebuffer (info);
|
unregister_framebuffer (info);
|
||||||
|
|
||||||
/* Unmap frame buffer and registers */
|
/* Unmap frame buffer and registers */
|
||||||
iounmap(pinfo->frame_buffer);
|
iounmap(pinfo->frame_buffer);
|
||||||
iounmap(pinfo->platinum_regs);
|
iounmap(pinfo->platinum_regs);
|
||||||
@ -656,7 +656,7 @@ static void platinumfb_remove(struct platform_device* odev)
|
|||||||
framebuffer_release(info);
|
framebuffer_release(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct of_device_id platinumfb_match[] =
|
static struct of_device_id platinumfb_match[] =
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
.name = "platinum",
|
.name = "platinum",
|
||||||
@ -664,7 +664,7 @@ static struct of_device_id platinumfb_match[] =
|
|||||||
{},
|
{},
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct platform_driver platinum_driver =
|
static struct platform_driver platinum_driver =
|
||||||
{
|
{
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "platinumfb",
|
.name = "platinumfb",
|
||||||
|
@ -57,14 +57,14 @@
|
|||||||
* - Driver appears to be working for Brutus 320x200x8bpp mode. Other
|
* - Driver appears to be working for Brutus 320x200x8bpp mode. Other
|
||||||
* resolutions are working, but only the 8bpp mode is supported.
|
* resolutions are working, but only the 8bpp mode is supported.
|
||||||
* Changes need to be made to the palette encode and decode routines
|
* Changes need to be made to the palette encode and decode routines
|
||||||
* to support 4 and 16 bpp modes.
|
* to support 4 and 16 bpp modes.
|
||||||
* Driver is not designed to be a module. The FrameBuffer is statically
|
* Driver is not designed to be a module. The FrameBuffer is statically
|
||||||
* allocated since dynamic allocation of a 300k buffer cannot be
|
* allocated since dynamic allocation of a 300k buffer cannot be
|
||||||
* guaranteed.
|
* guaranteed.
|
||||||
*
|
*
|
||||||
* 1999/06/17:
|
* 1999/06/17:
|
||||||
* - FrameBuffer memory is now allocated at run-time when the
|
* - FrameBuffer memory is now allocated at run-time when the
|
||||||
* driver is initialized.
|
* driver is initialized.
|
||||||
*
|
*
|
||||||
* 2000/04/10: Nicolas Pitre <nico@fluxnic.net>
|
* 2000/04/10: Nicolas Pitre <nico@fluxnic.net>
|
||||||
* - Big cleanup for dynamic selection of machine type at run time.
|
* - Big cleanup for dynamic selection of machine type at run time.
|
||||||
@ -74,8 +74,8 @@
|
|||||||
*
|
*
|
||||||
* 2000/08/07: Tak-Shing Chan <tchan.rd@idthk.com>
|
* 2000/08/07: Tak-Shing Chan <tchan.rd@idthk.com>
|
||||||
* Jeff Sutherland <jsutherland@accelent.com>
|
* Jeff Sutherland <jsutherland@accelent.com>
|
||||||
* - Resolved an issue caused by a change made to the Assabet's PLD
|
* - Resolved an issue caused by a change made to the Assabet's PLD
|
||||||
* earlier this year which broke the framebuffer driver for newer
|
* earlier this year which broke the framebuffer driver for newer
|
||||||
* Phase 4 Assabets. Some other parameters were changed to optimize
|
* Phase 4 Assabets. Some other parameters were changed to optimize
|
||||||
* for the Sharp display.
|
* for the Sharp display.
|
||||||
*
|
*
|
||||||
@ -102,7 +102,7 @@
|
|||||||
* 2000/11/23: Eric Peng <ericpeng@coventive.com>
|
* 2000/11/23: Eric Peng <ericpeng@coventive.com>
|
||||||
* - Freebird add
|
* - Freebird add
|
||||||
*
|
*
|
||||||
* 2001/02/07: Jamey Hicks <jamey.hicks@compaq.com>
|
* 2001/02/07: Jamey Hicks <jamey.hicks@compaq.com>
|
||||||
* Cliff Brake <cbrake@accelent.com>
|
* Cliff Brake <cbrake@accelent.com>
|
||||||
* - Added PM callback
|
* - Added PM callback
|
||||||
*
|
*
|
||||||
@ -500,7 +500,7 @@ sa1100fb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
|
|||||||
* the shortest recovery time
|
* the shortest recovery time
|
||||||
* Suspend
|
* Suspend
|
||||||
* This refers to a level of power management in which substantial power
|
* This refers to a level of power management in which substantial power
|
||||||
* reduction is achieved by the display. The display can have a longer
|
* reduction is achieved by the display. The display can have a longer
|
||||||
* recovery time from this state than from the Stand-by state
|
* recovery time from this state than from the Stand-by state
|
||||||
* Off
|
* Off
|
||||||
* This indicates that the display is consuming the lowest level of power
|
* This indicates that the display is consuming the lowest level of power
|
||||||
@ -522,9 +522,9 @@ sa1100fb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
|
|||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* sa1100fb_blank():
|
* sa1100fb_blank():
|
||||||
* Blank the display by setting all palette values to zero. Note, the
|
* Blank the display by setting all palette values to zero. Note, the
|
||||||
* 12 and 16 bpp modes don't really use the palette, so this will not
|
* 12 and 16 bpp modes don't really use the palette, so this will not
|
||||||
* blank the display in all modes.
|
* blank the display in all modes.
|
||||||
*/
|
*/
|
||||||
static int sa1100fb_blank(int blank, struct fb_info *info)
|
static int sa1100fb_blank(int blank, struct fb_info *info)
|
||||||
{
|
{
|
||||||
@ -603,8 +603,8 @@ static inline unsigned int get_pcd(struct sa1100fb_info *fbi,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* sa1100fb_activate_var():
|
* sa1100fb_activate_var():
|
||||||
* Configures LCD Controller based on entries in var parameter. Settings are
|
* Configures LCD Controller based on entries in var parameter. Settings are
|
||||||
* only written to the controller if changes were made.
|
* only written to the controller if changes were made.
|
||||||
*/
|
*/
|
||||||
static int sa1100fb_activate_var(struct fb_var_screeninfo *var, struct sa1100fb_info *fbi)
|
static int sa1100fb_activate_var(struct fb_var_screeninfo *var, struct sa1100fb_info *fbi)
|
||||||
{
|
{
|
||||||
@ -747,7 +747,7 @@ static void sa1100fb_setup_gpio(struct sa1100fb_info *fbi)
|
|||||||
*
|
*
|
||||||
* SA1110 spec update nr. 25 says we can and should
|
* SA1110 spec update nr. 25 says we can and should
|
||||||
* clear LDD15 to 12 for 4 or 8bpp modes with active
|
* clear LDD15 to 12 for 4 or 8bpp modes with active
|
||||||
* panels.
|
* panels.
|
||||||
*/
|
*/
|
||||||
if ((fbi->reg_lccr0 & LCCR0_CMS) == LCCR0_Color &&
|
if ((fbi->reg_lccr0 & LCCR0_CMS) == LCCR0_Color &&
|
||||||
(fbi->reg_lccr0 & (LCCR0_Dual|LCCR0_Act)) != 0) {
|
(fbi->reg_lccr0 & (LCCR0_Dual|LCCR0_Act)) != 0) {
|
||||||
@ -1020,9 +1020,9 @@ static int sa1100fb_resume(struct platform_device *dev)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* sa1100fb_map_video_memory():
|
* sa1100fb_map_video_memory():
|
||||||
* Allocates the DRAM memory for the frame buffer. This buffer is
|
* Allocates the DRAM memory for the frame buffer. This buffer is
|
||||||
* remapped into a non-cached, non-buffered, memory region to
|
* remapped into a non-cached, non-buffered, memory region to
|
||||||
* allow palette and pixel writes to occur without flushing the
|
* allow palette and pixel writes to occur without flushing the
|
||||||
* cache. Once this area is remapped, all virtual memory
|
* cache. Once this area is remapped, all virtual memory
|
||||||
* access to the video memory should occur at the new region.
|
* access to the video memory should occur at the new region.
|
||||||
*/
|
*/
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
/*
|
/*
|
||||||
* linux/drivers/video/stifb.c -
|
* linux/drivers/video/stifb.c -
|
||||||
* Low level Frame buffer driver for HP workstations with
|
* Low level Frame buffer driver for HP workstations with
|
||||||
* STI (standard text interface) video firmware.
|
* STI (standard text interface) video firmware.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2001-2006 Helge Deller <deller@gmx.de>
|
* Copyright (C) 2001-2006 Helge Deller <deller@gmx.de>
|
||||||
* Portions Copyright (C) 2001 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
* Portions Copyright (C) 2001 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||||
*
|
*
|
||||||
* Based on:
|
* Based on:
|
||||||
* - linux/drivers/video/artistfb.c -- Artist frame buffer driver
|
* - linux/drivers/video/artistfb.c -- Artist frame buffer driver
|
||||||
* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
|
* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
|
||||||
@ -14,7 +14,7 @@
|
|||||||
* - HP Xhp cfb-based X11 window driver for XFree86
|
* - HP Xhp cfb-based X11 window driver for XFree86
|
||||||
* (c)Copyright 1992 Hewlett-Packard Co.
|
* (c)Copyright 1992 Hewlett-Packard Co.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* The following graphics display devices (NGLE family) are supported by this driver:
|
* The following graphics display devices (NGLE family) are supported by this driver:
|
||||||
*
|
*
|
||||||
* HPA4070A known as "HCRX", a 1280x1024 color device with 8 planes
|
* HPA4070A known as "HCRX", a 1280x1024 color device with 8 planes
|
||||||
@ -30,7 +30,7 @@
|
|||||||
* supports 1280x1024 color displays with 8 planes.
|
* supports 1280x1024 color displays with 8 planes.
|
||||||
* HP710G same as HP710C, 1280x1024 grayscale only
|
* HP710G same as HP710C, 1280x1024 grayscale only
|
||||||
* HP710L same as HP710C, 1024x768 color only
|
* HP710L same as HP710C, 1024x768 color only
|
||||||
* HP712 internal graphics support on HP9000s712 SPU, supports 640x480,
|
* HP712 internal graphics support on HP9000s712 SPU, supports 640x480,
|
||||||
* 1024x768 or 1280x1024 color displays on 8 planes (Artist)
|
* 1024x768 or 1280x1024 color displays on 8 planes (Artist)
|
||||||
*
|
*
|
||||||
* This file is subject to the terms and conditions of the GNU General Public
|
* This file is subject to the terms and conditions of the GNU General Public
|
||||||
@ -92,7 +92,7 @@ typedef struct {
|
|||||||
__s32 misc_video_end;
|
__s32 misc_video_end;
|
||||||
} video_setup_t;
|
} video_setup_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
__s16 sizeof_ngle_data;
|
__s16 sizeof_ngle_data;
|
||||||
__s16 x_size_visible; /* visible screen dim in pixels */
|
__s16 x_size_visible; /* visible screen dim in pixels */
|
||||||
__s16 y_size_visible;
|
__s16 y_size_visible;
|
||||||
@ -177,10 +177,10 @@ static int __initdata stifb_bpp_pref[MAX_STI_ROMS];
|
|||||||
#endif /* DEBUG_STIFB_REGS */
|
#endif /* DEBUG_STIFB_REGS */
|
||||||
|
|
||||||
|
|
||||||
#define ENABLE 1 /* for enabling/disabling screen */
|
#define ENABLE 1 /* for enabling/disabling screen */
|
||||||
#define DISABLE 0
|
#define DISABLE 0
|
||||||
|
|
||||||
#define NGLE_LOCK(fb_info) do { } while (0)
|
#define NGLE_LOCK(fb_info) do { } while (0)
|
||||||
#define NGLE_UNLOCK(fb_info) do { } while (0)
|
#define NGLE_UNLOCK(fb_info) do { } while (0)
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -198,9 +198,9 @@ SETUP_HW(struct stifb_info *fb)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
SETUP_FB(struct stifb_info *fb)
|
SETUP_FB(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
unsigned int reg10_value = 0;
|
unsigned int reg10_value = 0;
|
||||||
|
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
switch (fb->id)
|
switch (fb->id)
|
||||||
{
|
{
|
||||||
@ -210,15 +210,15 @@ SETUP_FB(struct stifb_info *fb)
|
|||||||
reg10_value = 0x13601000;
|
reg10_value = 0x13601000;
|
||||||
break;
|
break;
|
||||||
case S9000_ID_A1439A:
|
case S9000_ID_A1439A:
|
||||||
if (fb->info.var.bits_per_pixel == 32)
|
if (fb->info.var.bits_per_pixel == 32)
|
||||||
reg10_value = 0xBBA0A000;
|
reg10_value = 0xBBA0A000;
|
||||||
else
|
else
|
||||||
reg10_value = 0x13601000;
|
reg10_value = 0x13601000;
|
||||||
break;
|
break;
|
||||||
case S9000_ID_HCRX:
|
case S9000_ID_HCRX:
|
||||||
if (fb->info.var.bits_per_pixel == 32)
|
if (fb->info.var.bits_per_pixel == 32)
|
||||||
reg10_value = 0xBBA0A000;
|
reg10_value = 0xBBA0A000;
|
||||||
else
|
else
|
||||||
reg10_value = 0x13602000;
|
reg10_value = 0x13602000;
|
||||||
break;
|
break;
|
||||||
case S9000_ID_TIMBER:
|
case S9000_ID_TIMBER:
|
||||||
@ -243,7 +243,7 @@ START_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color)
|
WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color)
|
||||||
{
|
{
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
WRITE_WORD(((0x100+index)<<2), fb, REG_3);
|
WRITE_WORD(((0x100+index)<<2), fb, REG_3);
|
||||||
@ -251,30 +251,30 @@ WRITE_IMAGE_COLOR(struct stifb_info *fb, int index, int color)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb)
|
FINISH_IMAGE_COLORMAP_ACCESS(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
WRITE_WORD(0x400, fb, REG_2);
|
WRITE_WORD(0x400, fb, REG_2);
|
||||||
if (fb->info.var.bits_per_pixel == 32) {
|
if (fb->info.var.bits_per_pixel == 32) {
|
||||||
WRITE_WORD(0x83000100, fb, REG_1);
|
WRITE_WORD(0x83000100, fb, REG_1);
|
||||||
} else {
|
} else {
|
||||||
if (fb->id == S9000_ID_ARTIST || fb->id == CRT_ID_VISUALIZE_EG)
|
if (fb->id == S9000_ID_ARTIST || fb->id == CRT_ID_VISUALIZE_EG)
|
||||||
WRITE_WORD(0x80000100, fb, REG_26);
|
WRITE_WORD(0x80000100, fb, REG_26);
|
||||||
else
|
else
|
||||||
WRITE_WORD(0x80000100, fb, REG_1);
|
WRITE_WORD(0x80000100, fb, REG_1);
|
||||||
}
|
}
|
||||||
SETUP_FB(fb);
|
SETUP_FB(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SETUP_RAMDAC(struct stifb_info *fb)
|
SETUP_RAMDAC(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
WRITE_WORD(0x04000000, fb, 0x1020);
|
WRITE_WORD(0x04000000, fb, 0x1020);
|
||||||
WRITE_WORD(0xff000000, fb, 0x1028);
|
WRITE_WORD(0xff000000, fb, 0x1028);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CRX24_SETUP_RAMDAC(struct stifb_info *fb)
|
CRX24_SETUP_RAMDAC(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
WRITE_WORD(0x04000000, fb, 0x1000);
|
WRITE_WORD(0x04000000, fb, 0x1000);
|
||||||
@ -286,14 +286,14 @@ CRX24_SETUP_RAMDAC(struct stifb_info *fb)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static void
|
static void
|
||||||
HCRX_SETUP_RAMDAC(struct stifb_info *fb)
|
HCRX_SETUP_RAMDAC(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
WRITE_WORD(0xffffffff, fb, REG_32);
|
WRITE_WORD(0xffffffff, fb, REG_32);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CRX24_SET_OVLY_MASK(struct stifb_info *fb)
|
CRX24_SET_OVLY_MASK(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
@ -314,7 +314,7 @@ ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
|||||||
WRITE_WORD(value, fb, 0x1038);
|
WRITE_WORD(value, fb, 0x1038);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
||||||
{
|
{
|
||||||
unsigned int value = enable ? 0x10000000 : 0x30000000;
|
unsigned int value = enable ? 0x10000000 : 0x30000000;
|
||||||
@ -325,11 +325,11 @@ CRX24_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
||||||
{
|
{
|
||||||
u32 DregsMiscVideo = REG_21;
|
u32 DregsMiscVideo = REG_21;
|
||||||
u32 DregsMiscCtl = REG_27;
|
u32 DregsMiscCtl = REG_27;
|
||||||
|
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
if (enable) {
|
if (enable) {
|
||||||
WRITE_WORD(READ_WORD(fb, DregsMiscVideo) | 0x0A000000, fb, DregsMiscVideo);
|
WRITE_WORD(READ_WORD(fb, DregsMiscVideo) | 0x0A000000, fb, DregsMiscVideo);
|
||||||
@ -344,7 +344,7 @@ ARTIST_ENABLE_DISABLE_DISPLAY(struct stifb_info *fb, int enable)
|
|||||||
(READ_BYTE(fb, REG_16b3) - 1)
|
(READ_BYTE(fb, REG_16b3) - 1)
|
||||||
|
|
||||||
#define HYPER_CONFIG_PLANES_24 0x00000100
|
#define HYPER_CONFIG_PLANES_24 0x00000100
|
||||||
|
|
||||||
#define IS_24_DEVICE(fb) \
|
#define IS_24_DEVICE(fb) \
|
||||||
(fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24)
|
(fb->deviceSpecificConfig & HYPER_CONFIG_PLANES_24)
|
||||||
|
|
||||||
@ -470,15 +470,15 @@ SETUP_ATTR_ACCESS(struct stifb_info *fb, unsigned BufferNumber)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
SET_ATTR_SIZE(struct stifb_info *fb, int width, int height)
|
SET_ATTR_SIZE(struct stifb_info *fb, int width, int height)
|
||||||
{
|
{
|
||||||
/* REG_6 seems to have special values when run on a
|
/* REG_6 seems to have special values when run on a
|
||||||
RDI precisionbook parisc laptop (INTERNAL_EG_DX1024 or
|
RDI precisionbook parisc laptop (INTERNAL_EG_DX1024 or
|
||||||
INTERNAL_EG_X1024). The values are:
|
INTERNAL_EG_X1024). The values are:
|
||||||
0x2f0: internal (LCD) & external display enabled
|
0x2f0: internal (LCD) & external display enabled
|
||||||
0x2a0: external display only
|
0x2a0: external display only
|
||||||
0x000: zero on standard artist graphic cards
|
0x000: zero on standard artist graphic cards
|
||||||
*/
|
*/
|
||||||
WRITE_WORD(0x00000000, fb, REG_6);
|
WRITE_WORD(0x00000000, fb, REG_6);
|
||||||
WRITE_WORD((width<<16) | height, fb, REG_9);
|
WRITE_WORD((width<<16) | height, fb, REG_9);
|
||||||
WRITE_WORD(0x05000000, fb, REG_6);
|
WRITE_WORD(0x05000000, fb, REG_6);
|
||||||
@ -486,7 +486,7 @@ SET_ATTR_SIZE(struct stifb_info *fb, int width, int height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
FINISH_ATTR_ACCESS(struct stifb_info *fb)
|
FINISH_ATTR_ACCESS(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
SETUP_HW(fb);
|
SETUP_HW(fb);
|
||||||
WRITE_WORD(0x00000000, fb, REG_12);
|
WRITE_WORD(0x00000000, fb, REG_12);
|
||||||
@ -499,7 +499,7 @@ elkSetupPlanes(struct stifb_info *fb)
|
|||||||
SETUP_FB(fb);
|
SETUP_FB(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber)
|
ngleSetupAttrPlanes(struct stifb_info *fb, int BufferNumber)
|
||||||
{
|
{
|
||||||
SETUP_ATTR_ACCESS(fb, BufferNumber);
|
SETUP_ATTR_ACCESS(fb, BufferNumber);
|
||||||
@ -519,7 +519,7 @@ rattlerSetupPlanes(struct stifb_info *fb)
|
|||||||
* read mask register for overlay planes, not image planes).
|
* read mask register for overlay planes, not image planes).
|
||||||
*/
|
*/
|
||||||
CRX24_SETUP_RAMDAC(fb);
|
CRX24_SETUP_RAMDAC(fb);
|
||||||
|
|
||||||
/* change fb->id temporarily to fool SETUP_FB() */
|
/* change fb->id temporarily to fool SETUP_FB() */
|
||||||
saved_id = fb->id;
|
saved_id = fb->id;
|
||||||
fb->id = CRX24_OVERLAY_PLANES;
|
fb->id = CRX24_OVERLAY_PLANES;
|
||||||
@ -565,7 +565,7 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
|
|||||||
lutBltCtl.all = 0x80000000;
|
lutBltCtl.all = 0x80000000;
|
||||||
lutBltCtl.fields.length = length;
|
lutBltCtl.fields.length = length;
|
||||||
|
|
||||||
switch (fb->id)
|
switch (fb->id)
|
||||||
{
|
{
|
||||||
case S9000_ID_A1439A: /* CRX24 */
|
case S9000_ID_A1439A: /* CRX24 */
|
||||||
if (fb->var.bits_per_pixel == 8) {
|
if (fb->var.bits_per_pixel == 8) {
|
||||||
@ -576,12 +576,12 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
|
|||||||
lutBltCtl.fields.lutOffset = 0 * 256;
|
lutBltCtl.fields.lutOffset = 0 * 256;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case S9000_ID_ARTIST:
|
case S9000_ID_ARTIST:
|
||||||
lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE;
|
lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE;
|
||||||
lutBltCtl.fields.lutOffset = 0 * 256;
|
lutBltCtl.fields.lutOffset = 0 * 256;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE;
|
lutBltCtl.fields.lutType = NGLE_CMAP_INDEXED0_TYPE;
|
||||||
lutBltCtl.fields.lutOffset = 0;
|
lutBltCtl.fields.lutOffset = 0;
|
||||||
@ -596,7 +596,7 @@ setNgleLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static NgleLutBltCtl
|
static NgleLutBltCtl
|
||||||
setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
|
setHyperLutBltCtl(struct stifb_info *fb, int offsetWithinLut, int length)
|
||||||
{
|
{
|
||||||
NgleLutBltCtl lutBltCtl;
|
NgleLutBltCtl lutBltCtl;
|
||||||
|
|
||||||
@ -633,7 +633,7 @@ static void hyperUndoITE(struct stifb_info *fb)
|
|||||||
|
|
||||||
/* Hardware setup for full-depth write to "magic" location */
|
/* Hardware setup for full-depth write to "magic" location */
|
||||||
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7);
|
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7);
|
||||||
NGLE_QUICK_SET_DST_BM_ACCESS(fb,
|
NGLE_QUICK_SET_DST_BM_ACCESS(fb,
|
||||||
BA(IndexedDcd, Otc04, Ots08, AddrLong,
|
BA(IndexedDcd, Otc04, Ots08, AddrLong,
|
||||||
BAJustPoint(0), BINovly, BAIndexBase(0)));
|
BAJustPoint(0), BINovly, BAIndexBase(0)));
|
||||||
NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb,
|
NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb,
|
||||||
@ -653,13 +653,13 @@ static void hyperUndoITE(struct stifb_info *fb)
|
|||||||
NGLE_UNLOCK(fb);
|
NGLE_UNLOCK(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ngleDepth8_ClearImagePlanes(struct stifb_info *fb)
|
ngleDepth8_ClearImagePlanes(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
/* FIXME! */
|
/* FIXME! */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ngleDepth24_ClearImagePlanes(struct stifb_info *fb)
|
ngleDepth24_ClearImagePlanes(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
/* FIXME! */
|
/* FIXME! */
|
||||||
@ -675,7 +675,7 @@ ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg)
|
|||||||
NGLE_LOCK(fb);
|
NGLE_LOCK(fb);
|
||||||
|
|
||||||
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 4);
|
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 4);
|
||||||
NGLE_QUICK_SET_DST_BM_ACCESS(fb,
|
NGLE_QUICK_SET_DST_BM_ACCESS(fb,
|
||||||
BA(IndexedDcd, Otc32, OtsIndirect,
|
BA(IndexedDcd, Otc32, OtsIndirect,
|
||||||
AddrLong, BAJustPoint(0),
|
AddrLong, BAJustPoint(0),
|
||||||
BINattr, BAIndexBase(0)));
|
BINattr, BAIndexBase(0)));
|
||||||
@ -713,22 +713,22 @@ ngleResetAttrPlanes(struct stifb_info *fb, unsigned int ctlPlaneReg)
|
|||||||
/**** Finally, set the Control Plane Register back to zero: ****/
|
/**** Finally, set the Control Plane Register back to zero: ****/
|
||||||
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1);
|
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 1);
|
||||||
NGLE_QUICK_SET_CTL_PLN_REG(fb, 0);
|
NGLE_QUICK_SET_CTL_PLN_REG(fb, 0);
|
||||||
|
|
||||||
NGLE_UNLOCK(fb);
|
NGLE_UNLOCK(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data)
|
ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data)
|
||||||
{
|
{
|
||||||
int nFreeFifoSlots = 0;
|
int nFreeFifoSlots = 0;
|
||||||
u32 packed_dst;
|
u32 packed_dst;
|
||||||
u32 packed_len;
|
u32 packed_len;
|
||||||
|
|
||||||
NGLE_LOCK(fb);
|
NGLE_LOCK(fb);
|
||||||
|
|
||||||
/* Hardware setup */
|
/* Hardware setup */
|
||||||
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 8);
|
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 8);
|
||||||
NGLE_QUICK_SET_DST_BM_ACCESS(fb,
|
NGLE_QUICK_SET_DST_BM_ACCESS(fb,
|
||||||
BA(IndexedDcd, Otc04, Ots08, AddrLong,
|
BA(IndexedDcd, Otc04, Ots08, AddrLong,
|
||||||
BAJustPoint(0), BINovly, BAIndexBase(0)));
|
BAJustPoint(0), BINovly, BAIndexBase(0)));
|
||||||
|
|
||||||
@ -736,23 +736,23 @@ ngleClearOverlayPlanes(struct stifb_info *fb, int mask, int data)
|
|||||||
|
|
||||||
NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, data);
|
NGLE_REALLY_SET_IMAGE_FG_COLOR(fb, data);
|
||||||
NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, mask);
|
NGLE_REALLY_SET_IMAGE_PLANEMASK(fb, mask);
|
||||||
|
|
||||||
packed_dst = 0;
|
packed_dst = 0;
|
||||||
packed_len = (fb->info.var.xres << 16) | fb->info.var.yres;
|
packed_len = (fb->info.var.xres << 16) | fb->info.var.yres;
|
||||||
NGLE_SET_DSTXY(fb, packed_dst);
|
NGLE_SET_DSTXY(fb, packed_dst);
|
||||||
|
|
||||||
/* Write zeroes to overlay planes */
|
/* Write zeroes to overlay planes */
|
||||||
NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb,
|
NGLE_QUICK_SET_IMAGE_BITMAP_OP(fb,
|
||||||
IBOvals(RopSrc, MaskAddrOffset(0),
|
IBOvals(RopSrc, MaskAddrOffset(0),
|
||||||
BitmapExtent08, StaticReg(0),
|
BitmapExtent08, StaticReg(0),
|
||||||
DataDynamic, MaskOtc, BGx(0), FGx(0)));
|
DataDynamic, MaskOtc, BGx(0), FGx(0)));
|
||||||
|
|
||||||
SET_LENXY_START_RECFILL(fb, packed_len);
|
SET_LENXY_START_RECFILL(fb, packed_len);
|
||||||
|
|
||||||
NGLE_UNLOCK(fb);
|
NGLE_UNLOCK(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
hyperResetPlanes(struct stifb_info *fb, int enable)
|
hyperResetPlanes(struct stifb_info *fb, int enable)
|
||||||
{
|
{
|
||||||
unsigned int controlPlaneReg;
|
unsigned int controlPlaneReg;
|
||||||
@ -783,7 +783,7 @@ hyperResetPlanes(struct stifb_info *fb, int enable)
|
|||||||
ngleClearOverlayPlanes(fb, 0xff, 255);
|
ngleClearOverlayPlanes(fb, 0xff, 255);
|
||||||
|
|
||||||
/**************************************************
|
/**************************************************
|
||||||
** Also need to counteract ITE settings
|
** Also need to counteract ITE settings
|
||||||
**************************************************/
|
**************************************************/
|
||||||
hyperUndoITE(fb);
|
hyperUndoITE(fb);
|
||||||
break;
|
break;
|
||||||
@ -803,13 +803,13 @@ hyperResetPlanes(struct stifb_info *fb, int enable)
|
|||||||
ngleResetAttrPlanes(fb, controlPlaneReg);
|
ngleResetAttrPlanes(fb, controlPlaneReg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
NGLE_UNLOCK(fb);
|
NGLE_UNLOCK(fb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Return pointer to in-memory structure holding ELK device-dependent ROM values. */
|
/* Return pointer to in-memory structure holding ELK device-dependent ROM values. */
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ngleGetDeviceRomData(struct stifb_info *fb)
|
ngleGetDeviceRomData(struct stifb_info *fb)
|
||||||
{
|
{
|
||||||
#if 0
|
#if 0
|
||||||
@ -821,7 +821,7 @@ XXX: FIXME: !!!
|
|||||||
char *pCard8;
|
char *pCard8;
|
||||||
int i;
|
int i;
|
||||||
char *mapOrigin = NULL;
|
char *mapOrigin = NULL;
|
||||||
|
|
||||||
int romTableIdx;
|
int romTableIdx;
|
||||||
|
|
||||||
pPackedDevRomData = fb->ngle_rom;
|
pPackedDevRomData = fb->ngle_rom;
|
||||||
@ -888,7 +888,7 @@ SETUP_HCRX(struct stifb_info *fb)
|
|||||||
|
|
||||||
/* Initialize Hyperbowl registers */
|
/* Initialize Hyperbowl registers */
|
||||||
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7);
|
GET_FIFO_SLOTS(fb, nFreeFifoSlots, 7);
|
||||||
|
|
||||||
if (IS_24_DEVICE(fb)) {
|
if (IS_24_DEVICE(fb)) {
|
||||||
hyperbowl = (fb->info.var.bits_per_pixel == 32) ?
|
hyperbowl = (fb->info.var.bits_per_pixel == 32) ?
|
||||||
HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE :
|
HYPERBOWL_MODE01_8_24_LUT0_TRANSPARENT_LUT1_OPAQUE :
|
||||||
@ -897,9 +897,9 @@ SETUP_HCRX(struct stifb_info *fb)
|
|||||||
/* First write to Hyperbowl must happen twice (bug) */
|
/* First write to Hyperbowl must happen twice (bug) */
|
||||||
WRITE_WORD(hyperbowl, fb, REG_40);
|
WRITE_WORD(hyperbowl, fb, REG_40);
|
||||||
WRITE_WORD(hyperbowl, fb, REG_40);
|
WRITE_WORD(hyperbowl, fb, REG_40);
|
||||||
|
|
||||||
WRITE_WORD(HYPERBOWL_MODE2_8_24, fb, REG_39);
|
WRITE_WORD(HYPERBOWL_MODE2_8_24, fb, REG_39);
|
||||||
|
|
||||||
WRITE_WORD(0x014c0148, fb, REG_42); /* Set lut 0 to be the direct color */
|
WRITE_WORD(0x014c0148, fb, REG_42); /* Set lut 0 to be the direct color */
|
||||||
WRITE_WORD(0x404c4048, fb, REG_43);
|
WRITE_WORD(0x404c4048, fb, REG_43);
|
||||||
WRITE_WORD(0x034c0348, fb, REG_44);
|
WRITE_WORD(0x034c0348, fb, REG_44);
|
||||||
@ -990,7 +990,7 @@ stifb_setcolreg(u_int regno, u_int red, u_int green,
|
|||||||
0, /* Offset w/i LUT */
|
0, /* Offset w/i LUT */
|
||||||
256); /* Load entire LUT */
|
256); /* Load entire LUT */
|
||||||
NGLE_BINC_SET_SRCADDR(fb,
|
NGLE_BINC_SET_SRCADDR(fb,
|
||||||
NGLE_LONG_FB_ADDRESS(0, 0x100, 0));
|
NGLE_LONG_FB_ADDRESS(0, 0x100, 0));
|
||||||
/* 0x100 is same as used in WRITE_IMAGE_COLOR() */
|
/* 0x100 is same as used in WRITE_IMAGE_COLOR() */
|
||||||
START_COLORMAPLOAD(fb, lutBltCtl.all);
|
START_COLORMAPLOAD(fb, lutBltCtl.all);
|
||||||
SETUP_FB(fb);
|
SETUP_FB(fb);
|
||||||
@ -1028,7 +1028,7 @@ stifb_blank(int blank_mode, struct fb_info *info)
|
|||||||
ENABLE_DISABLE_DISPLAY(fb, enable);
|
ENABLE_DISABLE_DISPLAY(fb, enable);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SETUP_FB(fb);
|
SETUP_FB(fb);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1114,15 +1114,15 @@ stifb_init_display(struct stifb_info *fb)
|
|||||||
|
|
||||||
/* HCRX specific initialization */
|
/* HCRX specific initialization */
|
||||||
SETUP_HCRX(fb);
|
SETUP_HCRX(fb);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (id == S9000_ID_HCRX)
|
if (id == S9000_ID_HCRX)
|
||||||
hyperInitSprite(fb);
|
hyperInitSprite(fb);
|
||||||
else
|
else
|
||||||
ngleInitSprite(fb);
|
ngleInitSprite(fb);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Initialize the image planes. */
|
/* Initialize the image planes. */
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case S9000_ID_HCRX:
|
case S9000_ID_HCRX:
|
||||||
hyperResetPlanes(fb, ENABLE);
|
hyperResetPlanes(fb, ENABLE);
|
||||||
@ -1194,7 +1194,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
|
fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
|
||||||
if (!fb)
|
if (!fb)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
info = &fb->info;
|
info = &fb->info;
|
||||||
|
|
||||||
/* set struct to a known state */
|
/* set struct to a known state */
|
||||||
@ -1235,7 +1235,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
dev_name, fb->id);
|
dev_name, fb->id);
|
||||||
goto out_err0;
|
goto out_err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* default to 8 bpp on most graphic chips */
|
/* default to 8 bpp on most graphic chips */
|
||||||
bpp = 8;
|
bpp = 8;
|
||||||
xres = sti_onscreen_x(fb->sti);
|
xres = sti_onscreen_x(fb->sti);
|
||||||
@ -1256,7 +1256,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
fb->id = S9000_ID_A1659A;
|
fb->id = S9000_ID_A1659A;
|
||||||
break;
|
break;
|
||||||
case S9000_ID_TIMBER: /* HP9000/710 Any (may be a grayscale device) */
|
case S9000_ID_TIMBER: /* HP9000/710 Any (may be a grayscale device) */
|
||||||
if (strstr(dev_name, "GRAYSCALE") ||
|
if (strstr(dev_name, "GRAYSCALE") ||
|
||||||
strstr(dev_name, "Grayscale") ||
|
strstr(dev_name, "Grayscale") ||
|
||||||
strstr(dev_name, "grayscale"))
|
strstr(dev_name, "grayscale"))
|
||||||
var->grayscale = 1;
|
var->grayscale = 1;
|
||||||
@ -1295,16 +1295,16 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
case CRT_ID_VISUALIZE_EG:
|
case CRT_ID_VISUALIZE_EG:
|
||||||
case S9000_ID_ARTIST: /* Artist */
|
case S9000_ID_ARTIST: /* Artist */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#ifdef FALLBACK_TO_1BPP
|
#ifdef FALLBACK_TO_1BPP
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"stifb: Unsupported graphics card (id=0x%08x) "
|
"stifb: Unsupported graphics card (id=0x%08x) "
|
||||||
"- now trying 1bpp mode instead\n",
|
"- now trying 1bpp mode instead\n",
|
||||||
fb->id);
|
fb->id);
|
||||||
bpp = 1; /* default to 1 bpp */
|
bpp = 1; /* default to 1 bpp */
|
||||||
break;
|
break;
|
||||||
#else
|
#else
|
||||||
printk(KERN_WARNING
|
printk(KERN_WARNING
|
||||||
"stifb: Unsupported graphics card (id=0x%08x) "
|
"stifb: Unsupported graphics card (id=0x%08x) "
|
||||||
"- skipping.\n",
|
"- skipping.\n",
|
||||||
fb->id);
|
fb->id);
|
||||||
@ -1320,11 +1320,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8;
|
fix->line_length = (fb->sti->glob_cfg->total_x * bpp) / 8;
|
||||||
if (!fix->line_length)
|
if (!fix->line_length)
|
||||||
fix->line_length = 2048; /* default */
|
fix->line_length = 2048; /* default */
|
||||||
|
|
||||||
/* limit fbsize to max visible screen size */
|
/* limit fbsize to max visible screen size */
|
||||||
if (fix->smem_len > yres*fix->line_length)
|
if (fix->smem_len > yres*fix->line_length)
|
||||||
fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024);
|
fix->smem_len = ALIGN(yres*fix->line_length, 4*1024*1024);
|
||||||
|
|
||||||
fix->accel = FB_ACCEL_NONE;
|
fix->accel = FB_ACCEL_NONE;
|
||||||
|
|
||||||
switch (bpp) {
|
switch (bpp) {
|
||||||
@ -1350,7 +1350,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var->xres = var->xres_virtual = xres;
|
var->xres = var->xres_virtual = xres;
|
||||||
var->yres = var->yres_virtual = yres;
|
var->yres = var->yres_virtual = yres;
|
||||||
var->bits_per_pixel = bpp;
|
var->bits_per_pixel = bpp;
|
||||||
@ -1379,7 +1379,7 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
fix->smem_start, fix->smem_start+fix->smem_len);
|
fix->smem_start, fix->smem_start+fix->smem_len);
|
||||||
goto out_err2;
|
goto out_err2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!request_mem_region(fix->mmio_start, fix->mmio_len, "stifb mmio")) {
|
if (!request_mem_region(fix->mmio_start, fix->mmio_len, "stifb mmio")) {
|
||||||
printk(KERN_ERR "stifb: cannot reserve sti mmio region 0x%04lx-0x%04lx\n",
|
printk(KERN_ERR "stifb: cannot reserve sti mmio region 0x%04lx-0x%04lx\n",
|
||||||
fix->mmio_start, fix->mmio_start+fix->mmio_len);
|
fix->mmio_start, fix->mmio_start+fix->mmio_len);
|
||||||
@ -1393,11 +1393,11 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
|
|||||||
|
|
||||||
fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n",
|
fb_info(&fb->info, "%s %dx%d-%d frame buffer device, %s, id: %04x, mmio: 0x%04lx\n",
|
||||||
fix->id,
|
fix->id,
|
||||||
var->xres,
|
var->xres,
|
||||||
var->yres,
|
var->yres,
|
||||||
var->bits_per_pixel,
|
var->bits_per_pixel,
|
||||||
dev_name,
|
dev_name,
|
||||||
fb->id,
|
fb->id,
|
||||||
fix->mmio_start);
|
fix->mmio_start);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1413,6 +1413,7 @@ out_err1:
|
|||||||
iounmap(info->screen_base);
|
iounmap(info->screen_base);
|
||||||
out_err0:
|
out_err0:
|
||||||
kfree(fb);
|
kfree(fb);
|
||||||
|
sti->info = NULL;
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1426,7 +1427,7 @@ static int __init stifb_init(void)
|
|||||||
struct sti_struct *sti;
|
struct sti_struct *sti;
|
||||||
struct sti_struct *def_sti;
|
struct sti_struct *def_sti;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
char *option = NULL;
|
char *option = NULL;
|
||||||
|
|
||||||
@ -1438,7 +1439,7 @@ static int __init stifb_init(void)
|
|||||||
printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n");
|
printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n");
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
def_sti = sti_get_rom(0);
|
def_sti = sti_get_rom(0);
|
||||||
if (def_sti) {
|
if (def_sti) {
|
||||||
for (i = 1; i <= MAX_STI_ROMS; i++) {
|
for (i = 1; i <= MAX_STI_ROMS; i++) {
|
||||||
@ -1472,7 +1473,7 @@ stifb_cleanup(void)
|
|||||||
{
|
{
|
||||||
struct sti_struct *sti;
|
struct sti_struct *sti;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 1; i <= MAX_STI_ROMS; i++) {
|
for (i = 1; i <= MAX_STI_ROMS; i++) {
|
||||||
sti = sti_get_rom(i);
|
sti = sti_get_rom(i);
|
||||||
if (!sti)
|
if (!sti)
|
||||||
@ -1495,10 +1496,10 @@ int __init
|
|||||||
stifb_setup(char *options)
|
stifb_setup(char *options)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (!options || !*options)
|
if (!options || !*options)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
if (strncmp(options, "off", 3) == 0) {
|
if (strncmp(options, "off", 3) == 0) {
|
||||||
stifb_disabled = 1;
|
stifb_disabled = 1;
|
||||||
options += 3;
|
options += 3;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* valkyriefb.c -- frame buffer device for the PowerMac 'valkyrie' display
|
* valkyriefb.c -- frame buffer device for the PowerMac 'valkyrie' display
|
||||||
*
|
*
|
||||||
* Created 8 August 1998 by
|
* Created 8 August 1998 by
|
||||||
* Martin Costabel <costabel@wanadoo.fr> and Kevin Schoedel
|
* Martin Costabel <costabel@wanadoo.fr> and Kevin Schoedel
|
||||||
*
|
*
|
||||||
* Vmode-switching changes and vmode 15/17 modifications created 29 August
|
* Vmode-switching changes and vmode 15/17 modifications created 29 August
|
||||||
@ -77,13 +77,13 @@ struct fb_info_valkyrie {
|
|||||||
struct fb_par_valkyrie par;
|
struct fb_par_valkyrie par;
|
||||||
struct cmap_regs __iomem *cmap_regs;
|
struct cmap_regs __iomem *cmap_regs;
|
||||||
unsigned long cmap_regs_phys;
|
unsigned long cmap_regs_phys;
|
||||||
|
|
||||||
struct valkyrie_regs __iomem *valkyrie_regs;
|
struct valkyrie_regs __iomem *valkyrie_regs;
|
||||||
unsigned long valkyrie_regs_phys;
|
unsigned long valkyrie_regs_phys;
|
||||||
|
|
||||||
__u8 __iomem *frame_buffer;
|
__u8 __iomem *frame_buffer;
|
||||||
unsigned long frame_buffer_phys;
|
unsigned long frame_buffer_phys;
|
||||||
|
|
||||||
int sense;
|
int sense;
|
||||||
unsigned long total_vram;
|
unsigned long total_vram;
|
||||||
|
|
||||||
@ -244,7 +244,7 @@ static inline int valkyrie_vram_reqd(int video_mode, int color_mode)
|
|||||||
{
|
{
|
||||||
int pitch;
|
int pitch;
|
||||||
struct valkyrie_regvals *init = valkyrie_reg_init[video_mode-1];
|
struct valkyrie_regvals *init = valkyrie_reg_init[video_mode-1];
|
||||||
|
|
||||||
if ((pitch = init->pitch[color_mode]) == 0)
|
if ((pitch = init->pitch[color_mode]) == 0)
|
||||||
pitch = 2 * init->pitch[0];
|
pitch = 2 * init->pitch[0];
|
||||||
return init->vres * pitch;
|
return init->vres * pitch;
|
||||||
@ -467,7 +467,7 @@ static int valkyrie_var_to_par(struct fb_var_screeninfo *var,
|
|||||||
printk(KERN_ERR "valkyriefb: vmode %d not valid.\n", vmode);
|
printk(KERN_ERR "valkyriefb: vmode %d not valid.\n", vmode);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmode != CMODE_8 && cmode != CMODE_16) {
|
if (cmode != CMODE_8 && cmode != CMODE_16) {
|
||||||
printk(KERN_ERR "valkyriefb: cmode %d not valid.\n", cmode);
|
printk(KERN_ERR "valkyriefb: cmode %d not valid.\n", cmode);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
@ -516,7 +516,7 @@ static void valkyrie_init_fix(struct fb_fix_screeninfo *fix, struct fb_info_valk
|
|||||||
fix->ywrapstep = 0;
|
fix->ywrapstep = 0;
|
||||||
fix->ypanstep = 0;
|
fix->ypanstep = 0;
|
||||||
fix->xpanstep = 0;
|
fix->xpanstep = 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fix must already be inited above */
|
/* Fix must already be inited above */
|
||||||
|
@ -111,7 +111,7 @@ static u_long get_line_length(int xres_virtual, int bpp)
|
|||||||
* First part, xxxfb_check_var, must not write anything
|
* First part, xxxfb_check_var, must not write anything
|
||||||
* to hardware, it should only verify and adjust var.
|
* to hardware, it should only verify and adjust var.
|
||||||
* This means it doesn't alter par but it does use hardware
|
* This means it doesn't alter par but it does use hardware
|
||||||
* data from it to check this var.
|
* data from it to check this var.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int vfb_check_var(struct fb_var_screeninfo *var,
|
static int vfb_check_var(struct fb_var_screeninfo *var,
|
||||||
@ -169,7 +169,7 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Now that we checked it we alter var. The reason being is that the video
|
* Now that we checked it we alter var. The reason being is that the video
|
||||||
* mode passed in might not work but slight changes to it might make it
|
* mode passed in might not work but slight changes to it might make it
|
||||||
* work. This way we let the user know what is acceptable.
|
* work. This way we let the user know what is acceptable.
|
||||||
*/
|
*/
|
||||||
switch (var->bits_per_pixel) {
|
switch (var->bits_per_pixel) {
|
||||||
@ -235,8 +235,8 @@ static int vfb_check_var(struct fb_var_screeninfo *var,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* This routine actually sets the video mode. It's in here where we
|
/* This routine actually sets the video mode. It's in here where we
|
||||||
* the hardware state info->par and fix which can be affected by the
|
* the hardware state info->par and fix which can be affected by the
|
||||||
* change in par. For this driver it doesn't do much.
|
* change in par. For this driver it doesn't do much.
|
||||||
*/
|
*/
|
||||||
static int vfb_set_par(struct fb_info *info)
|
static int vfb_set_par(struct fb_info *info)
|
||||||
{
|
{
|
||||||
@ -379,7 +379,7 @@ static int vfb_pan_display(struct fb_var_screeninfo *var,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Most drivers don't need their own mmap function
|
* Most drivers don't need their own mmap function
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int vfb_mmap(struct fb_info *info,
|
static int vfb_mmap(struct fb_info *info,
|
||||||
|
Loading…
Reference in New Issue
Block a user