Merge branch 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6
* 'fbdev-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6: sisfb: delete osdef.h sisfb: move the CONFIG warning to sis_main.c sisfb: replace SiS_SetMemory with memset_io sisfb: remove InPort/OutPort wrappers sisfb: use CONFIG_FB_SIS_301/315 instead of SIS301/315H sisfb: delete redudant #define SIS_LINUX_KERNEL sisfb: delete dead SIS_XORG_XF86 code sisfb: delete fallback code for pci_map_rom() sisfb: delete obsolete PCI ROM bug workaround fbdev: Update documentation index file. lxfb: Program panel v/h sync output polarity correctly fbcmap: integer overflow bug fbcmap: cleanup white space in fb_alloc_cmap() MAINTAINERS: Add fbdev patchwork entry, tidy up file patterns. fbdev: da8xx: punt duplicated FBIO_WAITFORVSYNC define fbdev: sh_mobile_lcdcfb: fix bug in reconfig()
This commit is contained in:
commit
e5fa506173
|
@ -4,33 +4,41 @@ please mail me.
|
|||
Geert Uytterhoeven <geert@linux-m68k.org>
|
||||
|
||||
00-INDEX
|
||||
- this file
|
||||
- this file.
|
||||
arkfb.txt
|
||||
- info on the fbdev driver for ARK Logic chips.
|
||||
aty128fb.txt
|
||||
- info on the ATI Rage128 frame buffer driver.
|
||||
cirrusfb.txt
|
||||
- info on the driver for Cirrus Logic chipsets.
|
||||
cmap_xfbdev.txt
|
||||
- an introduction to fbdev's cmap structures.
|
||||
deferred_io.txt
|
||||
- an introduction to deferred IO.
|
||||
efifb.txt
|
||||
- info on the EFI platform driver for Intel based Apple computers.
|
||||
ep93xx-fb.txt
|
||||
- info on the driver for EP93xx LCD controller.
|
||||
fbcon.txt
|
||||
- intro to and usage guide for the framebuffer console (fbcon).
|
||||
framebuffer.txt
|
||||
- introduction to frame buffer devices.
|
||||
imacfb.txt
|
||||
- info on the generic EFI platform driver for Intel based Macs.
|
||||
gxfb.txt
|
||||
- info on the framebuffer driver for AMD Geode GX2 based processors.
|
||||
intel810.txt
|
||||
- documentation for the Intel 810/815 framebuffer driver.
|
||||
intelfb.txt
|
||||
- docs for Intel 830M/845G/852GM/855GM/865G/915G/945G fb driver.
|
||||
internals.txt
|
||||
- quick overview of frame buffer device internals.
|
||||
lxfb.txt
|
||||
- info on the framebuffer driver for AMD Geode LX based processors.
|
||||
matroxfb.txt
|
||||
- info on the Matrox framebuffer driver for Alpha, Intel and PPC.
|
||||
metronomefb.txt
|
||||
- info on the driver for the Metronome display controller.
|
||||
modedb.txt
|
||||
- info on the video mode database.
|
||||
matroxfb.txt
|
||||
- info on the Matrox frame buffer driver.
|
||||
pvr2fb.txt
|
||||
- info on the PowerVR 2 frame buffer driver.
|
||||
pxafb.txt
|
||||
|
@ -39,13 +47,23 @@ s3fb.txt
|
|||
- info on the fbdev driver for S3 Trio/Virge chips.
|
||||
sa1100fb.txt
|
||||
- information about the driver for the SA-1100 LCD controller.
|
||||
sh7760fb.txt
|
||||
- info on the SH7760/SH7763 integrated LCDC Framebuffer driver.
|
||||
sisfb.txt
|
||||
- info on the framebuffer device driver for various SiS chips.
|
||||
sstfb.txt
|
||||
- info on the frame buffer driver for 3dfx' Voodoo Graphics boards.
|
||||
tgafb.txt
|
||||
- info on the TGA (DECChip 21030) frame buffer driver
|
||||
- info on the TGA (DECChip 21030) frame buffer driver.
|
||||
tridentfb.txt
|
||||
info on the framebuffer driver for some Trident chip based cards.
|
||||
uvesafb.txt
|
||||
- info on the userspace VESA (VBE2+ compliant) frame buffer device.
|
||||
vesafb.txt
|
||||
- info on the VESA frame buffer device
|
||||
- info on the VESA frame buffer device.
|
||||
viafb.modes
|
||||
- list of modes for VIA Integration Graphic Chip.
|
||||
viafb.txt
|
||||
- info on the VIA Integration Graphic Chip console framebuffer driver.
|
||||
vt8623fb.txt
|
||||
- info on the fb driver for the graphics core in VIA VT8623 chipsets.
|
||||
|
|
|
@ -2444,10 +2444,12 @@ F: drivers/net/wan/sdla.c
|
|||
FRAMEBUFFER LAYER
|
||||
L: linux-fbdev@vger.kernel.org
|
||||
W: http://linux-fbdev.sourceforge.net/
|
||||
Q: http://patchwork.kernel.org/project/linux-fbdev/list/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/lethal/fbdev-2.6.git
|
||||
S: Orphan
|
||||
F: Documentation/fb/
|
||||
F: drivers/video/fb*
|
||||
F: drivers/video/
|
||||
F: include/video/
|
||||
F: include/linux/fb.h
|
||||
|
||||
FREESCALE DMA DRIVER
|
||||
|
|
|
@ -88,34 +88,48 @@ static const struct fb_cmap default_16_colors = {
|
|||
*
|
||||
*/
|
||||
|
||||
int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
|
||||
int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags)
|
||||
{
|
||||
int size = len*sizeof(u16);
|
||||
int size = len * sizeof(u16);
|
||||
int ret = -ENOMEM;
|
||||
|
||||
if (cmap->len != len) {
|
||||
fb_dealloc_cmap(cmap);
|
||||
if (!len)
|
||||
return 0;
|
||||
if (!(cmap->red = kmalloc(size, GFP_ATOMIC)))
|
||||
goto fail;
|
||||
if (!(cmap->green = kmalloc(size, GFP_ATOMIC)))
|
||||
goto fail;
|
||||
if (!(cmap->blue = kmalloc(size, GFP_ATOMIC)))
|
||||
goto fail;
|
||||
if (transp) {
|
||||
if (!(cmap->transp = kmalloc(size, GFP_ATOMIC)))
|
||||
if (cmap->len != len) {
|
||||
fb_dealloc_cmap(cmap);
|
||||
if (!len)
|
||||
return 0;
|
||||
|
||||
cmap->red = kmalloc(size, flags);
|
||||
if (!cmap->red)
|
||||
goto fail;
|
||||
cmap->green = kmalloc(size, flags);
|
||||
if (!cmap->green)
|
||||
goto fail;
|
||||
cmap->blue = kmalloc(size, flags);
|
||||
if (!cmap->blue)
|
||||
goto fail;
|
||||
if (transp) {
|
||||
cmap->transp = kmalloc(size, flags);
|
||||
if (!cmap->transp)
|
||||
goto fail;
|
||||
} else {
|
||||
cmap->transp = NULL;
|
||||
}
|
||||
}
|
||||
cmap->start = 0;
|
||||
cmap->len = len;
|
||||
ret = fb_copy_cmap(fb_default_cmap(len), cmap);
|
||||
if (ret)
|
||||
goto fail;
|
||||
} else
|
||||
cmap->transp = NULL;
|
||||
}
|
||||
cmap->start = 0;
|
||||
cmap->len = len;
|
||||
fb_copy_cmap(fb_default_cmap(len), cmap);
|
||||
return 0;
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
fb_dealloc_cmap(cmap);
|
||||
return -ENOMEM;
|
||||
fb_dealloc_cmap(cmap);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp)
|
||||
{
|
||||
return fb_alloc_cmap_gfp(cmap, len, transp, GFP_ATOMIC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -250,8 +264,12 @@ int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *info)
|
|||
int rc, size = cmap->len * sizeof(u16);
|
||||
struct fb_cmap umap;
|
||||
|
||||
if (size < 0 || size < cmap->len)
|
||||
return -E2BIG;
|
||||
|
||||
memset(&umap, 0, sizeof(struct fb_cmap));
|
||||
rc = fb_alloc_cmap(&umap, cmap->len, cmap->transp != NULL);
|
||||
rc = fb_alloc_cmap_gfp(&umap, cmap->len, cmap->transp != NULL,
|
||||
GFP_KERNEL);
|
||||
if (rc)
|
||||
return rc;
|
||||
if (copy_from_user(umap.red, cmap->red, size) ||
|
||||
|
|
|
@ -276,10 +276,10 @@ static void lx_graphics_enable(struct fb_info *info)
|
|||
write_fp(par, FP_PT1, 0);
|
||||
temp = FP_PT2_SCRC;
|
||||
|
||||
if (info->var.sync & FB_SYNC_HOR_HIGH_ACT)
|
||||
if (!(info->var.sync & FB_SYNC_HOR_HIGH_ACT))
|
||||
temp |= FP_PT2_HSP;
|
||||
|
||||
if (info->var.sync & FB_SYNC_VERT_HIGH_ACT)
|
||||
if (!(info->var.sync & FB_SYNC_VERT_HIGH_ACT))
|
||||
temp |= FP_PT2_VSP;
|
||||
|
||||
write_fp(par, FP_PT2, temp);
|
||||
|
|
|
@ -860,7 +860,7 @@ static void sh_mobile_fb_reconfig(struct fb_info *info)
|
|||
/* Couldn't reconfigure, hopefully, can continue as before */
|
||||
return;
|
||||
|
||||
info->fix.line_length = mode2.xres * (ch->cfg.bpp / 8);
|
||||
info->fix.line_length = mode1.xres * (ch->cfg.bpp / 8);
|
||||
|
||||
/*
|
||||
* fb_set_var() calls the notifier change internally, only if
|
||||
|
@ -868,7 +868,7 @@ static void sh_mobile_fb_reconfig(struct fb_info *info)
|
|||
* user event, we have to call the chain ourselves.
|
||||
*/
|
||||
event.info = info;
|
||||
event.data = &mode2;
|
||||
event.data = &mode1;
|
||||
fb_notifier_call_chain(evnt, &event);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,21 +53,8 @@
|
|||
#ifndef _INIT_H_
|
||||
#define _INIT_H_
|
||||
|
||||
#include "osdef.h"
|
||||
#include "initdef.h"
|
||||
|
||||
#ifdef SIS_XORG_XF86
|
||||
#include "sis.h"
|
||||
#define SIS_NEED_inSISREG
|
||||
#define SIS_NEED_inSISREGW
|
||||
#define SIS_NEED_inSISREGL
|
||||
#define SIS_NEED_outSISREG
|
||||
#define SIS_NEED_outSISREGW
|
||||
#define SIS_NEED_outSISREGL
|
||||
#include "sis_regs.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#include "vgatypes.h"
|
||||
#include "vstruct.h"
|
||||
#ifdef SIS_CP
|
||||
|
@ -78,7 +65,6 @@
|
|||
#include <linux/fb.h>
|
||||
#include "sis.h"
|
||||
#include <video/sisfb.h>
|
||||
#endif
|
||||
|
||||
/* Mode numbers */
|
||||
static const unsigned short ModeIndex_320x200[] = {0x59, 0x41, 0x00, 0x4f};
|
||||
|
@ -286,7 +272,7 @@ static const struct SiS_ModeResInfo_S SiS_ModeResInfo[] =
|
|||
{ 1280, 854, 8,16} /* 0x22 */
|
||||
};
|
||||
|
||||
#if defined(SIS300) || defined(SIS315H)
|
||||
#if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
|
||||
static const struct SiS_StandTable_S SiS_StandTable[]=
|
||||
{
|
||||
/* 0x00: MD_0_200 */
|
||||
|
@ -1521,10 +1507,6 @@ static const struct SiS_LVDSCRT1Data SiS_LVDSCRT1640x480_1_H[] =
|
|||
};
|
||||
|
||||
bool SiSInitPtr(struct SiS_Private *SiS_Pr);
|
||||
#ifdef SIS_XORG_XF86
|
||||
unsigned short SiS_GetModeID(int VGAEngine, unsigned int VBFlags, int HDisplay, int VDisplay,
|
||||
int Depth, bool FSTN, int LCDwith, int LCDheight);
|
||||
#endif
|
||||
unsigned short SiS_GetModeID_LCD(int VGAEngine, unsigned int VBFlags, int HDisplay,
|
||||
int VDisplay, int Depth, bool FSTN,
|
||||
unsigned short CustomT, int LCDwith, int LCDheight,
|
||||
|
@ -1550,17 +1532,11 @@ void SiS_SetRegOR(SISIOADDRESS Port,unsigned short Index, unsigned short DataOR
|
|||
void SiS_DisplayOn(struct SiS_Private *SiS_Pr);
|
||||
void SiS_DisplayOff(struct SiS_Private *SiS_Pr);
|
||||
void SiSRegInit(struct SiS_Private *SiS_Pr, SISIOADDRESS BaseAddr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiSSetLVDSetc(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
void SiS_SetEnableDstn(struct SiS_Private *SiS_Pr, int enable);
|
||||
void SiS_SetEnableFstn(struct SiS_Private *SiS_Pr, int enable);
|
||||
unsigned short SiS_GetModeFlag(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex);
|
||||
bool SiSDetermineROMLayout661(struct SiS_Private *SiS_Pr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_GetVBType(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
|
||||
bool SiS_SearchModeID(struct SiS_Private *SiS_Pr, unsigned short *ModeNo,
|
||||
unsigned short *ModeIdIndex);
|
||||
|
@ -1572,37 +1548,19 @@ unsigned short SiS_GetColorDepth(struct SiS_Private *SiS_Pr, unsigned short Mode
|
|||
unsigned short ModeIdIndex);
|
||||
unsigned short SiS_GetOffset(struct SiS_Private *SiS_Pr,unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex, unsigned short RRTI);
|
||||
#ifdef SIS300
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *idx1,
|
||||
unsigned short *idx2);
|
||||
unsigned short SiS_GetFIFOThresholdB300(unsigned short idx1, unsigned short idx2);
|
||||
unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
|
||||
#endif
|
||||
void SiS_LoadDAC(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
|
||||
#ifdef SIS_XORG_XF86
|
||||
bool SiSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn, unsigned short ModeNo,
|
||||
bool dosetpitch);
|
||||
bool SiSBIOSSetMode(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
|
||||
DisplayModePtr mode, bool IsCustom);
|
||||
bool SiSBIOSSetModeCRT2(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
|
||||
DisplayModePtr mode, bool IsCustom);
|
||||
bool SiSBIOSSetModeCRT1(struct SiS_Private *SiS_Pr, ScrnInfoPtr pScrn,
|
||||
DisplayModePtr mode, bool IsCustom);
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
bool SiSSetMode(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
|
||||
#endif
|
||||
void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
|
||||
void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
unsigned short ModeIdIndex);
|
||||
#ifdef SIS_XORG_XF86
|
||||
void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
|
||||
int yres, DisplayModePtr current);
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
void SiS_Generic_ConvertCRData(struct SiS_Private *SiS_Pr, unsigned char *crdata, int xres,
|
||||
int yres, struct fb_var_screeninfo *var, bool writeres);
|
||||
#endif
|
||||
|
||||
/* From init301.c: */
|
||||
extern void SiS_GetVBInfo(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
|
||||
|
@ -1626,29 +1584,16 @@ extern unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short
|
|||
extern bool SiS_IsVAMode(struct SiS_Private *);
|
||||
extern bool SiS_IsDualEdge(struct SiS_Private *);
|
||||
|
||||
#ifdef SIS_XORG_XF86
|
||||
/* From other modules: */
|
||||
extern unsigned short SiS_CheckBuildCustomMode(ScrnInfoPtr pScrn, DisplayModePtr mode,
|
||||
unsigned int VBFlags);
|
||||
extern unsigned char SiS_GetSetBIOSScratch(ScrnInfoPtr pScrn, unsigned short offset,
|
||||
unsigned char value);
|
||||
extern unsigned char SiS_GetSetModeID(ScrnInfoPtr pScrn, unsigned char id);
|
||||
extern unsigned short SiS_GetModeNumber(ScrnInfoPtr pScrn, DisplayModePtr mode,
|
||||
unsigned int VBFlags);
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#ifdef SIS300
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
|
||||
extern void sisfb_write_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg,
|
||||
unsigned int val);
|
||||
#endif
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
extern void sisfb_write_nbridge_pci_byte(struct SiS_Private *SiS_Pr, int reg,
|
||||
unsigned char val);
|
||||
extern unsigned int sisfb_read_mio_pci_word(struct SiS_Private *SiS_Pr, int reg);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -53,15 +53,8 @@
|
|||
#ifndef _INIT301_H_
|
||||
#define _INIT301_H_
|
||||
|
||||
#include "osdef.h"
|
||||
#include "initdef.h"
|
||||
|
||||
#ifdef SIS_XORG_XF86
|
||||
#include "sis.h"
|
||||
#include "sis_regs.h"
|
||||
#endif
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
#include "vgatypes.h"
|
||||
#include "vstruct.h"
|
||||
#ifdef SIS_CP
|
||||
|
@ -72,7 +65,6 @@
|
|||
#include <linux/fb.h>
|
||||
#include "sis.h"
|
||||
#include <video/sisfb.h>
|
||||
#endif
|
||||
|
||||
static const unsigned char SiS_YPbPrTable[3][64] = {
|
||||
{
|
||||
|
@ -237,7 +229,7 @@ static const unsigned char SiS_Part2CLVX_6[] = { /* 1080i */
|
|||
0xFF,0xFF,
|
||||
};
|
||||
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
/* 661 et al LCD data structure (2.03.00) */
|
||||
static const unsigned char SiS_LCDStruct661[] = {
|
||||
/* 1024x768 */
|
||||
|
@ -279,7 +271,7 @@ static const unsigned char SiS_LCDStruct661[] = {
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef SIS300
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
static unsigned char SiS300_TrumpionData[14][80] = {
|
||||
{ 0x02,0x0A,0x0A,0x01,0x04,0x01,0x00,0x03,0x0D,0x00,0x0D,0x10,0x7F,0x00,0x80,0x02,
|
||||
0x20,0x03,0x0B,0x00,0x90,0x01,0xC1,0x01,0x60,0x0C,0x30,0x10,0x00,0x00,0x04,0x23,
|
||||
|
@ -356,9 +348,6 @@ static unsigned char SiS300_TrumpionData[14][80] = {
|
|||
#endif
|
||||
|
||||
void SiS_UnLockCRT2(struct SiS_Private *SiS_Pr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_LockCRT2(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
void SiS_EnableCRT2(struct SiS_Private *SiS_Pr);
|
||||
unsigned short SiS_GetRatePtr(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short ModeIdIndex);
|
||||
void SiS_WaitRetrace1(struct SiS_Private *SiS_Pr);
|
||||
|
@ -375,9 +364,6 @@ unsigned short SiS_GetVCLK2Ptr(struct SiS_Private *SiS_Pr, unsigned short ModeNo
|
|||
unsigned short RefreshRateTableIndex);
|
||||
unsigned short SiS_GetResInfo(struct SiS_Private *SiS_Pr,unsigned short ModeNo,unsigned short ModeIdIndex);
|
||||
void SiS_DisableBridge(struct SiS_Private *SiS_Pr);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_EnableBridge(struct SiS_Private *SiS_Pr);
|
||||
#endif
|
||||
bool SiS_SetCRT2Group(struct SiS_Private *SiS_Pr, unsigned short ModeNo);
|
||||
void SiS_SiS30xBLOn(struct SiS_Private *SiS_Pr);
|
||||
void SiS_SiS30xBLOff(struct SiS_Private *SiS_Pr);
|
||||
|
@ -386,13 +372,9 @@ void SiS_SetCH700x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned cha
|
|||
unsigned short SiS_GetCH700x(struct SiS_Private *SiS_Pr, unsigned short tempax);
|
||||
void SiS_SetCH701x(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
|
||||
unsigned short SiS_GetCH701x(struct SiS_Private *SiS_Pr, unsigned short tempax);
|
||||
#ifndef SIS_LINUX_KERNEL
|
||||
void SiS_SetCH70xx(struct SiS_Private *SiS_Pr, unsigned short reg, unsigned char val);
|
||||
unsigned short SiS_GetCH70xx(struct SiS_Private *SiS_Pr, unsigned short tempax);
|
||||
#endif
|
||||
void SiS_SetCH70xxANDOR(struct SiS_Private *SiS_Pr, unsigned short reg,
|
||||
unsigned char orval,unsigned short andval);
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
static void SiS_Chrontel701xOn(struct SiS_Private *SiS_Pr);
|
||||
static void SiS_Chrontel701xOff(struct SiS_Private *SiS_Pr);
|
||||
static void SiS_ChrontelInitTVVSync(struct SiS_Private *SiS_Pr);
|
||||
|
@ -401,7 +383,7 @@ void SiS_Chrontel701xBLOn(struct SiS_Private *SiS_Pr);
|
|||
void SiS_Chrontel701xBLOff(struct SiS_Private *SiS_Pr);
|
||||
#endif /* 315 */
|
||||
|
||||
#ifdef SIS300
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
static bool SiS_SetTrumpionBlock(struct SiS_Private *SiS_Pr, unsigned char *dataptr);
|
||||
void SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo);
|
||||
#endif
|
||||
|
@ -412,21 +394,12 @@ unsigned short SiS_HandleDDC(struct SiS_Private *SiS_Pr, unsigned int VBFlags, i
|
|||
unsigned short adaptnum, unsigned short DDCdatatype,
|
||||
unsigned char *buffer, unsigned int VBFlags2);
|
||||
|
||||
#ifdef SIS_XORG_XF86
|
||||
unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
|
||||
int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
|
||||
bool checkcr32, unsigned int VBFlags2);
|
||||
unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
|
||||
unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
|
||||
unsigned char *buffer);
|
||||
#else
|
||||
static unsigned short SiS_InitDDCRegs(struct SiS_Private *SiS_Pr, unsigned int VBFlags,
|
||||
int VGAEngine, unsigned short adaptnum, unsigned short DDCdatatype,
|
||||
bool checkcr32, unsigned int VBFlags2);
|
||||
static unsigned short SiS_ProbeDDC(struct SiS_Private *SiS_Pr);
|
||||
static unsigned short SiS_ReadDDC(struct SiS_Private *SiS_Pr, unsigned short DDCdatatype,
|
||||
unsigned char *buffer);
|
||||
#endif
|
||||
static void SiS_SetSwitchDDC2(struct SiS_Private *SiS_Pr);
|
||||
static unsigned short SiS_SetStart(struct SiS_Private *SiS_Pr);
|
||||
static unsigned short SiS_SetStop(struct SiS_Private *SiS_Pr);
|
||||
|
@ -441,13 +414,13 @@ static unsigned short SiS_PrepareDDC(struct SiS_Private *SiS_Pr);
|
|||
static void SiS_SendACK(struct SiS_Private *SiS_Pr, unsigned short yesno);
|
||||
static unsigned short SiS_DoProbeDDC(struct SiS_Private *SiS_Pr);
|
||||
|
||||
#ifdef SIS300
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
static void SiS_OEM300Setting(struct SiS_Private *SiS_Pr,
|
||||
unsigned short ModeNo, unsigned short ModeIdIndex, unsigned short RefTabindex);
|
||||
static void SetOEMLCDData2(struct SiS_Private *SiS_Pr,
|
||||
unsigned short ModeNo, unsigned short ModeIdIndex,unsigned short RefTableIndex);
|
||||
#endif
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
static void SiS_OEM310Setting(struct SiS_Private *SiS_Pr,
|
||||
unsigned short ModeNo,unsigned short ModeIdIndex, unsigned short RRTI);
|
||||
static void SiS_OEM661Setting(struct SiS_Private *SiS_Pr,
|
||||
|
@ -482,15 +455,13 @@ extern void SiS_CalcLCDACRT1Timing(struct SiS_Private *SiS_Pr, unsigned short M
|
|||
extern void SiS_CalcCRRegisters(struct SiS_Private *SiS_Pr, int depth);
|
||||
extern unsigned short SiS_GetRefCRTVCLK(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
|
||||
extern unsigned short SiS_GetRefCRT1CRTC(struct SiS_Private *SiS_Pr, unsigned short Index, int UseWide);
|
||||
#ifdef SIS300
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
extern void SiS_GetFIFOThresholdIndex300(struct SiS_Private *SiS_Pr, unsigned short *tempbx,
|
||||
unsigned short *tempcl);
|
||||
extern unsigned short SiS_GetFIFOThresholdB300(unsigned short tempbx, unsigned short tempcl);
|
||||
extern unsigned short SiS_GetLatencyFactor630(struct SiS_Private *SiS_Pr, unsigned short index);
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
extern unsigned int sisfb_read_nbridge_pci_dword(struct SiS_Private *SiS_Pr, int reg);
|
||||
extern unsigned int sisfb_read_lpc_pci_dword(struct SiS_Private *SiS_Pr, int reg);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,6 @@
|
|||
* Author: Thomas Winischhofer <thomas@winischhofer.net>
|
||||
*/
|
||||
|
||||
#include "osdef.h"
|
||||
#include "initdef.h"
|
||||
#include "vgatypes.h"
|
||||
#include "vstruct.h"
|
||||
|
@ -59,7 +58,7 @@ sisfb_mode_rate_to_dclock(struct SiS_Private *SiS_Pr, unsigned char modeno,
|
|||
|
||||
if(rateindex > 0) rateindex--;
|
||||
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
switch(ModeNo) {
|
||||
case 0x5a: ModeNo = 0x50; break;
|
||||
case 0x5b: ModeNo = 0x56;
|
||||
|
@ -103,7 +102,7 @@ sisfb_mode_rate_to_ddata(struct SiS_Private *SiS_Pr, unsigned char modeno,
|
|||
|
||||
if(rateindex > 0) rateindex--;
|
||||
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
switch(ModeNo) {
|
||||
case 0x5a: ModeNo = 0x50; break;
|
||||
case 0x5b: ModeNo = 0x56;
|
||||
|
@ -187,7 +186,7 @@ sisfb_gettotalfrommode(struct SiS_Private *SiS_Pr, unsigned char modeno, int *ht
|
|||
|
||||
if(rateindex > 0) rateindex--;
|
||||
|
||||
#ifdef SIS315H
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
switch(ModeNo) {
|
||||
case 0x5a: ModeNo = 0x50; break;
|
||||
case 0x5b: ModeNo = 0x56;
|
||||
|
|
|
@ -1,133 +0,0 @@
|
|||
/* $XFree86$ */
|
||||
/* $XdotOrg$ */
|
||||
/*
|
||||
* OS depending defines
|
||||
*
|
||||
* Copyright (C) 2001-2005 by Thomas Winischhofer, Vienna, Austria
|
||||
*
|
||||
* If distributed as part of the Linux kernel, the following license terms
|
||||
* apply:
|
||||
*
|
||||
* * This program is free software; you can redistribute it and/or modify
|
||||
* * it under the terms of the GNU General Public License as published by
|
||||
* * the Free Software Foundation; either version 2 of the named License,
|
||||
* * or any later version.
|
||||
* *
|
||||
* * This program is distributed in the hope that it will be useful,
|
||||
* * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* * GNU General Public License for more details.
|
||||
* *
|
||||
* * You should have received a copy of the GNU General Public License
|
||||
* * along with this program; if not, write to the Free Software
|
||||
* * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
|
||||
*
|
||||
* Otherwise, the following license terms apply:
|
||||
*
|
||||
* * Redistribution and use in source and binary forms, with or without
|
||||
* * modification, are permitted provided that the following conditions
|
||||
* * are met:
|
||||
* * 1) Redistributions of source code must retain the above copyright
|
||||
* * notice, this list of conditions and the following disclaimer.
|
||||
* * 2) Redistributions in binary form must reproduce the above copyright
|
||||
* * notice, this list of conditions and the following disclaimer in the
|
||||
* * documentation and/or other materials provided with the distribution.
|
||||
* * 3) The name of the author may not be used to endorse or promote products
|
||||
* * derived from this software without specific prior written permission.
|
||||
* *
|
||||
* * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
* * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
* * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
* * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
* * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
* * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Author: Thomas Winischhofer <thomas@winischhofer.net>
|
||||
* Silicon Integrated Systems, Inc. (used by permission)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef _SIS_OSDEF_H_
|
||||
#define _SIS_OSDEF_H_
|
||||
|
||||
/* The choices are: */
|
||||
#define SIS_LINUX_KERNEL /* Linux kernel framebuffer */
|
||||
#undef SIS_XORG_XF86 /* XFree86/X.org */
|
||||
|
||||
#ifdef OutPortByte
|
||||
#undef OutPortByte
|
||||
#endif
|
||||
|
||||
#ifdef OutPortWord
|
||||
#undef OutPortWord
|
||||
#endif
|
||||
|
||||
#ifdef OutPortLong
|
||||
#undef OutPortLong
|
||||
#endif
|
||||
|
||||
#ifdef InPortByte
|
||||
#undef InPortByte
|
||||
#endif
|
||||
|
||||
#ifdef InPortWord
|
||||
#undef InPortWord
|
||||
#endif
|
||||
|
||||
#ifdef InPortLong
|
||||
#undef InPortLong
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/* LINUX KERNEL */
|
||||
/**********************************************************************/
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
|
||||
#ifdef CONFIG_FB_SIS_300
|
||||
#define SIS300
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FB_SIS_315
|
||||
#define SIS315H
|
||||
#endif
|
||||
|
||||
#if !defined(SIS300) && !defined(SIS315H)
|
||||
#warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set
|
||||
#warning sisfb will not work!
|
||||
#endif
|
||||
|
||||
#define OutPortByte(p,v) outb((u8)(v),(SISIOADDRESS)(p))
|
||||
#define OutPortWord(p,v) outw((u16)(v),(SISIOADDRESS)(p))
|
||||
#define OutPortLong(p,v) outl((u32)(v),(SISIOADDRESS)(p))
|
||||
#define InPortByte(p) inb((SISIOADDRESS)(p))
|
||||
#define InPortWord(p) inw((SISIOADDRESS)(p))
|
||||
#define InPortLong(p) inl((SISIOADDRESS)(p))
|
||||
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset_io(MemoryAddress, value, MemorySize)
|
||||
|
||||
#endif /* LINUX_KERNEL */
|
||||
|
||||
/**********************************************************************/
|
||||
/* XFree86/X.org */
|
||||
/**********************************************************************/
|
||||
|
||||
#ifdef SIS_XORG_XF86
|
||||
|
||||
#define SIS300
|
||||
#define SIS315H
|
||||
|
||||
#define OutPortByte(p,v) outSISREG((IOADDRESS)(p),(CARD8)(v))
|
||||
#define OutPortWord(p,v) outSISREGW((IOADDRESS)(p),(CARD16)(v))
|
||||
#define OutPortLong(p,v) outSISREGL((IOADDRESS)(p),(CARD32)(v))
|
||||
#define InPortByte(p) inSISREG((IOADDRESS)(p))
|
||||
#define InPortWord(p) inSISREGW((IOADDRESS)(p))
|
||||
#define InPortLong(p) inSISREGL((IOADDRESS)(p))
|
||||
#define SiS_SetMemory(MemoryAddress,MemorySize,value) memset(MemoryAddress, value, MemorySize)
|
||||
|
||||
#endif /* XF86 */
|
||||
|
||||
#endif /* _OSDEF_H_ */
|
|
@ -24,7 +24,6 @@
|
|||
#ifndef _SIS_H_
|
||||
#define _SIS_H_
|
||||
|
||||
#include "osdef.h"
|
||||
#include <video/sisfb.h>
|
||||
|
||||
#include "vgatypes.h"
|
||||
|
|
|
@ -60,6 +60,11 @@
|
|||
#include "sis.h"
|
||||
#include "sis_main.h"
|
||||
|
||||
#if !defined(CONFIG_FB_SIS_300) && !defined(CONFIG_FB_SIS_315)
|
||||
#warning Neither CONFIG_FB_SIS_300 nor CONFIG_FB_SIS_315 is set
|
||||
#warning sisfb will not work!
|
||||
#endif
|
||||
|
||||
static void sisfb_handle_command(struct sis_video_info *ivideo,
|
||||
struct sisfb_cmd *sisfb_command);
|
||||
|
||||
|
@ -4114,14 +4119,6 @@ sisfb_find_rom(struct pci_dev *pdev)
|
|||
if(sisfb_check_rom(rom_base, ivideo)) {
|
||||
|
||||
if((myrombase = vmalloc(65536))) {
|
||||
|
||||
/* Work around bug in pci/rom.c: Folks forgot to check
|
||||
* whether the size retrieved from the BIOS image eventually
|
||||
* is larger than the mapped size
|
||||
*/
|
||||
if(pci_resource_len(pdev, PCI_ROM_RESOURCE) < romsize)
|
||||
romsize = pci_resource_len(pdev, PCI_ROM_RESOURCE);
|
||||
|
||||
memcpy_fromio(myrombase, rom_base,
|
||||
(romsize > 65536) ? 65536 : romsize);
|
||||
}
|
||||
|
@ -4155,23 +4152,6 @@ sisfb_find_rom(struct pci_dev *pdev)
|
|||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
pci_read_config_dword(pdev, PCI_ROM_ADDRESS, &temp);
|
||||
pci_write_config_dword(pdev, PCI_ROM_ADDRESS,
|
||||
(ivideo->video_base & PCI_ROM_ADDRESS_MASK) | PCI_ROM_ADDRESS_ENABLE);
|
||||
|
||||
rom_base = ioremap(ivideo->video_base, 65536);
|
||||
if(rom_base) {
|
||||
if(sisfb_check_rom(rom_base, ivideo)) {
|
||||
if((myrombase = vmalloc(65536)))
|
||||
memcpy_fromio(myrombase, rom_base, 65536);
|
||||
}
|
||||
iounmap(rom_base);
|
||||
}
|
||||
|
||||
pci_write_config_dword(pdev, PCI_ROM_ADDRESS, temp);
|
||||
|
||||
#endif
|
||||
|
||||
return myrombase;
|
||||
|
|
|
@ -55,21 +55,10 @@
|
|||
|
||||
#define SISIOMEMTYPE
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
typedef unsigned long SISIOADDRESS;
|
||||
#include <linux/types.h> /* Need __iomem */
|
||||
#undef SISIOMEMTYPE
|
||||
#define SISIOMEMTYPE __iomem
|
||||
#endif
|
||||
|
||||
#ifdef SIS_XORG_XF86
|
||||
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,0,0,0)
|
||||
typedef unsigned long IOADDRESS;
|
||||
typedef unsigned long SISIOADDRESS;
|
||||
#else
|
||||
typedef IOADDRESS SISIOADDRESS;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef enum _SIS_CHIP_TYPE {
|
||||
SIS_VGALegacy = 0,
|
||||
|
|
|
@ -233,24 +233,15 @@ struct SiS_Private
|
|||
{
|
||||
unsigned char ChipType;
|
||||
unsigned char ChipRevision;
|
||||
#ifdef SIS_XORG_XF86
|
||||
PCITAG PciTag;
|
||||
#endif
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
void *ivideo;
|
||||
#endif
|
||||
unsigned char *VirtualRomBase;
|
||||
bool UseROM;
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
unsigned char SISIOMEMTYPE *VideoMemoryAddress;
|
||||
unsigned int VideoMemorySize;
|
||||
#endif
|
||||
SISIOADDRESS IOAddress;
|
||||
SISIOADDRESS IOAddress2; /* For dual chip XGI volari */
|
||||
|
||||
#ifdef SIS_LINUX_KERNEL
|
||||
SISIOADDRESS RelIO;
|
||||
#endif
|
||||
SISIOADDRESS SiS_P3c4;
|
||||
SISIOADDRESS SiS_P3d4;
|
||||
SISIOADDRESS SiS_P3c0;
|
||||
|
@ -280,9 +271,6 @@ struct SiS_Private
|
|||
unsigned short SiS_IF_DEF_FSTN;
|
||||
unsigned short SiS_SysFlags;
|
||||
unsigned char SiS_VGAINFO;
|
||||
#ifdef SIS_XORG_XF86
|
||||
unsigned short SiS_CP1, SiS_CP2, SiS_CP3, SiS_CP4;
|
||||
#endif
|
||||
bool SiS_UseROM;
|
||||
bool SiS_ROMNew;
|
||||
bool SiS_XGIROM;
|
||||
|
|
|
@ -1122,6 +1122,7 @@ extern const struct fb_videomode *fb_find_best_display(const struct fb_monspecs
|
|||
|
||||
/* drivers/video/fbcmap.c */
|
||||
extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp);
|
||||
extern int fb_alloc_cmap_gfp(struct fb_cmap *cmap, int len, int transp, gfp_t flags);
|
||||
extern void fb_dealloc_cmap(struct fb_cmap *cmap);
|
||||
extern int fb_copy_cmap(const struct fb_cmap *from, struct fb_cmap *to);
|
||||
extern int fb_cmap_to_user(const struct fb_cmap *from, struct fb_cmap_user *to);
|
||||
|
|
|
@ -99,7 +99,6 @@ struct lcd_sync_arg {
|
|||
#define FBIPUT_COLOR _IOW('F', 6, int)
|
||||
#define FBIPUT_HSYNC _IOW('F', 9, int)
|
||||
#define FBIPUT_VSYNC _IOW('F', 10, int)
|
||||
#define FBIO_WAITFORVSYNC _IOW('F', 0x20, u_int32_t)
|
||||
|
||||
#endif /* ifndef DA8XX_FB_H */
|
||||
|
||||
|
|
Loading…
Reference in New Issue