summaryrefslogtreecommitdiff
path: root/linux/r128_state.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/r128_state.c')
-rw-r--r--linux/r128_state.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/linux/r128_state.c b/linux/r128_state.c
index c926b2e1..a7ecb861 100644
--- a/linux/r128_state.c
+++ b/linux/r128_state.c
@@ -670,7 +670,7 @@ static void r128_cce_dispatch_indirect( drm_device_t *dev,
u32 *data = (u32 *)
((char *)dev_priv->buffers->handle
+ buf->offset + start);
- data[dwords++] = R128_CCE_PACKET2;
+ data[dwords++] = cpu_to_le32( R128_CCE_PACKET2 );
}
buf_priv->dispatched = 1;
@@ -739,16 +739,16 @@ static void r128_cce_dispatch_indices( drm_device_t *dev,
data = (u32 *)((char *)dev_priv->buffers->handle
+ buf->offset + start);
- data[0] = CCE_PACKET3( R128_3D_RNDR_GEN_INDX_PRIM, dwords-2 );
+ data[0] = cpu_to_le32( CCE_PACKET3( R128_3D_RNDR_GEN_INDX_PRIM, dwords-2 ) );
- data[1] = offset;
- data[2] = R128_MAX_VB_VERTS;
- data[3] = format;
- data[4] = (prim | R128_CCE_VC_CNTL_PRIM_WALK_IND |
- (count << 16));
+ data[1] = cpu_to_le32( offset );
+ data[2] = cpu_to_le32( R128_MAX_VB_VERTS );
+ data[3] = cpu_to_le32( format );
+ data[4] = cpu_to_le32( (prim | R128_CCE_VC_CNTL_PRIM_WALK_IND |
+ (count << 16)) );
if ( count & 0x1 ) {
- data[dwords-1] &= 0x0000ffff;
+ data[dwords-1] &= cpu_to_le32( 0x0000ffff );
}
do {
@@ -856,8 +856,8 @@ static int r128_cce_dispatch_blit( drm_device_t *dev,
data = (u32 *)((char *)dev_priv->buffers->handle + buf->offset);
- data[0] = CCE_PACKET3( R128_CNTL_HOSTDATA_BLT, dwords + 6 );
- data[1] = (R128_GMC_DST_PITCH_OFFSET_CNTL |
+ data[0] = cpu_to_le32( CCE_PACKET3( R128_CNTL_HOSTDATA_BLT, dwords + 6 ) );
+ data[1] = cpu_to_le32( (R128_GMC_DST_PITCH_OFFSET_CNTL |
R128_GMC_BRUSH_NONE |
(blit->format << 8) |
R128_GMC_SRC_DATATYPE_COLOR |
@@ -865,14 +865,14 @@ static int r128_cce_dispatch_blit( drm_device_t *dev,
R128_DP_SRC_SOURCE_HOST_DATA |
R128_GMC_CLR_CMP_CNTL_DIS |
R128_GMC_AUX_CLIP_DIS |
- R128_GMC_WR_MSK_DIS);
+ R128_GMC_WR_MSK_DIS) );
- data[2] = (blit->pitch << 21) | (blit->offset >> 5);
+ data[2] = cpu_to_le32( (blit->pitch << 21) | (blit->offset >> 5) );
data[3] = 0xffffffff;
data[4] = 0xffffffff;
- data[5] = (blit->y << 16) | blit->x;
- data[6] = (blit->height << 16) | blit->width;
- data[7] = dwords;
+ data[5] = cpu_to_le32( (blit->y << 16) | blit->x );
+ data[6] = cpu_to_le32( (blit->height << 16) | blit->width );
+ data[7] = cpu_to_le32( dwords );
buf->used = (dwords + 8) * sizeof(u32);