[PATCH r128 4/6] Cleanup info struct
Connor Behan
connor.behan at gmail.com
Wed Jul 16 18:34:55 PDT 2014
This removes some dead code from info. It also fixes some indentation
errors that were likely caused by sed.
Signed-off-by: Connor Behan <connor.behan at gmail.com>
---
src/r128.h | 35 +++++++++++------------------------
src/r128_dri.c | 6 ------
src/r128_driver.c | 13 -------------
3 files changed, 11 insertions(+), 43 deletions(-)
diff --git a/src/r128.h b/src/r128.h
index 0308130..b9fcc0a 100644
--- a/src/r128.h
+++ b/src/r128.h
@@ -296,7 +296,6 @@ typedef struct {
PCITAG PciTag;
#endif
int Chipset;
- Bool Primary;
Bool FBDev;
@@ -306,27 +305,20 @@ typedef struct {
void *MMIO; /* Map of MMIO region */
void *FB; /* Map of frame buffer */
+ CARD8 *VBIOS; /* Video BIOS for mode validation on FPs */
+ int FPBIOSstart; /* Start of the flat panel info */
CARD32 MemCntl;
CARD32 BusCntl;
unsigned long FbMapSize; /* Size of frame buffer, in bytes */
- int Flags; /* Saved copy of mode flags */
CARD8 BIOSDisplay; /* Device the BIOS is set to display to */
Bool HasPanelRegs; /* Current chip can connect to a FP */
- CARD8 *VBIOS; /* Video BIOS for mode validation on FPs */
- int FPBIOSstart; /* Start of the flat panel info */
/* Computed values for FPs */
int PanelXRes;
int PanelYRes;
- int HOverPlus;
- int HSyncWidth;
- int HBlank;
- int VOverPlus;
- int VSyncWidth;
- int VBlank;
int PanelPwrDly;
R128PLLRec pll;
@@ -343,7 +335,6 @@ typedef struct {
XAAInfoRecPtr accel;
#endif
Bool accelOn;
-
Bool useEXA;
Bool RenderAccel;
#ifdef USE_EXA
@@ -352,10 +343,6 @@ typedef struct {
struct r128_2d_state state_2d;
#endif
- xf86CursorInfoPtr cursor;
- unsigned long cursor_start;
- unsigned long cursor_end;
-
/*
* XAAForceTransBlit is used to change the behavior of the XAA
* SetupForScreenToScreenCopy function, to make it DGA-friendly.
@@ -405,19 +392,19 @@ typedef struct {
Bool directRenderingEnabled;
DRIInfoPtr pDRIInfo;
int drmFD;
- drm_context_t drmCtx;
+ drm_context_t drmCtx;
int numVisualConfigs;
__GLXvisualConfig *pVisualConfigs;
R128ConfigPrivPtr pVisualConfigsPriv;
- drm_handle_t fbHandle;
+ drm_handle_t fbHandle;
drmSize registerSize;
- drm_handle_t registerHandle;
+ drm_handle_t registerHandle;
Bool IsPCI; /* Current card is a PCI card */
drmSize pciSize;
- drm_handle_t pciMemHandle;
+ drm_handle_t pciMemHandle;
drmAddress PCI; /* Map */
Bool allowPageFlip; /* Enable 3d page flipping */
@@ -425,7 +412,7 @@ typedef struct {
int drmMinor;
drmSize agpSize;
- drm_handle_t agpMemHandle; /* Handle from drmAgpAlloc */
+ drm_handle_t agpMemHandle; /* Handle from drmAgpAlloc */
unsigned long agpOffset;
drmAddress AGP; /* Map */
int agpMode;
@@ -438,20 +425,20 @@ typedef struct {
/* CCE ring buffer data */
unsigned long ringStart; /* Offset into AGP space */
- drm_handle_t ringHandle; /* Handle from drmAddMap */
+ drm_handle_t ringHandle; /* Handle from drmAddMap */
drmSize ringMapSize; /* Size of map */
int ringSize; /* Size of ring (in MB) */
drmAddress ring; /* Map */
int ringSizeLog2QW;
unsigned long ringReadOffset; /* Offset into AGP space */
- drm_handle_t ringReadPtrHandle; /* Handle from drmAddMap */
+ drm_handle_t ringReadPtrHandle;/* Handle from drmAddMap */
drmSize ringReadMapSize; /* Size of map */
drmAddress ringReadPtr; /* Map */
/* CCE vertex/indirect buffer data */
unsigned long bufStart; /* Offset into AGP space */
- drm_handle_t bufHandle; /* Handle from drmAddMap */
+ drm_handle_t bufHandle; /* Handle from drmAddMap */
drmSize bufMapSize; /* Size of map */
int bufSize; /* Size of buffers (in MB) */
drmAddress buf; /* Map */
@@ -460,7 +447,7 @@ typedef struct {
/* CCE AGP Texture data */
unsigned long agpTexStart; /* Offset into AGP space */
- drm_handle_t agpTexHandle; /* Handle from drmAddMap */
+ drm_handle_t agpTexHandle; /* Handle from drmAddMap */
drmSize agpTexMapSize; /* Size of map */
int agpTexSize; /* Size of AGP tex space (in MB) */
drmAddress agpTex; /* Map */
diff --git a/src/r128_dri.c b/src/r128_dri.c
index 2c905a4..f924331 100644
--- a/src/r128_dri.c
+++ b/src/r128_dri.c
@@ -1525,9 +1525,6 @@ static void R128DRITransitionTo3d(ScreenPtr pScreen)
R128EnablePageFlip(pScreen);
info->have3DWindows = 1;
-
- if (info->cursor_start)
- xf86ForceHWCursor(pScreen, TRUE);
}
static void R128DRITransitionTo2d(ScreenPtr pScreen)
@@ -1550,7 +1547,4 @@ static void R128DRITransitionTo2d(ScreenPtr pScreen)
}
info->have3DWindows = 0;
-
- if (info->cursor_start)
- xf86ForceHWCursor(pScreen, FALSE);
}
diff --git a/src/r128_driver.c b/src/r128_driver.c
index 3cd3773..d17951d 100644
--- a/src/r128_driver.c
+++ b/src/r128_driver.c
@@ -2238,9 +2238,6 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
if (R128CursorInit(pScreen)) {
int width, height;
- xf86DrvMsg(pScrn->scrnIndex, X_INFO,
- "Using hardware cursor (scanline %ld)\n",
- info->cursor_start / pScrn->displayWidth);
if (xf86QueryLargestOffscreenArea(pScreen, &width, &height,
0, 0, 0)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -2253,7 +2250,6 @@ Bool R128ScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
}
} else {
- info->cursor_start = 0;
xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using software cursor\n");
}
@@ -3064,12 +3060,6 @@ Bool R128InitCrtcRegisters(ScrnInfoPtr pScrn, R128SavePtr save,
mode->HDisplay = mode->CrtcHDisplay = info->PanelXRes;
if(info->PanelYRes < mode->CrtcVDisplay)
mode->VDisplay = mode->CrtcVDisplay = info->PanelYRes;
- mode->CrtcHTotal = mode->CrtcHDisplay + info->HBlank;
- mode->CrtcHSyncStart = mode->CrtcHDisplay + info->HOverPlus;
- mode->CrtcHSyncEnd = mode->CrtcHSyncStart + info->HSyncWidth;
- mode->CrtcVTotal = mode->CrtcVDisplay + info->VBlank;
- mode->CrtcVSyncStart = mode->CrtcVDisplay + info->VOverPlus;
- mode->CrtcVSyncEnd = mode->CrtcVSyncStart + info->VSyncWidth;
}
save->crtc_h_total_disp = ((((mode->CrtcHTotal / 8) - 1) & 0xffff)
@@ -3834,9 +3824,6 @@ static Bool R128CloseScreen(CLOSE_SCREEN_ARGS_DECL)
if (info->scratch_save) free(info->scratch_save);
info->scratch_save = NULL;
- if (info->cursor) xf86DestroyCursorInfoRec(info->cursor);
- info->cursor = NULL;
-
if (info->DGAModes) free(info->DGAModes);
info->DGAModes = NULL;
--
2.0.0
More information about the xorg-driver-ati
mailing list