Bug 20305 - Unending loop in R600OverlapCopy() [srcX == dstX && srcY == dstY]
Summary: Unending loop in R600OverlapCopy() [srcX == dstX && srcY == dstY]
Status: RESOLVED DUPLICATE of bug 20126
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/radeonhd (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Luc Verhaegen
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-25 02:35 UTC by Jakub Zawadzki
Modified: 2009-02-25 06:18 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Jakub Zawadzki 2009-02-25 02:35:48 UTC
Hi,

I'm using r6xx-r7xx-support branch (commit 3f8b6ecc), with EXA AccelMethod.

Recently when I want to save file in openoffice I typed 1 letter and my Xorg freeze.
Luckily I've got sshd started and I could attach strace and gdb to it.

gdb backtrace:
#4  0x00007fbb0e9433c7 in R600OverlapCopy (pDst=0x861950, srcX=820, srcY=571, dstX=820, dstY=571, w=16, h=19) at r600_exa.c:816
        pScrn = (ScrnInfoPtr) 0x817bf0
        rhdPtr = (RHDPtr) 0x817810
        accel_state = (struct r6xx_accel_state *) 0x83c360
        dst_pitch = 1408
        dst_offset = 3489693696
        i = 0
        hchunk = 0
        vchunk = 0
#5  0x00007fbb0e9437af in R600Copy (pDst=0x861950, srcX=820, srcY=571, dstX=820, dstY=571, w=16, h=19) at r600_exa.c:875
        pScrn = (ScrnInfoPtr) 0x817bf0
        rhdPtr = (RHDPtr) 0x817810
        accel_state = (struct r6xx_accel_state *) 0x83c360

In frame #4 hchunk == 0, so this loop:
815 for (i = 0; i < w; i += hchunk) {
816     R600DoPrepareCopy(pScrn,
817          dst_pitch, pDst->drawable.width, pDst->drawable.height, 
             dst_offset, pDst->drawable.bitsPerPixel,
818          dst_pitch, pDst->drawable.height, dst_offset,
             pDst->drawable.bitsPerPixel,
819          accel_state->rop, accel_state->planemask);
821     R600AppendCopyVertex(pScrn, srcX + i, srcY, dstX + i, dstY, hchunk, h);
822     R600DoCopy(pScrn);
823 }

is unending.
I dunno how R600OverlapCopy() should work when (srcX == dstX) && (srcY == dstY), so no patch. Sorry :(
Comment 1 Jakub Zawadzki 2009-02-25 02:56:22 UTC
Uhm, I just sync my git tree, and saw commit 34a3f94b91406aa8e6355787f5474cbb6bfc0052

so now it works great (thanks!) however if accel_state->copy_area will be NULL
(luckily I've got enough memory) it could still deadlock in that loop

Sorry for creating confusion ::(
Comment 2 Michel Dänzer 2009-02-25 03:20:58 UTC
> I dunno how R600OverlapCopy() should work when (srcX == dstX) && (srcY ==
> dstY)

Unless I'm missing something, it means the operation is a NOP and could just be skipped.
Comment 3 Jakub Zawadzki 2009-02-25 04:06:13 UTC

*** This bug has been marked as a duplicate of bug 20126 ***
Comment 4 Alex Deucher 2009-02-25 06:18:33 UTC
fixed in 8373f4399b03961f2c928a9275d47e9f41bd92bb

Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.