#include "r128_dri.h"
#include "r128_macros.h"
#include "r128_reg.h"
-#include "r128_sarea.h"
#include "r128_version.h"
+#include "r128_drm.h"
/* ?? HACK - for now, put this here... */
{
R128InfoPtr info = ctx->driverPrivate;
unsigned char *R128MMIO = ctx->MMIOAddress;
- CARD32 chunk;
+ int32_t chunk;
int ret;
int flags;
static int R128DRIKernelInit(const DRIDriverContext *ctx)
{
R128InfoPtr info = ctx->driverPrivate;
- drmR128Init drmInfo;
+ drm_r128_init_t drmInfo;
- memset( &drmInfo, 0, sizeof(drmR128Init) );
+ memset( &drmInfo, 0, sizeof(&drmInfo) );
- drmInfo.func = DRM_R128_INIT_CCE;
+ drmInfo.func = R128_INIT_CCE;
drmInfo.sarea_priv_offset = sizeof(drm_sarea_t);
drmInfo.is_pci = info->IsPCI;
drmInfo.cce_mode = info->CCEMode;
drmInfo.agp_textures_offset = info->agpTexHandle;
if (drmCommandWrite(ctx->drmFD, DRM_R128_INIT,
- &drmInfo, sizeof(drmR128Init)) < 0)
+ &drmInfo, sizeof(drmInfo)) < 0)
return GL_FALSE;
return GL_TRUE;
static int R128CCEStop(const DRIDriverContext *ctx)
{
R128InfoPtr info = ctx->driverPrivate;
- drmR128CCEStop stop;
+ drm_r128_cce_stop_t stop;
int ret, i;
stop.flush = 1;
stop.idle = 1;
ret = drmCommandWrite( ctx->drmFD, DRM_R128_CCE_STOP,
- &stop, sizeof(drmR128CCEStop) );
+ &stop, sizeof(stop) );
if ( ret == 0 ) {
return 0;
i = 0;
do {
ret = drmCommandWrite( ctx->drmFD, DRM_R128_CCE_STOP,
- &stop, sizeof(drmR128CCEStop) );
+ &stop, sizeof(stop) );
} while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY );
if ( ret == 0 ) {
stop.idle = 0;
if ( drmCommandWrite( ctx->drmFD, DRM_R128_CCE_STOP,
- &stop, sizeof(drmR128CCEStop) )) {
+ &stop, sizeof(stop) )) {
return -errno;
} else {
return 0;
0,
info->backPitch * ctx->cpp * ctx->shared.virtualHeight );
- R128SAREAPrivPtr pSAREAPriv;
- pSAREAPriv = (R128SAREAPrivPtr)(((char*)ctx->pSAREA) +
+ drm_r128_sarea_t *pSAREAPriv;
+ pSAREAPriv = (drm_r128_sarea_t *)(((char*)ctx->pSAREA) +
sizeof(drm_sarea_t));
memset(pSAREAPriv, 0, sizeof(*pSAREAPriv));
void R128DRICloseScreen(const DRIDriverContext *ctx)
{
R128InfoPtr info = ctx->driverPrivate;
- drmR128Init drmInfo;
+ drm_r128_init_t drmInfo;
/* Stop the CCE if it is still in use */
R128CCE_STOP(ctx, info);
}
/* De-allocate all kernel resources */
- memset(&drmInfo, 0, sizeof(drmR128Init));
- drmInfo.func = DRM_R128_CLEANUP_CCE;
+ memset(&drmInfo, 0, sizeof(drmInfo));
+ drmInfo.func = R128_CLEANUP_CCE;
drmCommandWrite(ctx->drmFD, DRM_R128_INIT,
- &drmInfo, sizeof(drmR128Init));
+ &drmInfo, sizeof(drmInfo));
/* De-allocate all AGP resources */
if (info->agpTex) {