xf86-video-intel: Branch 'modesetting' - 3 commits - configure.ac src/i810_dri.c src/i830_debug.c src/i830_display.c src/i830_dri.c src/i830_driver.c src/i830.h src/i830_modes.c src/i830_sdvo.c
Eric Anholt
anholt at kemper.freedesktop.org
Mon Jun 26 17:02:30 EEST 2006
configure.ac | 16 ++++++++++++----
src/i810_dri.c | 4 ++--
src/i830.h | 21 +++++++++++++--------
src/i830_debug.c | 2 +-
src/i830_display.c | 2 +-
src/i830_dri.c | 14 +++++++-------
src/i830_driver.c | 5 +++--
src/i830_modes.c | 9 +++++----
src/i830_sdvo.c | 7 ++++---
9 files changed, 48 insertions(+), 32 deletions(-)
New commits:
diff-tree 7104b915da412a26661bab7b5a940e935e8cbc8a (from 21dc3edfc41987bb8cf0f8d265fba9775cbe8cdb)
Author: Eric Anholt <anholt at FreeBSD.org>
Date: Mon Jun 26 15:11:13 2006 +0200
Clean up warnings.
diff --git a/src/i830_debug.c b/src/i830_debug.c
index 6d43cd6..e2a28b2 100644
--- a/src/i830_debug.c
+++ b/src/i830_debug.c
@@ -32,8 +32,8 @@
#include "xf86.h"
#include "xf86_ansic.h"
#include "i830.h"
+#include "i830_debug.h"
-/* XXX: What was the syntax for sticking quotes around the "reg" argument? */
#define DEFINEREG(reg) \
{ reg, #reg, 0 }
diff --git a/src/i830_display.c b/src/i830_display.c
index 05b7655..1391c28 100644
--- a/src/i830_display.c
+++ b/src/i830_display.c
@@ -919,7 +919,7 @@ i830LoadDetectCRT(ScrnInfoPtr pScrn)
* This takes approximately 5ms in testing on an i915GM, with CRT connected or
* not.
*/
-Bool
+static Bool
i830DDCDetectCRT(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 7af5fb7..6b7dfc7 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1101,7 +1101,7 @@ I830SetupOutputBusses(ScrnInfoPtr pScrn)
pI830->num_outputs = i;
}
-void
+static void
I830PreInitDDC(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
@@ -1128,7 +1128,8 @@ I830PreInitDDC(ScrnInfoPtr pScrn)
}
}
-void I830DetectMonitors(ScrnInfoPtr pScrn)
+static void
+I830DetectMonitors(ScrnInfoPtr pScrn)
{
I830Ptr pI830 = I830PTR(pScrn);
int i;
diff --git a/src/i830_modes.c b/src/i830_modes.c
index a43fa61..6ee1a94 100644
--- a/src/i830_modes.c
+++ b/src/i830_modes.c
@@ -181,7 +181,7 @@ I830DuplicateMode(DisplayModePtr pMode)
/* This function will sort all modes according to their resolution.
* Highest resolution first.
*/
-void
+static void
I830xf86SortModes(DisplayModePtr new, DisplayModePtr *first,
DisplayModePtr *last)
{
@@ -246,7 +246,8 @@ I830GetVESAEstablishedMode(ScrnInfoPtr p
return NULL;
}
-DisplayModePtr I830GetDDCModes(ScrnInfoPtr pScrn, xf86MonPtr ddc)
+static DisplayModePtr
+I830GetDDCModes(ScrnInfoPtr pScrn, xf86MonPtr ddc)
{
DisplayModePtr last = NULL;
DisplayModePtr new = NULL;
@@ -438,7 +439,7 @@ i830FPNativeMode(ScrnInfoPtr pScrn)
*
* \return doubly-linked list of modes.
*/
-DisplayModePtr
+static DisplayModePtr
i830GetLVDSModes(ScrnInfoPtr pScrn, char **ppModeName)
{
I830Ptr pI830 = I830PTR(pScrn);
@@ -541,7 +542,7 @@ i830GetLVDSModes(ScrnInfoPtr pScrn, char
* it into the doubly-linked modeList. We don't need to filter, because the
* eventual call to xf86ValidateModes will do this for us. I think.
*/
-int
+static int
I830InjectProbedModes(ScrnInfoPtr pScrn, DisplayModePtr *modeList,
DisplayModePtr addModes)
{
diff --git a/src/i830_sdvo.c b/src/i830_sdvo.c
index 06840ef..9a18f57 100644
--- a/src/i830_sdvo.c
+++ b/src/i830_sdvo.c
@@ -31,6 +31,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "xf86_OSproc.h"
#include "compiler.h"
#include "i830.h"
+#include "i830_display.h"
#include "i830_sdvo_regs.h"
CARD16 curr_table[6];
@@ -170,7 +171,7 @@ I830SDVOReadInputRegs(I830SDVOPtr s)
* PROM. It resets from the DDC bus back to internal registers at the next I2C
* STOP. PROM access is terminated by accessing an internal register.
*/
-Bool
+static Bool
I830SDVOSetControlBusSwitch(I830SDVOPtr s, CARD8 target)
{
memset(s->sdvo_regs, 0, 9);
@@ -277,7 +278,7 @@ I830SDVOSetTargetOutput(I830SDVOPtr s, B
}
/* Fetches either input or output timings to *dtd, depending on cmd. */
-Bool
+static Bool
I830SDVOGetTimings(I830SDVOPtr s, i830_sdvo_dtd *dtd, CARD8 cmd)
{
memset(s->sdvo_regs, 0, 9);
@@ -312,7 +313,7 @@ I830SDVOGetTimings(I830SDVOPtr s, i830_s
}
/* Sets either input or output timings to *dtd, depending on cmd. */
-Bool
+static Bool
I830SDVOSetTimings(I830SDVOPtr s, i830_sdvo_dtd *dtd, CARD8 cmd)
{
memset(s->sdvo_regs, 0, 9);
diff-tree 21dc3edfc41987bb8cf0f8d265fba9775cbe8cdb (from parents)
Merge: f113e9002cf53510e30984f816d44b06f1e71216 5111b883480a5a9cc82200f2684cba67b515aa73
Author: Eric Anholt <anholt at FreeBSD.org>
Date: Mon Jun 26 15:06:42 2006 +0200
Merge branch 'master' into modesetting
Conflicts:
src/i830.h
diff --cc src/i830.h
index b3a0895,5315dff..11015bf
@@@ -587,21 -469,18 +587,26 @@@
-extern int I830GetBestRefresh(ScrnInfoPtr pScrn, int refresh);
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);
- extern Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
- extern Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
- extern Bool I830RandRSetConfig(ScreenPtr pScreen, Rotation rotation,
- int rate, RRScreenSizePtr pSize);
- extern Rotation I830GetRotation(ScreenPtr pScreen);
- extern Bool I830RandRInit(ScreenPtr pScreen, int rotation);
+extern Bool I830I2CInit(ScrnInfoPtr pScrn, I2CBusPtr *bus_ptr, int i2c_reg,
+ char *name);
- /* i830_modes.c */
- int I830ValidateXF86ModeList(ScrnInfoPtr pScrn, Bool first_time);
+
+ /* i830_memory.c */
+ Bool I830BindAGPMemory(ScrnInfoPtr pScrn);
+ Bool I830UnbindAGPMemory(ScrnInfoPtr pScrn);
+/* i830_gtf.c */
+DisplayModePtr i830GetGTF(int h_pixels, int v_lines, float freq,
+ int interlaced, int margins);
+
++/* i830_modes.c */
++int I830ValidateXF86ModeList(ScrnInfoPtr pScrn, Bool first_time);
++
+ /* 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 at 32bpp with a 2048 pixel line pitch with some to spare.
diff-tree 5111b883480a5a9cc82200f2684cba67b515aa73 (from f2967a2f5f47b636b2445fa69dbc3ec79e065c90)
Author: Eric Anholt <anholt at FreeBSD.org>
Date: Mon Jun 26 14:53:10 2006 +0200
Turn on extra warning flags for GCC, and clean up the resulting fallout.
diff --git a/configure.ac b/configure.ac
index a5f8e77..82d3e55 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/i810_dri.c b/src/i810_dri.c
index 8c05980..a8c10ff 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 d227662..5315dff 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -471,6 +471,16 @@ extern Bool I830CheckModeSupport(ScrnInf
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 at 32bpp with a 2048 pixel line pitch with some to spare.
diff --git a/src/i830_dri.c b/src/i830_dri.c
index 13d2cfd..52c83cf 100644
--- a/src/i830_dri.c
+++ b/src/i830_dri.c
@@ -104,7 +104,9 @@ static void I830DRITransitionTo3d(Screen
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 pScr
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 pScr
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 pScr
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 pScr
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 be790c9..0311f2b 100644
--- a/src/i830_randr.c
+++ b/src/i830_randr.c
@@ -313,7 +313,6 @@ I830RandRInit (ScreenPtr pScreen, int
{
rrScrPrivPtr rp;
XF86RandRInfoPtr randrp;
- ScrnInfoPtr scrp = XF86SCRNINFO(pScreen);
#ifdef PANORAMIX
/* XXX disable RandR when using Xinerama */
More information about the xorg-commit
mailing list