From bf9ee3339d5bd0258df493e766f2e6677cd4d73f Mon Sep 17 00:00:00 2001 From: Ben Skeggs <bskeggs@redhat.com> Date: Mon, 10 May 2010 08:31:36 +1000 Subject: [PATCH] force consistant tiling mode to prevent corruption issues --- src/drmmode_display.c | 4 ++-- src/nv_driver.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drmmode_display.c b/src/drmmode_display.c index 7867ddb..4a9daa1 100644 --- a/src/drmmode_display.c +++ b/src/drmmode_display.c @@ -420,7 +420,7 @@ drmmode_crtc_shadow_allocate(xf86CrtcPtr crtc, int width, int height) if (pNv->Architecture >= NV_ARCH_50) { tile_mode = 4; - tile_flags = (drmmode->cpp == 2) ? 0x7000 : 0x7a00; + tile_flags = 0x7000; //(drmmode->cpp == 2) ? 0x7000 : 0x7a00; ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2)); pitch = NOUVEAU_ALIGN(width * drmmode->cpp, 64); } else { @@ -1018,7 +1018,7 @@ drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) if (pNv->Architecture >= NV_ARCH_50 && pNv->wfb_enabled) { tile_mode = 4; - tile_flags = (scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00; + tile_flags = 0x7000; //(scrn->bitsPerPixel == 16) ? 0x7000 : 0x7a00; ah = NOUVEAU_ALIGN(height, 1 << (tile_mode + 2)); pitch = NOUVEAU_ALIGN(width * (scrn->bitsPerPixel >> 3), 64); } else { diff --git a/src/nv_driver.c b/src/nv_driver.c index ca2c669..f74e415 100644 --- a/src/nv_driver.c +++ b/src/nv_driver.c @@ -838,7 +838,7 @@ NVMapMem(ScrnInfoPtr pScrn) size = pScrn->displayWidth * (pScrn->bitsPerPixel >> 3); if (pNv->Architecture >= NV_ARCH_50 && pNv->tiled_scanout) { tile_mode = 4; - tile_flags = pScrn->bitsPerPixel == 16 ? 0x7000 : 0x7a00; + tile_flags = 0x7000; //pScrn->bitsPerPixel == 16 ? 0x7000 : 0x7a00; size *= NOUVEAU_ALIGN(pScrn->virtualY, (1 << (tile_mode + 2))); } else { size *= pScrn->virtualY; -- 1.7.0.1