summaryrefslogtreecommitdiff
path: root/src/smi.h
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@gmail.com>2008-10-11 14:24:48 +0200
committerPaulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>2008-10-14 13:25:27 -0300
commit6e0837305533f940adb7a09f9b013077c0888f2d (patch)
treeb918a274669daea2cebd0a8d69f151b73aded587 /src/smi.h
parent605199b1fa80d5a65e11a38270f6d0974466d1dc (diff)
RandR1.2 initial implementation (WIP)
Moved most of the Lynx-specific code out of the main functions at smi_driver.c to some new files: smilynx_hw.c (With CRTC-independent code like global hardware initialization and mode saving/restoring), smilynx_crtc.c (With the CRTC-local procedures) and smilynx_output.c (Output power management, DDC and monitor detection, currently). Done something similar with the SMI501 code: split SMI501_ModeInit in three separate functions: SMI501_HWInit that does the global initialization, and the CRTC mode_set callbacks SMI501_ModeSet_crt and SMI501_ModeSet_lcd at smi501_crtc.c. The SMI501_ModeSet code is divided into SMI501_WriteMode_common, SMI501_WriteMode_lcd and SMI501_WriteMode_crt, each one updates a different register set in the hardware. Inside smi_crtc.c, there is mainly hardware independent code... Initial CRT controller allocation, shadows, rotation and framebuffer resizing code. The shadow code currently relies on EXA... I'm not sure what are the problems of the EXA implementation in MSOC. Does it work? I think it would be a good thing to get rid of XAA soon: The next thing I'll be working on will be EXA Composite... I hope it's possible to get EXA acceleration working at least as fast as the current XAA. (Although Teddy Wang confirmed me that the SMI720 DMA engine is broken...) So, the patch adds some features like new Lynx dualhead modesetting code, but it probably breaks some other things: * Video Overlay: I suppose it does work with EXA activated. It seems it is also possible to have simultaneous overlays in both CRTCs with the Lynx hardware (I have some code for this, but still work in progress). * Hardware Cursor (It needs more integration in the CRTC interfaces). * The old Shadow FB / rotation code, which we should probably drop. These are in my TODO list... Along with some more cleaning and other minor issues in the modesetting code. About the SMI501 RandR1.2 implementation... I suppose it's specially lacking per-output DPMS (The DPMS field in the System Control register only affects the CRT, doesn't it?).
Diffstat (limited to 'src/smi.h')
-rw-r--r--src/smi.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/smi.h b/src/smi.h
index 11bb060..a745f0a 100644
--- a/src/smi.h
+++ b/src/smi.h
@@ -205,8 +205,8 @@ typedef struct
/* DPMS */
int CurrentDPMS; /* Current DPMS state */
unsigned char DPMS_SR20; /* Saved DPMS SR20 register */
- unsigned char DPMS_SR21; /* Saved DPMS SR21 register */
- unsigned char DPMS_SR31; /* Saved DPMS SR31 register */
+/* unsigned char DPMS_SR21; /\* Saved DPMS SR21 register *\/ */
+/* unsigned char DPMS_SR31; /\* Saved DPMS SR31 register *\/ */
unsigned char DPMS_SR34; /* Saved DPMS SR34 register */
/* Panel information */
@@ -216,6 +216,7 @@ typedef struct
I2CBusPtr I2C; /* Pointer into I2C module */
xf86Int10InfoPtr pInt10; /* Pointer to INT10 module */
+ vbeInfoPtr pVbe; /* Pointer to VBE module */
/* Shadow frame buffer (rotation) */
Bool shadowFB; /* Flag if shadow buffer is
@@ -268,6 +269,9 @@ typedef struct
Bool IsSwitching; /* when switching modes */
Bool UseFBDev;
+ /* CRTCs */
+ ClockRanges clockRange;
+ ExaOffscreenArea* fbArea;
} SMIRec, *SMIPtr;
#define SMIPTR(p) ((SMIPtr)((p)->driverPrivate))
@@ -379,6 +383,8 @@ void SMI_AdjustFrame(int scrnIndex, int x, int y, int flags);
Bool SMI_SwitchMode(int scrnIndex, DisplayModePtr mode, int flags);
void SMI_LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indicies,
LOCO *colors, VisualPtr pVisual);
+xf86MonPtr SMI_ddc1(ScrnInfoPtr pScrn);
+void SMI_PrintRegs(ScrnInfoPtr pScrn);
/* smi_dga.c */
Bool SMI_DGAInit(ScreenPtr pScrn);