Disable BLT for i830 and 845G

This pair of chipsets seem broken beyond repair, specifically the
erratum that causes the wrong PTE entry to be invalidated, so disable
our incorrect attempts to use the BLT on those devices.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2010-11-23 22:27:38 +00:00
parent 33c08882c0
commit 0bb135c40e
3 changed files with 20 additions and 7 deletions

View File

@ -443,6 +443,7 @@ typedef struct intel_screen_private {
Bool use_pageflipping;
Bool force_fallback;
Bool can_blt;
Bool use_shadow;
/* Broken-out options. */

View File

@ -468,8 +468,21 @@ static void I830XvInit(ScrnInfoPtr scrn)
intel->colorKey);
}
static Bool can_accelerate_2d(struct intel_screen_private *intel)
static Bool can_accelerate_blt(struct intel_screen_private *intel)
{
if (IS_I830(intel) || IS_845G(intel)) {
/* These pair of i8xx chipsets have a crippling erratum
* that prevents the use of a PTE entry by the BLT
* engine immediately following updating that
* entry in the GATT.
*
* As the BLT is fundamental to our 2D acceleration,
* and the workaround is lost in the midst of time,
* fallback.
*/
return FALSE;
}
if (INTEL_INFO(intel)->gen >= 60) {
drm_i915_getparam_t gp;
int value;
@ -592,9 +605,8 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
intel->tiling = FALSE;
}
intel->use_shadow = FALSE;
if (!can_accelerate_2d(intel))
intel->use_shadow = TRUE;
intel->can_blt = can_accelerate_blt(intel);
intel->use_shadow = !intel->can_blt;
if (xf86IsOptionSet(intel->Options, OPTION_SHADOW)) {
intel->use_shadow =
@ -606,7 +618,7 @@ static Bool I830PreInit(ScrnInfoPtr scrn, int flags)
if (intel->use_shadow) {
xf86DrvMsg(scrn->scrnIndex, X_CONFIG,
"Shadow buffer enabled,"
" GPU acceleration disabled.\n");
" 2D GPU acceleration disabled.\n");
}
/* SwapBuffers delays to avoid tearing */

View File

@ -108,7 +108,7 @@ void intel_shadow_blt(intel_screen_private *intel)
int n;
/* Can we trust the BLT? Otherwise do an uncached mmecy. */
if (IS_GEN2(intel) || IS_GEN6(intel)) {
if (!intel->can_blt || IS_GEN2(intel)) {
intel_shadow_memcpy(intel);
return;
}
@ -149,7 +149,7 @@ void intel_shadow_blt(intel_screen_private *intel)
if (bo == NULL)
return;
BEGIN_BATCH(8);
BEGIN_BATCH_BLT(8);
OUT_BATCH(blt);
OUT_BATCH(br13);
OUT_BATCH(box->y1 << 16 | box->x1);