summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2006-04-10 19:41:41 -0700
committerKeith Packard <keithp@neko.keithp.com>2006-04-10 19:41:41 -0700
commitc26f0737e2c0f000f67f21ef6007b351160036a4 (patch)
treeb96aee13ba6fd6ec076b66818a1c3dd616db5457 /src
parent11ad8a590d65849be00e1be4e9dd52c1159a4f24 (diff)
parent692a4a4bafd4cab197b761cda22368581b78f996 (diff)
Merge in master to modesetting
Diffstat (limited to 'src')
-rw-r--r--src/i810.h3
-rw-r--r--src/i810_accel.c1
-rw-r--r--src/i810_cursor.c1
-rw-r--r--src/i810_dga.c1
-rw-r--r--src/i810_dri.c43
-rw-r--r--src/i810_driver.c20
-rw-r--r--src/i810_hwmc.c17
-rw-r--r--src/i810_io.c1
-rw-r--r--src/i810_memory.c13
-rw-r--r--src/i810_video.c9
-rw-r--r--src/i830.h2
-rw-r--r--src/i830_accel.c1
-rw-r--r--src/i830_cursor.c23
-rw-r--r--src/i830_dga.c1
-rw-r--r--src/i830_display.c2
-rw-r--r--src/i830_dri.c30
-rw-r--r--src/i830_dri.h2
-rw-r--r--src/i830_driver.c116
-rw-r--r--src/i830_memory.c17
-rw-r--r--src/i830_modes.c4
-rw-r--r--src/i830_rotate.c3
-rw-r--r--src/i830_video.c13
22 files changed, 202 insertions, 121 deletions
diff --git a/src/i810.h b/src/i810.h
index a1ed9f27..044eb60f 100644
--- a/src/i810.h
+++ b/src/i810.h
@@ -39,7 +39,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _I810_H_
#define _I810_H_
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -66,7 +65,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define I810_NAME "I810"
#define I810_DRIVER_NAME "i810"
#define I810_MAJOR_VERSION 1
-#define I810_MINOR_VERSION 5
+#define I810_MINOR_VERSION 6
#define I810_PATCHLEVEL 0
diff --git a/src/i810_accel.c b/src/i810_accel.c
index f946ae2a..efbe2907 100644
--- a/src/i810_accel.c
+++ b/src/i810_accel.c
@@ -50,7 +50,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#include "xf86_ansic.h"
#include "xf86.h"
#include "xaarop.h"
#include "i810.h"
diff --git a/src/i810_cursor.c b/src/i810_cursor.c
index 85c4e254..c293a3d5 100644
--- a/src/i810_cursor.c
+++ b/src/i810_cursor.c
@@ -55,7 +55,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86fbman.h"
diff --git a/src/i810_dga.c b/src/i810_dga.c
index e6713331..4ab7a3df 100644
--- a/src/i810_dga.c
+++ b/src/i810_dga.c
@@ -42,7 +42,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86Pci.h"
#include "xf86PciInfo.h"
#include "xaa.h"
diff --git a/src/i810_dri.c b/src/i810_dri.c
index 82fb0594..8c05980d 100644
--- a/src/i810_dri.c
+++ b/src/i810_dri.c
@@ -16,9 +16,13 @@
#include "config.h"
#endif
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86Priv.h"
#include "xf86PciInfo.h"
@@ -481,7 +485,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
pI810DRI->regsSize = I810_REG_SIZE;
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->MMIOAddr,
- pI810DRI->regsSize, DRM_REGISTERS, 0, &pI810DRI->regs) < 0) {
+ pI810DRI->regsSize, DRM_REGISTERS, 0,
+ (drmAddress) &pI810DRI->regs) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(regs) failed\n");
DRICloseScreen(pScreen);
return FALSE;
@@ -522,7 +527,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
* under the DRI.
*/
- drmAgpAlloc(pI810->drmSubFD, 4096 * 1024, 1, NULL, &dcacheHandle);
+ drmAgpAlloc(pI810->drmSubFD, 4096 * 1024, 1, NULL,
+ (drmAddress) &dcacheHandle);
pI810->dcacheHandle = dcacheHandle;
xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] dcacheHandle : 0x%x\n",
@@ -626,7 +632,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
"[agp] GART: no dcache memory found\n");
}
- drmAgpAlloc(pI810->drmSubFD, back_size, 0, NULL, &agpHandle);
+ drmAgpAlloc(pI810->drmSubFD, back_size, 0, NULL,
+ (drmAddress) &agpHandle);
pI810->backHandle = agpHandle;
if (agpHandle != DRM_AGP_NO_HANDLE) {
@@ -652,7 +659,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
}
if (dcacheHandle == DRM_AGP_NO_HANDLE) {
- drmAgpAlloc(pI810->drmSubFD, back_size, 0, NULL, &agpHandle);
+ drmAgpAlloc(pI810->drmSubFD, back_size, 0, NULL,
+ (drmAddress) &agpHandle);
pI810->zHandle = agpHandle;
@@ -681,7 +689,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
/* Now allocate and bind the agp space. This memory will include the
* regular framebuffer as well as texture memory.
*/
- drmAgpAlloc(pI810->drmSubFD, sysmem_size, 0, NULL, &agpHandle);
+ drmAgpAlloc(pI810->drmSubFD, sysmem_size, 0, NULL,
+ (drmAddress)&agpHandle);
pI810->sysmemHandle = agpHandle;
if (agpHandle != DRM_AGP_NO_HANDLE) {
@@ -724,7 +733,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
pI810->MC.Size = 8 * 1024 * 1024;
pI810->MC.Start = pI810->FbMapSize - 8 * 1024 * 1024;
}
- drmAgpAlloc(pI810->drmSubFD, pI810->MC.Size, 0, NULL, &agpHandle);
+ drmAgpAlloc(pI810->drmSubFD, pI810->MC.Size, 0, NULL,
+ (drmAddress) &agpHandle);
pI810->xvmcHandle = agpHandle;
@@ -749,7 +759,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
}
drmAgpAlloc(pI810->drmSubFD, 4096, 2,
- (unsigned long *)&pI810->CursorPhysical, &agpHandle);
+ (unsigned long *)&pI810->CursorPhysical,
+ (drmAddress) &agpHandle);
pI810->cursorHandle = agpHandle;
@@ -773,7 +784,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
}
drmAgpAlloc(pI810->drmSubFD, 16384, 2,
- (unsigned long *)&pI810->CursorARGBPhysical, &agpHandle);
+ (unsigned long *)&pI810->CursorARGBPhysical,
+ (drmAddress) &agpHandle);
pI810->cursorARGBHandle = agpHandle;
@@ -851,7 +863,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->BackBuffer.Start,
pI810->BackBuffer.Size, DRM_AGP, 0,
- &pI810DRI->backbuffer) < 0) {
+ (drmAddress) &pI810DRI->backbuffer) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[drm] drmAddMap(backbuffer) failed. Disabling DRI\n");
DRICloseScreen(pScreen);
@@ -861,7 +873,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
pI810DRI->depthbufferSize = pI810->DepthBuffer.Size;
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->DepthBuffer.Start,
pI810->DepthBuffer.Size, DRM_AGP, 0,
- &pI810DRI->depthbuffer) < 0) {
+ (drmAddress) &pI810DRI->depthbuffer) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[drm] drmAddMap(depthbuffer) failed. Disabling DRI.\n");
DRICloseScreen(pScreen);
@@ -890,7 +902,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->BufferMem.Start,
- pI810->BufferMem.Size, DRM_AGP, 0, &pI810->buffer_map) < 0) {
+ pI810->BufferMem.Size, DRM_AGP, 0,
+ (drmAddress) &pI810->buffer_map) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[drm] drmAddMap(buffer_map) failed. Disabling DRI.\n");
DRICloseScreen(pScreen);
@@ -901,7 +914,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
pI810DRI->agp_buf_size = pI810->BufferMem.Size;
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->LpRing->mem.Start,
- pI810->LpRing->mem.Size, DRM_AGP, 0, &pI810->ring_map) < 0) {
+ pI810->LpRing->mem.Size, DRM_AGP, 0,
+ (drmAddress) &pI810->ring_map) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[drm] drmAddMap(ring_map) failed. Disabling DRI.\n");
DRICloseScreen(pScreen);
@@ -929,7 +943,8 @@ I810DRIScreenInit(ScreenPtr pScreen)
I810AllocLow(&(pI810->TexMem), &(pI810->SysMem), pI810DRI->textureSize);
if (drmAddMap(pI810->drmSubFD, (drm_handle_t) pI810->TexMem.Start,
- pI810->TexMem.Size, DRM_AGP, 0, &pI810DRI->textures) < 0) {
+ pI810->TexMem.Size, DRM_AGP, 0,
+ (drmAddress) &pI810DRI->textures) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[drm] drmAddMap(textures) failed. Disabling DRI.\n");
DRICloseScreen(pScreen);
diff --git a/src/i810_driver.c b/src/i810_driver.c
index f7247f4b..ae9069c7 100644
--- a/src/i810_driver.c
+++ b/src/i810_driver.c
@@ -60,11 +60,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* DGA
*/
+#include <math.h>
+#include <string.h>
+#include <unistd.h>
+
/*
* These are X and server generic header files.
*/
#include "xf86.h"
-#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
#include "xf86RAC.h"
@@ -1224,21 +1227,24 @@ I810PrintErrorState(ScrnInfoPtr pScrn)
I810Ptr pI810 = I810PTR(pScrn);
ErrorF("pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n",
- INREG(PGETBL_CTL), INREG(PGE_ERR));
+ (unsigned long) INREG(PGETBL_CTL), (unsigned long) INREG(PGE_ERR));
- ErrorF("ipeir: %lx iphdr: %lx\n", INREG(IPEIR), INREG(IPEHR));
+ ErrorF("ipeir: %lx iphdr: %lx\n", (unsigned long) INREG(IPEIR),
+ (unsigned long) INREG(IPEHR));
ErrorF("LP ring tail: %lx head: %lx len: %lx start %lx\n",
- INREG(LP_RING + RING_TAIL),
- INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
- INREG(LP_RING + RING_LEN), INREG(LP_RING + RING_START));
+ (unsigned long) INREG(LP_RING + RING_TAIL),
+ (unsigned long) INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
+ (unsigned long) INREG(LP_RING + RING_LEN),
+ (unsigned long) INREG(LP_RING + RING_START));
ErrorF("eir: %x esr: %x emr: %x\n",
INREG16(EIR), INREG16(ESR), INREG16(EMR));
ErrorF("instdone: %x instpm: %x\n", INREG16(INST_DONE), INREG8(INST_PM));
- ErrorF("memmode: %lx instps: %lx\n", INREG(MEMMODE), INREG(INST_PS));
+ ErrorF("memmode: %lx instps: %lx\n", (unsigned long) INREG(MEMMODE),
+ (unsigned long) INREG(INST_PS));
ErrorF("hwstam: %x ier: %x imr: %x iir: %x\n",
INREG16(HWSTAM), INREG16(IER), INREG16(IMR), INREG16(IIR));
diff --git a/src/i810_hwmc.c b/src/i810_hwmc.c
index 5d253236..d56dfc40 100644
--- a/src/i810_hwmc.c
+++ b/src/i810_hwmc.c
@@ -38,10 +38,11 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <string.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -210,12 +211,12 @@ void I810InitMC(ScreenPtr pScreen)
/* Cursor is at a page boundary, Overlay regs are not, don't forget */
if (drmAddMap(pI810->drmSubFD, (drm_handle_t)pI810->CursorStart,
- 4096, DRM_AGP, 0, &pI810->overlay_map) < 0) {
+ 4096, DRM_AGP, 0, (drmAddress) &pI810->overlay_map) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(overlay) failed\n");
return;
}
if (drmAddMap(pI810->drmSubFD, (drm_handle_t)pI810->MC.Start,
- pI810->MC.Size, DRM_AGP, 0, &pI810->mc_map) < 0) {
+ pI810->MC.Size, DRM_AGP, 0, (drmAddress) &pI810->mc_map) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR, "drmAddMap(MC) failed\n");
return;
}
@@ -245,14 +246,14 @@ int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext,
if(!pI810->directRenderingEnabled) {
- xf86DrvMsg(X_ERROR, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"I810XvMCCreateContext: Cannot use XvMC without DRI!\n");
return BadAlloc;
}
/* Context Already in use! */
if(pI810->xvmcContext) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"I810XvMCCreateContext: 2 XvMC Contexts Attempted, not supported.\n");
return BadAlloc;
}
@@ -267,7 +268,7 @@ int I810XvMCCreateContext (ScrnInfoPtr pScrn, XvMCContextPtr pContext,
*num_priv = sizeof(I810XvMCCreateContextRec) >> 2;
if(drmCreateContext(pI810->drmSubFD, &(contextRec->drmcontext) ) < 0) {
- xf86DrvMsg(X_ERROR, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"I810XvMCCreateContext: Unable to create DRMContext!\n");
xfree(*priv);
return BadAlloc;
@@ -299,7 +300,7 @@ int I810XvMCCreateSurface (ScrnInfoPtr pScrn, XvMCSurfacePtr pSurf,
*priv = (long *)xcalloc(2,sizeof(long));
if(!*priv) {
- xf86DrvMsg(X_ERROR, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"I810XvMCCreateSurface: Unable to allocate memory!\n");
*num_priv = 0;
return BadAlloc;
@@ -345,7 +346,7 @@ int I810XvMCCreateSubpicture (ScrnInfoPtr pScrn, XvMCSubpicturePtr pSubp,
*priv = (long *)xcalloc(1,sizeof(long));
if(!*priv) {
- xf86DrvMsg(X_ERROR, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"I810XvMCCreateSubpicture: Unable to allocate memory!\n");
*num_priv = 0;
return BadAlloc;
diff --git a/src/i810_io.c b/src/i810_io.c
index 8d097f21..abe1d6f0 100644
--- a/src/i810_io.c
+++ b/src/i810_io.c
@@ -50,7 +50,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "xf86.h"
-#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "compiler.h"
diff --git a/src/i810_memory.c b/src/i810_memory.c
index 816e5d80..82d86eb2 100644
--- a/src/i810_memory.c
+++ b/src/i810_memory.c
@@ -50,7 +50,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "xf86.h"
-#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "i810.h"
@@ -265,7 +264,7 @@ I810SetTiledMemory(ScrnInfoPtr pScrn, int nr, unsigned int start,
CARD32 fence_mask = 0;
if (nr < 0 || nr > 7) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex, "%s - fence %d out of range\n",
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "%s - fence %d out of range\n",
"I810SetTiledMemory", nr);
return;
}
@@ -275,21 +274,21 @@ I810SetTiledMemory(ScrnInfoPtr pScrn, int nr, unsigned int start,
fence_mask = ~FENCE_START_MASK;
if (start & fence_mask) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"%s %d: start (%x) is not 512k aligned\n",
"I810SetTiledMemory", nr, start);
return;
}
if (start % size) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"%s %d: start (%x) is not size (%x) aligned\n",
"I810SetTiledMemory", nr, start, size);
return;
}
if (pitch & 127) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"%s %d: pitch (%x) not a multiple of 128 bytes\n",
"I810SetTiledMemory", nr, pitch);
return;
@@ -320,7 +319,7 @@ I810SetTiledMemory(ScrnInfoPtr pScrn, int nr, unsigned int start,
val |= FENCE_SIZE_32M;
break;
default:
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"%s %d: illegal size (0x%x)\n", "I810SetTiledMemory", nr,
size);
return;
@@ -346,7 +345,7 @@ I810SetTiledMemory(ScrnInfoPtr pScrn, int nr, unsigned int start,
val |= FENCE_PITCH_32;
break;
default:
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"%s %d: illegal size (0x%x)\n", "I810SetTiledMemory", nr,
size);
return;
diff --git a/src/i810_video.c b/src/i810_video.c
index f420d2f2..e65a7f6d 100644
--- a/src/i810_video.c
+++ b/src/i810_video.c
@@ -38,10 +38,11 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <string.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -75,7 +76,8 @@ static void I810QueryBestSize(ScrnInfoPtr, Bool,
short, short, short, short, unsigned int *, unsigned int *, pointer);
static int I810PutImage( ScrnInfoPtr,
short, short, short, short, short, short, short, short,
- int, unsigned char*, short, short, Bool, RegionPtr, pointer);
+ int, unsigned char*, short, short, Bool, RegionPtr, pointer,
+ DrawablePtr);
static int I810QueryImageAttributes(ScrnInfoPtr,
int, unsigned short *, unsigned short *, int *, int *);
@@ -973,7 +975,8 @@ I810PutImage(
int id, unsigned char* buf,
short width, short height,
Bool sync,
- RegionPtr clipBoxes, pointer data
+ RegionPtr clipBoxes, pointer data,
+ DrawablePtr pDraw
){
I810Ptr pI810 = I810PTR(pScrn);
I810PortPrivPtr pPriv = (I810PortPrivPtr)data;
diff --git a/src/i830.h b/src/i830.h
index 87dda252..743a72b8 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -47,7 +47,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _I830_H_
#define _I830_H_
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -271,6 +270,7 @@ typedef struct _I830Rec {
#endif
unsigned int LinearAlloc;
+ XF86ModReqInfo shadowReq; /* to test for later libshadow */
I830MemRange RotatedMem;
I830MemRange RotatedMem2;
Rotation rotation;
diff --git a/src/i830_accel.c b/src/i830_accel.c
index 7211f4bd..a11f64b9 100644
--- a/src/i830_accel.c
+++ b/src/i830_accel.c
@@ -58,7 +58,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
-#include "xf86_ansic.h"
#include "xf86.h"
#include "xaarop.h"
#include "i830.h"
diff --git a/src/i830_cursor.c b/src/i830_cursor.c
index ea472fa5..79d950e5 100644
--- a/src/i830_cursor.c
+++ b/src/i830_cursor.c
@@ -58,9 +58,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <string.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86fbman.h"
@@ -92,8 +93,8 @@ I830InitHWCursor(ScrnInfoPtr pScrn)
MCURSOR_PIPE_SELECT);
temp |= CURSOR_MODE_DISABLE;
temp |= (pI830->pipe << 28);
- if(pI830->CursorIsARGB)
- temp |= MCURSOR_GAMMA_ENABLE;
+/* if(pI830->CursorIsARGB)
+ temp |= MCURSOR_GAMMA_ENABLE; */
/* Need to set control, then address. */
OUTREG(CURSOR_A_CONTROL, temp);
if (pI830->CursorIsARGB)
@@ -114,6 +115,8 @@ I830InitHWCursor(ScrnInfoPtr pScrn)
temp &= ~(CURSOR_FORMAT_MASK | CURSOR_GAMMA_ENABLE |
CURSOR_ENABLE | CURSOR_STRIDE_MASK);
temp |= (CURSOR_FORMAT_3C);
+/* if (pI830->CursorIsARGB)
+ temp |= CURSOR_GAMMA_ENABLE;*/
/* This initialises the format and leave the cursor disabled. */
OUTREG(CURSOR_CONTROL, temp);
/* Need to set address and size after disabling. */
@@ -359,12 +362,12 @@ I830SetCursorPosition(ScrnInfoPtr pScrn, int x, int y)
{
I830Ptr pI830 = I830PTR(pScrn);
CARD32 temp = 0;
-#if 0
- static Bool outsideViewport = FALSE;
-#endif
Bool hide = FALSE, show = FALSE;
int oldx = x, oldy = y;
int hotspotx = 0, hotspoty = 0;
+#if 0
+ static Bool outsideViewport = FALSE;
+#endif
oldx += pScrn->frameX0; /* undo what xf86HWCurs did */
oldy += pScrn->frameY0;
@@ -482,7 +485,7 @@ I830ShowCursor(ScrnInfoPtr pScrn)
temp = INREG(CURSOR_A_CONTROL);
temp &= ~(CURSOR_MODE | MCURSOR_PIPE_SELECT);
if (pI830->CursorIsARGB)
- temp |= CURSOR_MODE_64_ARGB_AX;
+ temp |= CURSOR_MODE_64_ARGB_AX /* | MCURSOR_GAMMA_ENABLE*/;
else
temp |= CURSOR_MODE_64_4C_AX;
temp |= (pI830->pipe << 28); /* Connect to correct pipe */
@@ -506,7 +509,7 @@ I830ShowCursor(ScrnInfoPtr pScrn)
temp &= ~(CURSOR_FORMAT_MASK);
temp |= CURSOR_ENABLE;
if (pI830->CursorIsARGB)
- temp |= CURSOR_FORMAT_ARGB;
+ temp |= CURSOR_FORMAT_ARGB /* | CURSOR_GAMMA_ENABLE*/;
else
temp |= CURSOR_FORMAT_3C;
OUTREG(CURSOR_CONTROL, temp);
@@ -528,7 +531,7 @@ I830HideCursor(ScrnInfoPtr pScrn)
pI830->cursorOn = FALSE;
if (IS_MOBILE(pI830) || IS_I9XX(pI830)) {
temp = INREG(CURSOR_A_CONTROL);
- temp &= ~CURSOR_MODE;
+ temp &= ~(CURSOR_MODE|MCURSOR_GAMMA_ENABLE);
temp |= CURSOR_MODE_DISABLE;
OUTREG(CURSOR_A_CONTROL, temp);
/* This is needed to flush the above change. */
@@ -545,7 +548,7 @@ I830HideCursor(ScrnInfoPtr pScrn)
}
} else {
temp = INREG(CURSOR_CONTROL);
- temp &= ~CURSOR_ENABLE;
+ temp &= ~(CURSOR_ENABLE|CURSOR_GAMMA_ENABLE);
OUTREG(CURSOR_CONTROL, temp);
}
}
diff --git a/src/i830_dga.c b/src/i830_dga.c
index e5bcfc72..1129fa31 100644
--- a/src/i830_dga.c
+++ b/src/i830_dga.c
@@ -42,7 +42,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86Pci.h"
#include "xf86PciInfo.h"
#include "xaa.h"
diff --git a/src/i830_display.c b/src/i830_display.c
index 3b92e4fa..0338e5ed 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -277,7 +277,7 @@ static Bool
i830PipeSetMode(ScrnInfoPtr pScrn, DisplayModePtr pMode, int pipe)
{
I830Ptr pI830 = I830PTR(pScrn);
- int m1, m2, n, p1, p2;
+ int m1 = 0, m2 = 0, n = 0, p1 = 0, p2 = 0;
CARD32 dpll = 0, fp = 0, temp;
CARD32 htot, hblank, hsync, vtot, vblank, vsync, dspcntr;
CARD32 pipesrc, dspsize, adpa;
diff --git a/src/i830_dri.c b/src/i830_dri.c
index f9f9a2c7..0000a940 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -62,9 +62,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
-#include "xf86_ansic.h"
#include "xf86Priv.h"
#include "xf86PciInfo.h"
@@ -627,49 +630,49 @@ I830DRIMapScreenRegions(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
sarea->front_size,
DRM_FRAME_BUFFER, /*DRM_AGP,*/
0,
- &sarea->front_handle) < 0) {
+ (drmAddress) &sarea->front_handle) < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[drm] drmAddMap(front_handle) failed. Disabling DRI\n");
DRICloseScreen(pScreen);
return FALSE;
}
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Front Buffer = 0x%08lx\n",
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Front Buffer = 0x%08x\n",
sarea->front_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)(sarea->back_offset + pI830->LinearAddr),
sarea->back_size, DRM_AGP, 0,
- &sarea->back_handle) < 0) {
+ (drmAddress) &sarea->back_handle) < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[drm] drmAddMap(back_handle) failed. Disabling DRI\n");
DRICloseScreen(pScreen);
return FALSE;
}
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Back Buffer = 0x%08lx\n",
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Back Buffer = 0x%08x\n",
sarea->back_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)sarea->depth_offset + pI830->LinearAddr,
sarea->depth_size, DRM_AGP, 0,
- &sarea->depth_handle) < 0) {
+ (drmAddress) &sarea->depth_handle) < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[drm] drmAddMap(depth_handle) failed. Disabling DRI\n");
DRICloseScreen(pScreen);
return FALSE;
}
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Depth Buffer = 0x%08lx\n",
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Depth Buffer = 0x%08x\n",
sarea->depth_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)sarea->tex_offset + pI830->LinearAddr,
sarea->tex_size, DRM_AGP, 0,
- &sarea->tex_handle) < 0) {
+ (drmAddress) &sarea->tex_handle) < 0) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"[drm] drmAddMap(tex_handle) failed. Disabling DRI\n");
DRICloseScreen(pScreen);
return FALSE;
}
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] textures = 0x%08lx\n",
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] textures = 0x%08x\n",
sarea->tex_handle);
return TRUE;
@@ -738,24 +741,25 @@ I830DRIDoMappings(ScreenPtr pScreen)
DPRINTF(PFX, "I830DRIDoMappings\n");
pI830DRI->regsSize = I830_REG_SIZE;
if (drmAddMap(pI830->drmSubFD, (drm_handle_t)pI830->MMIOAddr,
- pI830DRI->regsSize, DRM_REGISTERS, 0, &pI830DRI->regs) < 0) {
+ pI830DRI->regsSize, DRM_REGISTERS, 0,
+ (drmAddress) &pI830DRI->regs) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR, "[drm] drmAddMap(regs) failed\n");
DRICloseScreen(pScreen);
return FALSE;
}
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08lx\n",
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08x\n",
pI830DRI->regs);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)pI830->LpRing->mem.Start + pI830->LinearAddr,
pI830->LpRing->mem.Size, DRM_AGP, 0,
- &pI830->ring_map) < 0) {
+ (drmAddress) &pI830->ring_map) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[drm] drmAddMap(ring_map) failed. Disabling DRI\n");
DRICloseScreen(pScreen);
return FALSE;
}
- xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] ring buffer = 0x%08lx\n",
+ xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] ring buffer = 0x%08x\n",
pI830->ring_map);
if (!I830InitDma(pScrn)) {
diff --git a/src/i830_dri.h b/src/i830_dri.h
index b1cb5887..e511ac7f 100644
--- a/src/i830_dri.h
+++ b/src/i830_dri.h
@@ -10,7 +10,7 @@
#define I830_MAJOR_VERSION 1
#define I830_MINOR_VERSION 5
-#define I830_PATCHLEVEL 0
+#define I830_PATCHLEVEL 1
#define I830_REG_SIZE 0x80000
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 23a06317..61faad07 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -160,8 +160,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#define PRINT_MODE_INFO 0
#endif
+#include <string.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+
#include "xf86.h"
-#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
#include "xf86RAC.h"
@@ -482,7 +486,7 @@ GetNextDisplayDeviceList(ScrnInfoPtr pScrn, int toggle)
CARD32 VODA = (CARD32)((CARD32*)pVbe->memory)[i];
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Next ACPI _DGS [%d] 0x%lx\n",
- i, VODA);
+ i, (unsigned long) VODA);
/* Check if it's a custom Video Output Device Attribute */
if (!(VODA & 0x80000000))
@@ -539,7 +543,8 @@ GetAttachableDisplayDeviceList(ScrnInfoPtr pScrn)
for (i=0; i<(pVbe->pInt10->cx & 0xff); i++)
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Attachable device 0x%lx.\n", ((CARD32*)pVbe->memory)[i]);
+ "Attachable device 0x%lx.\n",
+ (unsigned long) ((CARD32*)pVbe->memory)[i]);
return pVbe->pInt10->cx & 0xffff;
}
@@ -1411,7 +1416,7 @@ I830PreInitDDC(ScrnInfoPtr pScrn)
void I830DetectMonitors(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
- int i, ret;
+ int i;
if (!pI830->ddc2)
return;
@@ -1438,10 +1443,12 @@ void I830DetectMonitors(ScrnInfoPtr pScrn)
pI830->output[i].pDDCBus->DriverPrivate.uval);
xf86PrintEDID(pI830->output[i].MonInfo);
+#if 0
/* if we are on an i2C bus > 0 and we see a monitor - try to
* find a controller chip
*/
if (pI830->output[i].MonInfo) {
+ int ret;
ret = I830I2CDetectDVOControllers(pScrn, pI830->output[i].pI2CBus,
&pI830->output[i].i2c_drv);
if (ret==TRUE) {
@@ -1450,6 +1457,7 @@ void I830DetectMonitors(ScrnInfoPtr pScrn)
pI830->output[i].pI2CBus->DriverPrivate.uval);
}
}
+#endif
break;
#if 0
case I830_OUTPUT_SDVO:
@@ -2573,7 +2581,7 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags)
* or, at least it's meant to..... alas it doesn't seem to always work.
*/
if (pI830->devicePresence) {
- int req, att, enc;
+ int req=0, att=0, enc=0;
GetDevicePresence(pScrn, &req, &att, &enc);
for (i = 0; i < NumDisplayTypes; i++) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -2980,9 +2988,26 @@ I830BIOSPreInit(ScrnInfoPtr pScrn, int flags)
}
#endif
- if (!xf86LoadSubModule(pScrn, "shadow")) {
- PreInitCleanup(pScrn);
- return FALSE;
+ /* rotation requires the newer libshadow */
+ if (I830IsPrimary(pScrn)) {
+ int errmaj, errmin;
+ pI830->shadowReq.majorversion = 1;
+ pI830->shadowReq.minorversion = 1;
+
+ if (!LoadSubModule(pScrn->module, "shadow", NULL, NULL, NULL,
+ &pI830->shadowReq, &errmaj, &errmin)) {
+ pI830->shadowReq.minorversion = 0;
+ if (!LoadSubModule(pScrn->module, "shadow", NULL, NULL, NULL,
+ &pI830->shadowReq, &errmaj, &errmin)) {
+ LoaderErrorMsg(NULL, "shadow", errmaj, errmin);
+ return FALSE;
+ }
+ }
+ } else {
+ I830Ptr pI8301 = I830PTR(pI830->entityPrivate->pScrn_1);
+ pI830->shadowReq.majorversion = pI8301->shadowReq.majorversion;
+ pI830->shadowReq.minorversion = pI8301->shadowReq.minorversion;
+ pI830->shadowReq.patchlevel = pI8301->shadowReq.patchlevel;
}
xf86LoaderReqSymLists(I810shadowSymbols, NULL);
@@ -3169,8 +3194,19 @@ SaveHWState(ScrnInfoPtr pScrn)
I830Ptr pI830 = I830PTR(pScrn);
vgaHWPtr hwp = VGAHWPTR(pScrn);
vgaRegPtr vgaReg = &hwp->SavedReg;
+ CARD32 temp;
- DPRINTF(PFX, "SaveHWState\n");
+ /*
+ * Print out the PIPEACONF and PIPEBCONF registers.
+ */
+ temp = INREG(PIPEACONF);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEACONF is 0x%08lx\n",
+ (unsigned long) temp);
+ if (pI830->availablePipes == 2) {
+ temp = INREG(PIPEBCONF);
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "PIPEBCONF is 0x%08lx\n",
+ (unsigned long) temp);
+ }
i830TakeRegSnapshot(pScrn);
@@ -3319,21 +3355,24 @@ I830PrintErrorState(ScrnInfoPtr pScrn)
I830Ptr pI830 = I830PTR(pScrn);
ErrorF("pgetbl_ctl: 0x%lx pgetbl_err: 0x%lx\n",
- INREG(PGETBL_CTL), INREG(PGE_ERR));
+ (unsigned long)INREG(PGETBL_CTL), (unsigned long)INREG(PGE_ERR));
- ErrorF("ipeir: %lx iphdr: %lx\n", INREG(IPEIR), INREG(IPEHR));
+ ErrorF("ipeir: %lx iphdr: %lx\n", (unsigned long)INREG(IPEIR),
+ (unsigned long)INREG(IPEHR));
ErrorF("LP ring tail: %lx head: %lx len: %lx start %lx\n",
- INREG(LP_RING + RING_TAIL),
- INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
- INREG(LP_RING + RING_LEN), INREG(LP_RING + RING_START));
+ (unsigned long)INREG(LP_RING + RING_TAIL),
+ (unsigned long)INREG(LP_RING + RING_HEAD) & HEAD_ADDR,
+ (unsigned long)INREG(LP_RING + RING_LEN),
+ (unsigned long)INREG(LP_RING + RING_START));
ErrorF("eir: %x esr: %x emr: %x\n",
INREG16(EIR), INREG16(ESR), INREG16(EMR));
ErrorF("instdone: %x instpm: %x\n", INREG16(INST_DONE), INREG8(INST_PM));
- ErrorF("memmode: %lx instps: %lx\n", INREG(MEMMODE), INREG(INST_PS));
+ ErrorF("memmode: %lx instps: %lx\n", (unsigned long)INREG(MEMMODE),
+ (unsigned long)INREG(INST_PS));
ErrorF("hwstam: %x ier: %x imr: %x iir: %x\n",
INREG16(HWSTAM), INREG16(IER), INREG16(IMR), INREG16(IIR));
@@ -4025,17 +4064,21 @@ I830BIOSScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pI830->CloseScreen = pScreen->CloseScreen;
pScreen->CloseScreen = I830BIOSCloseScreen;
- /* Rotation */
- xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n");
- xf86DisableRandR(); /* Disable built-in RandR extension */
-
- shadowSetup(pScreen);
- /* support all rotations */
- I830RandRInit(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270);
- pI830->PointerMoved = pScrn->PointerMoved;
- pScrn->PointerMoved = I830PointerMoved;
- pI830->CreateScreenResources = pScreen->CreateScreenResources;
- pScreen->CreateScreenResources = I830CreateScreenResources;
+ if (pI830->shadowReq.minorversion >= 1) {
+ /* Rotation */
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "RandR enabled, ignore the following RandR disabled message.\n");
+ xf86DisableRandR(); /* Disable built-in RandR extension */
+ shadowSetup(pScreen);
+ /* support all rotations */
+ I830RandRInit(pScreen, RR_Rotate_0 | RR_Rotate_90 | RR_Rotate_180 | RR_Rotate_270);
+ pI830->PointerMoved = pScrn->PointerMoved;
+ pScrn->PointerMoved = I830PointerMoved;
+ pI830->CreateScreenResources = pScreen->CreateScreenResources;
+ pScreen->CreateScreenResources = I830CreateScreenResources;
+ } else {
+ /* Rotation */
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "libshadow is version %d.%d.%d, required 1.1.0 or greater for rotation.\n",pI830->shadowReq.majorversion,pI830->shadowReq.minorversion,pI830->shadowReq.patchlevel);
+ }
if (serverGeneration == 1)
xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options);
@@ -4635,7 +4678,9 @@ I830BIOSCloseScreen(int scrnIndex, ScreenPtr pScreen)
pI830->used3D = NULL;
}
- pScrn->PointerMoved = pI830->PointerMoved;
+ if (pI830->shadowReq.minorversion >= 1)
+ pScrn->PointerMoved = pI830->PointerMoved;
+
pScrn->vtSema = FALSE;
pI830->closing = FALSE;
pScreen->CloseScreen = pI830->CloseScreen;
@@ -4782,7 +4827,7 @@ I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg)
/* this avoids several BIOS calls if possible */
if (pI830->monitorSwitch != temp || pI830->monitorSwitch != pI830->toggleDevices) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Hotkey switch to 0x%lx.\n", temp);
+ "Hotkey switch to 0x%lx.\n", (unsigned long) temp);
if (pI830->AccelInfoRec && pI830->AccelInfoRec->NeedToSync) {
(*pI830->AccelInfoRec->Sync)(pScrn);
@@ -4845,7 +4890,8 @@ I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg)
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Requested display devices 0x%lx.\n", temp);
+ "Requested display devices 0x%lx.\n",
+ (unsigned long) temp);
/* If the BIOS doesn't flip between CRT, LFP and CRT+LFP we fake
@@ -4886,12 +4932,14 @@ I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg)
if (temp == pI8301->lastDevice1 || temp == pI8301->lastDevice2) {
temp = GetToggleList(pScrn, 1);
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Detected duplicate devices. Toggling (0x%lx)\n", temp);
+ "Detected duplicate devices. Toggling (0x%lx)\n",
+ (unsigned long) temp);
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"Detected display change operation (0x%x, 0x%x, 0x%lx).\n",
- pI8301->lastDevice1, pI8301->lastDevice2, temp);
+ pI8301->lastDevice1, pI8301->lastDevice2,
+ (unsigned long) temp);
/* So that if we close on the wrong config, we restore correctly */
pI830->specifiedMonitor = TRUE;
@@ -4923,10 +4971,12 @@ I830CheckDevicesTimer(OsTimerPtr timer, CARD32 now, pointer arg)
(CountBits((temp & 0xff00) >> 8) > 1)) ) {
temp = pI8301->lastDevice2 | pI8301->lastDevice1;
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Cloning failed, "
- "trying dual pipe clone mode (0x%lx)\n", temp);
+ "trying dual pipe clone mode (0x%lx)\n",
+ (unsigned long) temp);
if (!SetDisplayDevices(pScrn, temp))
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Failed to switch "
- "to configured display devices (0x%lx).\n", temp);
+ "to configured display devices (0x%lx).\n",
+ (unsigned long) temp);
else {
pI830->Clone = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Setting Clone mode\n");
diff --git a/src/i830_memory.c b/src/i830_memory.c
index 84de2c3e..433aa47d 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -54,8 +54,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <string.h>
+
#include "xf86.h"
-#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "i830.h"
@@ -1510,7 +1511,7 @@ SetFence(ScrnInfoPtr pScrn, int nr, unsigned int start, unsigned int pitch,
nr, start, pitch, size / 1024);
if (nr < 0 || nr > 7) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: fence %d out of range\n",nr);
return;
}
@@ -1523,21 +1524,21 @@ SetFence(ScrnInfoPtr pScrn, int nr, unsigned int start, unsigned int pitch,
fence_mask = ~I830_FENCE_START_MASK;
if (start & fence_mask) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: %d: start (0x%08x) is not %s aligned\n",
nr, start, (IS_I9XX(pI830)) ? "1MB" : "512k");
return;
}
if (start % size) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: %d: start (0x%08x) is not size (%dk) aligned\n",
nr, start, size / 1024);
return;
}
if (pitch & 127) {
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: %d: pitch (%d) not a multiple of 128 bytes\n",
nr, pitch);
return;
@@ -1569,7 +1570,7 @@ SetFence(ScrnInfoPtr pScrn, int nr, unsigned int start, unsigned int pitch,
val |= I915G_FENCE_SIZE_64M;
break;
default:
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: %d: illegal size (%d kByte)\n", nr, size / 1024);
return;
}
@@ -1600,7 +1601,7 @@ SetFence(ScrnInfoPtr pScrn, int nr, unsigned int start, unsigned int pitch,
val |= FENCE_SIZE_64M;
break;
default:
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: %d: illegal size (%d kByte)\n", nr, size / 1024);
return;
}
@@ -1634,7 +1635,7 @@ SetFence(ScrnInfoPtr pScrn, int nr, unsigned int start, unsigned int pitch,
val |= FENCE_PITCH_64;
break;
default:
- xf86DrvMsg(X_WARNING, pScrn->scrnIndex,
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"SetFence: %d: illegal pitch (%d)\n", nr, pitch);
return;
}
diff --git a/src/i830_modes.c b/src/i830_modes.c
index 617d1e63..16576bbe 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -38,8 +38,10 @@
#include "config.h"
#endif
+#include <stdio.h>
+#include <string.h>
+
#include "xf86.h"
-#include "xf86_ansic.h"
#include "i830.h"
extern const int i830refreshes[];
diff --git a/src/i830_rotate.c b/src/i830_rotate.c
index 364f9696..e4a80645 100644
--- a/src/i830_rotate.c
+++ b/src/i830_rotate.c
@@ -49,8 +49,9 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <string.h>
+
#include "xf86.h"
-#include "xf86_ansic.h"
#include "xf86_OSproc.h"
#include "servermd.h"
#include "shadow.h"
diff --git a/src/i830_video.c b/src/i830_video.c
index 28e95be9..afdc99aa 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -64,10 +64,12 @@ THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "config.h"
#endif
+#include <math.h>
+#include <string.h>
+
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
-#include "xf86_ansic.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"
@@ -106,7 +108,7 @@ static void I830QueryBestSize(ScrnInfoPtr, Bool,
unsigned int *, pointer);
static int I830PutImage(ScrnInfoPtr, short, short, short, short, short, short,
short, short, int, unsigned char *, short, short,
- Bool, RegionPtr, pointer);
+ Bool, RegionPtr, pointer, DrawablePtr);
static int I830QueryImageAttributes(ScrnInfoPtr, int, unsigned short *,
unsigned short *, int *, int *);
@@ -118,9 +120,9 @@ static Atom xvBrightness, xvContrast, xvColorKey, xvPipe, xvDoubleBuffer;
static Atom xvGamma0, xvGamma1, xvGamma2, xvGamma3, xvGamma4, xvGamma5;
#define IMAGE_MAX_WIDTH 1920
-#define IMAGE_MAX_HEIGHT 1080
+#define IMAGE_MAX_HEIGHT 1088
#define IMAGE_MAX_WIDTH_LEGACY 1024
-#define IMAGE_MAX_HEIGHT_LEGACY 1080
+#define IMAGE_MAX_HEIGHT_LEGACY 1088
#if !VIDEO_DEBUG
#define ErrorF Edummy
@@ -1874,7 +1876,8 @@ I830PutImage(ScrnInfoPtr pScrn,
short drw_w, short drw_h,
int id, unsigned char *buf,
short width, short height,
- Bool sync, RegionPtr clipBoxes, pointer data)
+ Bool sync, RegionPtr clipBoxes, pointer data,
+ DrawablePtr pDraw)
{
I830Ptr pI830 = I830PTR(pScrn);
I830PortPrivPtr pPriv = (I830PortPrivPtr) data;