Skip to contentSkip to conversation

New: Cloned screens with different res/refresh cause problems with mesa demos since new dri2 vsync.

Bug 28383 Mario Kleiner 1 participant 1 message Jun 8, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Quoted 37 lines · On Jun 4, 2010, at 4:02 PM, [email protected] wrote:

Message: 2
Date: Fri, 4 Jun 2010 04:28:02 -0700 (PDT)
From: [email protected]
Subject: [Bug 28383] New: Cloned screens with different res/refresh
cause problems with mesa demos since new dri2 vsync.
To: [email protected]
Message-ID: <[email protected]/>
Content-Type: text/plain; charset="UTF-8"

https://bugs.freedesktop.org/show_bug.cgi?id=28383

Summary: Cloned screens with different res/refresh cause
problems with mesa demos since new dri2 vsync.
Product: Mesa
Version: git
Platform: x86 (IA32)
OS/Version: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/R600
AssignedTo: [email protected]
ReportedBy: [email protected]

I think this is linked to the new dri2 vsync but mat be wrong...

rv670 mesa git, ddx git xorg git (2 weeks ago) drt kernels.

Not just latest drt and unrelated to tiling patches.

I am starting with a TV connected @ 1024x768 + vga monitor @ 1920x1080 so the top left section of the monitor screen gets tv(50Hz) vsync - monitor is 60Hz.

If I start a mesa demo and it starts in the TV area it will sync to 50HZ if I move it outside the top left area it will sync to 60Hz.

Quoted 6 lines

The problem is if I then move it back to the TV area it will stop rendering and become unresponsive. I can <ctrl><c> it but the window will remain. If I the move the window around enough I can get xserver to segfault.

This doesn't happen with UMS or a drt from 29th April (uses old vsync). It doesn't happen if I disable TV with xrandr.

Diagnosis by treatment: Can you try if the attached patch fixes the problem for you?

hw/xfree86/dri2/dri2.c +7 -0
index d33b0d1..39ab20a 100644
@@ -806,6 +806,13 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc,
         * number of pending swaps.
         */
        *swap_target = pPriv->last_swap_target + pPriv->swap_interval;
+
+       /* Hack hack! Always use a swap_target of 1 to avoid hangs if window
+        * is moved between crtc's with different refresh rate. This effectively
+        * limits swap_interval settings to 0 and 1 for non-vsync'ed vs. vsync'd
+        * swaps. Larger swap_intervals are silently clamped to 1.
+        */
+       *swap_target = 1;
     } else {
        /* glXSwapBuffersMscOML could have a 0 target_msc, honor it */
        *swap_target = target_msc;

best,
-mario

Quoted 15 lines
[   489.682] 0: /home/andy/Src/Xorg-git/modular/bin/Xorg (xorg_backtrace+0x3b)
[0x80da21b]
[   489.682] 1: /home/andy/Src/Xorg-git/modular/bin/Xorg (0x8048000 
+0x59ca5)
[0x80a1ca5]
[   489.682] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
[   489.682] 3: /home/andy/Src/Xorg-git/modular/bin/Xorg (LocalClient+0x41)
[0x809d8d1]
[   489.682] 4:
/home/andy/Src/Xorg-git/modular/lib/xorg/modules/extensions/libdri2.so
(0xb73ce000+0x309b) [0xb73d109b]
[   489.682] 5: /home/andy/Src/Xorg-git/modular/bin/Xorg (0x8048000 

+0x25198)
[0x806d198]

Quoted 16 lines
[   489.682] 6: /home/andy/Src/Xorg-git/modular/bin/Xorg (0x8048000 
+0x1a86a)
[0x806286a]
[   489.682] 7: /lib/libc.so.6 (__libc_start_main+0xd0) [0xb7495380]
[   489.682] 8: /home/andy/Src/Xorg-git/modular/bin/Xorg (0x8048000 
+0x1a481)
[0x8062481]
[   489.682] Segmentation fault at address 0x18
Signature · 6 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


------------------------------

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel