From a7abda582082ca345bf1b883cc3c125b3918d5b8 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 15 Apr 2004 01:15:38 +0000 Subject: set default page flipping to zero can be changed in header file --- src/mesa/drivers/dri/radeon/server/radeon.h | 1 + src/mesa/drivers/dri/radeon/server/radeon_dri.c | 5 +++-- src/mesa/drivers/dri/radeon/server/radeon_dri.h | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/mesa/drivers/dri/radeon') diff --git a/src/mesa/drivers/dri/radeon/server/radeon.h b/src/mesa/drivers/dri/radeon/server/radeon.h index 27967318131..7ef9c453cec 100644 --- a/src/mesa/drivers/dri/radeon/server/radeon.h +++ b/src/mesa/drivers/dri/radeon/server/radeon.h @@ -173,6 +173,7 @@ typedef struct { unsigned int depthPitchOffset; int irq; /**< \brief IRQ number */ + int page_flip_enable; /**< \brief Page Flip enable */ unsigned int gen_int_cntl; unsigned int crtc_offset_cntl; diff --git a/src/mesa/drivers/dri/radeon/server/radeon_dri.c b/src/mesa/drivers/dri/radeon/server/radeon_dri.c index 9d95328a2e0..3365c0a2198 100644 --- a/src/mesa/drivers/dri/radeon/server/radeon_dri.c +++ b/src/mesa/drivers/dri/radeon/server/radeon_dri.c @@ -221,7 +221,6 @@ static int RADEONEngineRestore( const DRIDriverContext *ctx ) OUTREG(RADEON_GEN_INT_CNTL, info->gen_int_cntl); OUTREG(RADEON_CRTC_OFFSET_CNTL, info->crtc_offset_cntl); - /* Initialize and start the CP if required */ if ((err = drmCommandNone(ctx->drmFD, DRM_RADEON_CP_START)) != 0) { fprintf(stderr, "%s: CP start %d\n", __FUNCTION__, err); @@ -888,13 +887,14 @@ static int RADEONScreenInit( DRIDriverContext *ctx, RADEONInfoPtr info ) /* Initialize kernel gart memory manager */ RADEONDRIAgpHeapInit(ctx, info); + fprintf(stderr,"page flipping %sabled\n", info->page_flip_enable?"en":"dis"); /* Initialize the SAREA private data structure */ { drm_radeon_sarea_t *pSAREAPriv; pSAREAPriv = (drm_radeon_sarea_t *)(((char*)ctx->pSAREA) + sizeof(drm_sarea_t)); memset(pSAREAPriv, 0, sizeof(*pSAREAPriv)); - pSAREAPriv->pfState = 1; + pSAREAPriv->pfState = info->page_flip_enable; } @@ -1153,6 +1153,7 @@ static int radeonInitFBDev( DRIDriverContext *ctx ) info->gartTexSize = RADEON_DEFAULT_AGP_TEX_SIZE; info->bufSize = RADEON_DEFAULT_BUFFER_SIZE; info->ringSize = RADEON_DEFAULT_RING_SIZE; + info->page_flip_enable = RADEON_DEFAULT_PAGE_FLIP; info->Chipset = ctx->chipset; diff --git a/src/mesa/drivers/dri/radeon/server/radeon_dri.h b/src/mesa/drivers/dri/radeon/server/radeon_dri.h index 9938fafa42c..59905227e10 100644 --- a/src/mesa/drivers/dri/radeon/server/radeon_dri.h +++ b/src/mesa/drivers/dri/radeon/server/radeon_dri.h @@ -53,6 +53,7 @@ #define RADEON_DEFAULT_BUFFER_SIZE 2 /* MB (must be page aligned) */ #define RADEON_DEFAULT_AGP_TEX_SIZE 1 /* MB (must be page aligned) */ #define RADEON_DEFAULT_CP_TIMEOUT 10000 /* usecs */ +#define RADEON_DEFAULT_PAGE_FLIP 0 /* page flipping diabled */ #define RADEON_BUFFER_ALIGN 0x00000fff /** -- cgit v1.2.3