summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/radeon.h8
-rw-r--r--src/radeon_dri.c16
-rw-r--r--src/radeon_video.c5
3 files changed, 14 insertions, 15 deletions
diff --git a/src/radeon.h b/src/radeon.h
index e45ade1..7f1e0ad 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -541,20 +541,20 @@ typedef struct {
drm_handle_t ringHandle; /* Handle from drmAddMap */
drmSize ringMapSize; /* Size of map */
int ringSize; /* Size of ring (in MB) */
- unsigned char *ring; /* Map */
+ drmAddress ring; /* Map */
int ringSizeLog2QW;
unsigned long ringReadOffset; /* Offset into GART space */
drm_handle_t ringReadPtrHandle; /* Handle from drmAddMap */
drmSize ringReadMapSize; /* Size of map */
- unsigned char *ringReadPtr; /* Map */
+ drmAddress ringReadPtr; /* Map */
/* CP vertex/indirect buffer data */
unsigned long bufStart; /* Offset into GART space */
drm_handle_t bufHandle; /* Handle from drmAddMap */
drmSize bufMapSize; /* Size of map */
int bufSize; /* Size of buffers (in MB) */
- unsigned char *buf; /* Map */
+ drmAddress buf; /* Map */
int bufNumBufs; /* Number of buffers */
drmBufMapPtr buffers; /* Buffer map */
@@ -563,7 +563,7 @@ typedef struct {
drm_handle_t gartTexHandle; /* Handle from drmAddMap */
drmSize gartTexMapSize; /* Size of map */
int gartTexSize; /* Size of GART tex space (in MB) */
- unsigned char *gartTex; /* Map */
+ drmAddress gartTex; /* Map */
int log2GARTTexGran;
/* CP accleration */
diff --git a/src/radeon_dri.c b/src/radeon_dri.c
index 3e789f9..bbc858a 100644
--- a/src/radeon_dri.c
+++ b/src/radeon_dri.c
@@ -837,7 +837,7 @@ static Bool RADEONDRIAgpInit(RADEONInfoPtr info, ScreenPtr pScreen)
"[agp] ring handle = 0x%08x\n", info->ringHandle);
if (drmMap(info->drmFD, info->ringHandle, info->ringMapSize,
- (drmAddressPtr)&info->ring) < 0) {
+ &info->ring) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR, "[agp] Could not map ring\n");
return FALSE;
}
@@ -856,7 +856,7 @@ static Bool RADEONDRIAgpInit(RADEONInfoPtr info, ScreenPtr pScreen)
info->ringReadPtrHandle);
if (drmMap(info->drmFD, info->ringReadPtrHandle, info->ringReadMapSize,
- (drmAddressPtr)&info->ringReadPtr) < 0) {
+ &info->ringReadPtr) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[agp] Could not map ring read ptr\n");
return FALSE;
@@ -876,7 +876,7 @@ static Bool RADEONDRIAgpInit(RADEONInfoPtr info, ScreenPtr pScreen)
info->bufHandle);
if (drmMap(info->drmFD, info->bufHandle, info->bufMapSize,
- (drmAddressPtr)&info->buf) < 0) {
+ &info->buf) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[agp] Could not map vertex/indirect buffers\n");
return FALSE;
@@ -896,7 +896,7 @@ static Bool RADEONDRIAgpInit(RADEONInfoPtr info, ScreenPtr pScreen)
info->gartTexHandle);
if (drmMap(info->drmFD, info->gartTexHandle, info->gartTexMapSize,
- (drmAddressPtr)&info->gartTex) < 0) {
+ &info->gartTex) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[agp] Could not map GART texture map\n");
return FALSE;
@@ -940,7 +940,7 @@ static Bool RADEONDRIPciInit(RADEONInfoPtr info, ScreenPtr pScreen)
"[pci] ring handle = 0x%08x\n", info->ringHandle);
if (drmMap(info->drmFD, info->ringHandle, info->ringMapSize,
- (drmAddressPtr)&info->ring) < 0) {
+ &info->ring) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR, "[pci] Could not map ring\n");
return FALSE;
}
@@ -962,7 +962,7 @@ static Bool RADEONDRIPciInit(RADEONInfoPtr info, ScreenPtr pScreen)
info->ringReadPtrHandle);
if (drmMap(info->drmFD, info->ringReadPtrHandle, info->ringReadMapSize,
- (drmAddressPtr)&info->ringReadPtr) < 0) {
+ &info->ringReadPtr) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[pci] Could not map ring read ptr\n");
return FALSE;
@@ -985,7 +985,7 @@ static Bool RADEONDRIPciInit(RADEONInfoPtr info, ScreenPtr pScreen)
info->bufHandle);
if (drmMap(info->drmFD, info->bufHandle, info->bufMapSize,
- (drmAddressPtr)&info->buf) < 0) {
+ &info->buf) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[pci] Could not map vertex/indirect buffers\n");
return FALSE;
@@ -1008,7 +1008,7 @@ static Bool RADEONDRIPciInit(RADEONInfoPtr info, ScreenPtr pScreen)
info->gartTexHandle);
if (drmMap(info->drmFD, info->gartTexHandle, info->gartTexMapSize,
- (drmAddressPtr)&info->gartTex) < 0) {
+ &info->gartTex) < 0) {
xf86DrvMsg(pScreen->myNum, X_ERROR,
"[pci] Could not map GART texture map\n");
return FALSE;
diff --git a/src/radeon_video.c b/src/radeon_video.c
index 30f3bef..e9e503f 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -2159,10 +2159,9 @@ RADEONCopyRGB24Data(
{
sptr = src;
- for ( i = 0 ; i < w; i++ )
+ for ( i = 0 ; i < w; i++, sptr += 3 )
{
- *dptr++ = ( ( *sptr++ ) << 24 ) | ( ( *sptr++ ) << 16 ) |
- ( *sptr++ );
+ *dptr++ = (sptr[0] << 24) | (sptr[1] << 16) | sptr[2];
}
src += hpass * srcPitch;