Bug 22203 - vblank sync'd GL buffer swap causes freeze in multimonitor setup
Summary: vblank sync'd GL buffer swap causes freeze in multimonitor setup
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/intel (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Jesse Barnes
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-10 06:25 UTC by Lukasz Kurylo
Modified: 2009-06-10 10:26 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (604 bytes, patch)
2009-06-10 07:23 UTC, Lukasz Kurylo
no flags Details | Splinter Review
make sure we don't wait for lines outside the crtc bounds (1.09 KB, patch)
2009-06-10 07:57 UTC, Jesse Barnes
no flags Details | Splinter Review

Description Lukasz Kurylo 2009-06-10 06:25:19 UTC
From 20664:

(In reply to comment #9)
> commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> Date:   Tue Jun 2 16:42:56 2009 +0100
> 
>     Sync DRI2 CopyRegion to vertical retrace
> 

This commit caused screen to stop redrawing. I use two monitors, laptop screen
and external one. Works ok if I disconnect external monitor but it it's
connected screen freezes.

------- Comment #11 From Jesse Barnes 2009-06-09 17:16:26 PST [reply] -------

(In reply to comment #10)
> (In reply to comment #9)
> > commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > Date:   Tue Jun 2 16:42:56 2009 +0100
> > 
> >     Sync DRI2 CopyRegion to vertical retrace
> > 
> 
> This commit caused screen to stop redrawing. I use two monitors, laptop screen
> and external one. Works ok if I disconnect external monitor but it it's
> connected screen freezes.

Did you pull the updates after this commit?  Eric fixed a few issues with this
patch in a later commit...

If things are still broken with master, please open a new bug.

------- Comment #12 From Lukasz Kurylo 2009-06-10 03:32:54 PST [reply] -------

(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > commit ec2fde7c8250fdc30984f16c8a1d3587d70b0144
> > > Author: Jesse Barnes <jbarnes@virtuousgeek.org>
> > > Date:   Tue Jun 2 16:42:56 2009 +0100
> > > 
> > >     Sync DRI2 CopyRegion to vertical retrace
> > > 
> > 
> > This commit caused screen to stop redrawing. I use two monitors, laptop screen
> > and external one. Works ok if I disconnect external monitor but it it's
> > connected screen freezes.
> 
> Did you pull the updates after this commit?  Eric fixed a few issues with this
> patch in a later commit...
> 
> If things are still broken with master, please open a new bug.
> 

I used version updated up to commit 
4698b3bd79452ae2066a3d195cf58dd5e30c93f3, so with those fixes. 

------- Comment #13 From Lukasz Kurylo 2009-06-10 05:55:43 PST [reply] -------

I've found out what causes the problem. As I said before I have 2 monitors and
I use them in extended desktop configuration:
xrandr --output VGA --right-of LVDS --auto.

The problem is that my LVDS is 1680x1050 and VGA is 1920x1200. So what I get
after xrandr is virtual screen 3600x1200. 

______________________
|         |           |
|   S1    |    S2     |
|         |           |
|_________|           |
|XXXXXXXXX|___________|

if I instead did:

xrandr --output VGA --right-of LVDS --mode 1680x1050
_____________________
|         |         |
|   S1    |   S2    |
|         |         |
|_________|_________|

everything works fine.

So I believe the problem is when driver has to redraw area that is bigger then
physical screen. Maybe then there is no MI_WAIT_FOR_PIPEB_SCAN_LINE_WINDOW for 
region which includes XXXXXXXX part (is partially below the screen).
Comment 1 Lukasz Kurylo 2009-06-10 07:23:41 UTC
Created attachment 26637 [details] [review]
proposed patch
Comment 2 Jesse Barnes 2009-06-10 07:57:50 UTC
Created attachment 26638 [details] [review]
make sure we don't wait for lines outside the crtc bounds

Here's one that's been build tested.  If you confirm it works I'll push it.

Thanks.
Comment 3 Lukasz Kurylo 2009-06-10 08:34:31 UTC
(In reply to comment #2)
> Created an attachment (id=26638) [details]
> make sure we don't wait for lines outside the crtc bounds
> 
> Here's one that's been build tested.  If you confirm it works I'll push it.
> 
> Thanks.
> 

It works just fine.
Comment 4 Jesse Barnes 2009-06-10 10:26:49 UTC
And for posterity:

commit e5bfa2702a31566fa94fa75f7289d7cbe9825420
Author: Lukasz Kurylo <Lukasz.Kurylo@gmail.com>
Date:   Wed Jun 10 07:55:31 2009 -0700

    DRI2 copyregion: don't wait for scanlines that won't happen


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.