xserver/hw/kdrive/i810 i810.c, 1.6, 1.7 i810.h, 1.3, 1.4 i810_cursor.c, 1.5, 1.6
Eric Anholt <xserver-commit-u7BhqnqprCWvj1b/[email protected]> Thu, 9 Jun 2005 16:22:56 -0700 (PDT)
| Newsgroups | gmane.comp.freedesktop.xserver.cvs |
|---|---|
| Message-ID | <[email protected]> |
Committed by: anholt
Update of /cvs/xserver/xserver/hw/kdrive/i810
In directory gabe:/tmp/cvs-serv11124/hw/kdrive/i810
Modified Files:
i810.c i810.h i810_cursor.c
Log Message:
Perform a warnings sweep on hw/kdrive. A number of these were my fault,
but some come from others.
Index: i810.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/i810/i810.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- i810.c 9 Jun 2005 10:44:45 -0000 1.6
+++ i810.c 9 Jun 2005 23:22:54 -0000 1.7
@@ -47,14 +47,13 @@
#endif
#include "kdrive.h"
#include "kxv.h"
+#include "klinux.h"
#include "i810.h"
#include "agp.h"
#include "i810draw.h"
-Bool i810InitVideo(ScreenPtr pScreen);
-
#ifndef I810_DEBUG
int I810_DEBUG = (0
/* | DEBUG_ALWAYS_SYNC */
@@ -137,8 +136,6 @@
{
unsigned long *p;
- unsigned char *LinuxGetPciCfg(KdCardAttr *attr);
-
if (!(p= (unsigned long *) LinuxGetPciCfg(&card->attr)))
return FALSE;
Index: i810.h
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/i810/i810.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- i810.h 9 Jun 2005 10:44:45 -0000 1.3
+++ i810.h 9 Jun 2005 23:22:54 -0000 1.4
@@ -435,6 +435,9 @@
void
i810VGAGetIOBase(i810VGAPtr vgap);
+Bool
+i810InitVideo(ScreenPtr pScreen);
+
/*
* MMIO versions of the register access functions. These require
* hwp->MemBase to be set in such a way that when the standard VGA port
Index: i810_cursor.c
===================================================================
RCS file: /cvs/xserver/xserver/hw/kdrive/i810/i810_cursor.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- i810_cursor.c 11 Sep 2003 05:12:51 -0000 1.5
+++ i810_cursor.c 9 Jun 2005 23:22:54 -0000 1.6
@@ -79,20 +79,23 @@
#include "i810.h"
#include "cursorstr.h"
-#define SetupCursor(s) KdScreenPriv(s); \
+#define SetupCursor(s) KdScreenPriv(pScreen); \
i810CardInfo(pScreenPriv); \
i810ScreenInfo(pScreenPriv); \
i810Cursor *pCurPriv = &i810s->cursor
static void
-writeStandardMMIO(I810CardInfo *i810c, int addr, CARD8 val) {
+writeStandardMMIO(I810CardInfo *i810c, int addr, CARD8 val)
+{
moutb(addr, val);
}
-void
-_i810MoveCursor(ScreenPtr pScreen, int x, int y) {
- SetupCursor(pScreen);
+static void
+_i810MoveCursor(ScreenPtr pScreen, int x, int y)
+{
+ KdScreenPriv(pScreen);
+ i810CardInfo(pScreenPriv);
int flag;
if (I810_DEBUG & DEBUG_VERBOSE_CURSOR)
@@ -128,7 +131,9 @@
static void
i810MoveCursor (ScreenPtr pScreen, int x, int y)
{
- SetupCursor (pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
if (!pCurPriv->has_cursor)
return;
@@ -142,9 +147,11 @@
}
static void
-_i810SetCursorColors(ScreenPtr pScreen) { /* int bg, int fg */
+_i810SetCursorColors(ScreenPtr pScreen)
+{
- SetupCursor(pScreen);
+ KdScreenPriv(pScreen);
+ i810CardInfo(pScreenPriv);
int tmp;
int bg = 0xffffff;
@@ -176,12 +183,11 @@
v = ((v & 0x0f0f0f0f) << 4) | ((v >> 4) & 0x0f0f0f0f); \
}
-static void i810LoadCursor(ScreenPtr pScreen, int x, int y) {
-
+static void i810LoadCursor(ScreenPtr pScreen, int x, int y)
+{
SetupCursor(pScreen);
- int w, h;
- unsigned short r;
+ int h;
unsigned int *msk, *mskLine, *src, *srcLine;
int i, j;
@@ -219,7 +225,7 @@
for (j = 0; j < I810_CURSOR_WIDTH / 32; j++) {
- unsigned long m, s, b1, b2;
+ unsigned long m, s;
if (i < h && j < src_width)
{
@@ -261,9 +267,10 @@
}
static void
-i810UnloadCursor(ScreenPtr pScreen) {
-
- SetupCursor(pScreen);
+i810UnloadCursor(ScreenPtr pScreen)
+{
+ KdScreenPriv(pScreen);
+ i810CardInfo(pScreenPriv);
unsigned char tmp;
@@ -276,7 +283,9 @@
static Bool
i810RealizeCursor (ScreenPtr pScreen, CursorPtr pCursor)
{
- SetupCursor(pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
if (!pScreenPriv->enabled)
return TRUE;
@@ -304,7 +313,9 @@
static void
i810SetCursor (ScreenPtr pScreen, CursorPtr pCursor, int x, int y)
{
- SetupCursor(pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
pCurPriv->pCursor = pCursor;
@@ -329,7 +340,9 @@
unsigned short *pwidth, unsigned short *pheight,
ScreenPtr pScreen)
{
- SetupCursor (pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
switch (class)
{
@@ -352,8 +365,10 @@
Bool
i810CursorInit(ScreenPtr pScreen)
{
-
- SetupCursor(pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810CardInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
if (!i810c->CursorStart) {
pCurPriv->has_cursor = FALSE;
@@ -375,7 +390,9 @@
void
i810CursorEnable (ScreenPtr pScreen)
{
- SetupCursor (pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
if (pCurPriv->has_cursor)
{
@@ -394,7 +411,9 @@
void
i810CursorDisable (ScreenPtr pScreen)
{
- SetupCursor (pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
if (!pScreenPriv->enabled)
return;
@@ -411,7 +430,9 @@
void
i810CursorFini (ScreenPtr pScreen)
{
- SetupCursor (pScreen);
+ KdScreenPriv(pScreen);
+ i810ScreenInfo(pScreenPriv);
+ i810Cursor *pCurPriv = &i810s->cursor;
pCurPriv->pCursor = NULL;
}