summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@fairlite.demon.co.uk>2006-07-11 07:41:27 +0100
committerAlan Hourihane <alanh@fairlite.demon.co.uk>2006-07-11 07:41:27 +0100
commit8a44a7acfcadbba2410dca750afc9d32bc83706e (patch)
tree6b005487a44aea7d973d08845280faf4402db5bd
parent584b544987be5cf23dce29ddaf3130e59cfe6fa8 (diff)
parente7723a4e5725147d3bd9ba22c5a3314b0556e440 (diff)
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-intel
-rw-r--r--configure.ac12
-rw-r--r--src/common.h15
-rw-r--r--src/i810_dri.c4
-rw-r--r--src/i830.h10
-rw-r--r--src/i830_dri.c16
-rw-r--r--src/i830_randr.c1
6 files changed, 43 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index a5f8e77f..82d3e55f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,6 +89,18 @@ if test x$DRI = xauto; then
fi
AC_MSG_RESULT([$DRI])
+dnl Use lots of warning flags with GCC
+
+WARN_CFLAGS=""
+
+if test "x$GCC" = "xyes"; then
+ WARN_CFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wnested-externs -fno-strict-aliasing"
+fi
+
+CFLAGS="$CFLAGS $WARN_CFLAGS"
+
AM_CONDITIONAL(DRI, test x$DRI = xyes)
if test "$DRI" = yes; then
PKG_CHECK_MODULES(DRI, [libdrm >= 2.0 xf86driproto])
diff --git a/src/common.h b/src/common.h
index a6e4ca3e..31e67b90 100644
--- a/src/common.h
+++ b/src/common.h
@@ -39,13 +39,18 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef _INTEL_COMMON_H_
#define _INTEL_COMMON_H_
-#ifdef __GNUC__
+/* Provide substitutes for gcc's __FUNCTION__ on other compilers */
+#ifndef __GNUC__
+# if defined(__STDC__) && (__STDC_VERSION__>=199901L) /* C99 */
+# define __FUNCTION__ __func__
+# else
+# define __FUNCTION__ ""
+# endif
+#endif
+
+
#define PFX __FILE__,__LINE__,__FUNCTION__
#define FUNCTION_NAME __FUNCTION__
-#else
-#define PFX __FILE__,__LINE__,""
-#define FUNCTION_NAME ""
-#endif
#ifdef I830DEBUG
#define MARKER() ErrorF("\n### %s:%d: >>> %s <<< ###\n\n", \
diff --git a/src/i810_dri.c b/src/i810_dri.c
index 8c05980d..a8c10ffc 100644
--- a/src/i810_dri.c
+++ b/src/i810_dri.c
@@ -492,7 +492,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08x\n",
- pI810DRI->regs);
+ (int)pI810DRI->regs);
pI810->backHandle = DRM_AGP_NO_HANDLE;
pI810->zHandle = DRM_AGP_NO_HANDLE;
@@ -532,7 +532,7 @@ I810DRIScreenInit(ScreenPtr pScreen)
pI810->dcacheHandle = dcacheHandle;
xf86DrvMsg(pScreen->myNum, X_INFO, "[agp] dcacheHandle : 0x%x\n",
- dcacheHandle);
+ (int)dcacheHandle);
#define Elements(x) sizeof(x)/sizeof(*x)
for (pitch_idx = 0; pitch_idx < Elements(i810_pitches); pitch_idx++)
diff --git a/src/i830.h b/src/i830.h
index ac95e369..79eb3101 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -474,6 +474,16 @@ extern Bool I830CheckModeSupport(ScrnInfoPtr pScrn, int x, int y, int mode);
extern Bool I830Rotate(ScrnInfoPtr pScrn, DisplayModePtr mode);
extern Bool I830FixOffset(ScrnInfoPtr pScrn, I830MemRange *mem);
+/* i830_memory.c */
+Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
+Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
+
+/* i830_randr.c */
+Bool I830RandRInit(ScreenPtr pScreen, int rotation);
+Bool I830RandRSetConfig(ScreenPtr pScreen, Rotation rotation, int rate,
+ RRScreenSizePtr pSize);
+Rotation I830GetRotation(ScreenPtr pScreen);
+
/*
* 12288 is set as the maximum, chosen because it is enough for
* 1920x1440@32bpp with a 2048 pixel line pitch with some to spare.
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 6f9a3ee1..7c5f7956 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -104,7 +104,9 @@ static void I830DRITransitionTo3d(ScreenPtr pScreen);
static void I830DRITransitionMultiToSingle3d(ScreenPtr pScreen);
static void I830DRITransitionSingleToMulti3d(ScreenPtr pScreen);
+#if 0
static void I830DRIShadowUpdate (ScreenPtr pScreen, shadowBufPtr pBuf);
+#endif
extern void GlxSetVisualConfigs(int nconfigs,
__GLXvisualConfig * configs,
@@ -487,7 +489,7 @@ I830DRIScreenInit(ScreenPtr pScreen)
pDRIInfo->ddxDriverMinorVersion = I830_MINOR_VERSION;
pDRIInfo->ddxDriverPatchVersion = I830_PATCHLEVEL;
#if 1 /* temporary until this gets removed from the libdri layer */
- pDRIInfo->frameBufferPhysicalAddress = (pointer) pI830->LinearAddr +
+ pDRIInfo->frameBufferPhysicalAddress = (char *) pI830->LinearAddr +
pI830->FrontBuffer.Start;
pDRIInfo->frameBufferSize = ROUND_TO_PAGE(pScrn->displayWidth *
pScrn->virtualY * pI830->cpp);
@@ -635,7 +637,7 @@ I830DRIMapScreenRegions(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
return FALSE;
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Front Buffer = 0x%08x\n",
- sarea->front_handle);
+ (int)sarea->front_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)(sarea->back_offset + pI830->LinearAddr),
@@ -647,7 +649,7 @@ I830DRIMapScreenRegions(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
return FALSE;
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Back Buffer = 0x%08x\n",
- sarea->back_handle);
+ (int)sarea->back_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)sarea->depth_offset + pI830->LinearAddr,
@@ -659,7 +661,7 @@ I830DRIMapScreenRegions(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
return FALSE;
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] Depth Buffer = 0x%08x\n",
- sarea->depth_handle);
+ (int)sarea->depth_handle);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)sarea->tex_offset + pI830->LinearAddr,
@@ -671,7 +673,7 @@ I830DRIMapScreenRegions(ScrnInfoPtr pScrn, drmI830Sarea *sarea)
return FALSE;
}
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "[drm] textures = 0x%08x\n",
- sarea->tex_handle);
+ (int)sarea->tex_handle);
return TRUE;
}
@@ -746,7 +748,7 @@ I830DRIDoMappings(ScreenPtr pScreen)
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] Registers = 0x%08x\n",
- pI830DRI->regs);
+ (int)pI830DRI->regs);
if (drmAddMap(pI830->drmSubFD,
(drm_handle_t)pI830->LpRing->mem.Start + pI830->LinearAddr,
@@ -758,7 +760,7 @@ I830DRIDoMappings(ScreenPtr pScreen)
return FALSE;
}
xf86DrvMsg(pScreen->myNum, X_INFO, "[drm] ring buffer = 0x%08x\n",
- pI830->ring_map);
+ (int)pI830->ring_map);
if (!I830InitDma(pScrn)) {
DRICloseScreen(pScreen);
diff --git a/src/i830_randr.c b/src/i830_randr.c
index be790c9a..0311f2b6 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -313,7 +313,6 @@ I830RandRInit (ScreenPtr pScreen, int rotation)
{
rrScrPrivPtr rp;
XF86RandRInfoPtr randrp;
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
#ifdef PANORAMIX
/* XXX disable RandR when using Xinerama */