[Help][RS780E][mipsel]Screen corruption sometimes
Chen Jie
chenj at lemote.com
Sun Sep 4 21:47:15 PDT 2011
Hi,
Guess it may be related -- we got similar corruption when standby(ACPI S1).
A further debugging shows it is related with invocation of
radeon_bo_evict_vram in function radeon_suspend_kms:
...
/* evict vram memory */
radeon_bo_evict_vram(rdev);
/* wait for gpu to finish processing current batch */
radeon_fence_wait_last(rdev);
radeon_save_bios_scratch_regs(rdev);
radeon_pm_suspend(rdev);
radeon_suspend(rdev);
radeon_hpd_fini(rdev);
/* evict remaining vram memory */
radeon_bo_evict_vram(rdev);
...
Comment out two invocations of radeon_bo_evict_vram above, no corruption happen.
Any idea?
BTW, some questions:
1. What does radeon_bo_evict_vram do? Evict bo from VRAM to GTT domain?
2. Why invoke radeon_bo_evict_vram twice?
3. In resume stage, need it restore evicted BOs? Or evicted BOs will
be restored on demand?
Regards,
Chen Jie
2011/8/31 Chen Jie <chenj at lemote.com>:
> Hi,
>
> I did some tests, the status is collected at
> http://dev.lemote.com/files/upload/software/temp/status/
> (And sorry, a solid port of newer kernel isn't ready, so the tests
> above didn't cover current kernel code)
>
> It seems 'x11perf -compwinwin500' will corrupt windows of other
> applications, and is related with Xrender? Any idea?
>
> Update:
> I hacked compiz -- display.c eventLoop(): not use
> glXCopySubBufferMESA() to update damaged sections, the corruption is
> severe(http://dev.lemote.com/files/upload/software/temp/compiz_no_use_glXCopySubBufferMESA.png):
> * It was simply triggered by run 'X + compiz(no window decoration) +
> comp-test' on platform 1
> * The screen can be restored by switching between VTs.
>
> The detailed code snippet in compiz:
>
> BoxPtr pBox;
> int nBox, y;
>
> pBox = core.tmpRegion->rects;
> nBox = core.tmpRegion->numRects;
>
> // if (s->copySubBuffer)
> if (0) // Hack: disable the glXCopySubBufferMESA() way
> {
> while (nBox--)
> {
> y = s->height - pBox->y2;
>
> (*s->copySubBuffer) (d->display,
> s->output,
> pBox->x1, y,
> pBox->x2 - pBox->x1,
> pBox->y2 - pBox->y1);
>
> pBox++;
> }
> }
> else
> {
> glEnable (GL_SCISSOR_TEST);
> glDrawBuffer (GL_FRONT);
>
> while (nBox--)
> {
> y = s->height - pBox->y2;
>
> glBitmap (0, 0, 0, 0,
> pBox->x1 - s->rasterX,
> y - s->rasterY,
> NULL);
>
> s->rasterX = pBox->x1;
> s->rasterY = y;
>
> glScissor (pBox->x1, y,
> pBox->x2 - pBox->x1,
> pBox->y2 - pBox->y1);
>
> glCopyPixels (pBox->x1, y,
> pBox->x2 - pBox->x1,
> pBox->y2 - pBox->y1,
> GL_COLOR);
>
> pBox++;
> }
>
> glDrawBuffer (GL_BACK);
> glDisable (GL_SCISSOR_TEST);
> glFlush ();
> }
More information about the xorg-driver-ati
mailing list