Bug 55627

Summary: [sna gm45] Button highlight (dotted rectangle on selected button) lacks flush
Product: xorg Reporter: Joe Peterson <joe>
Component: Driver/intelAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Corruption of the dotted rectangle in selected button
none
How the same button looks using UXA
none
Flush state changes
none
Flush state changes none

Description Joe Peterson 2012-10-04 14:59:25 UTC
When using SNA instead of UXA in the xf86-video-intel driver, dialog box buttons that are selected/highlighted (by showing a dotted rectangle inside the button's border) do not display this rectangle correctly.  Random dots are missing, and each time it draws, it is a different set of dots.

From lspci: VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)

I will attach a screenshot showing an example of this.  In this case, it is a dialog for saving an image from a gmail message in Chromium.
Comment 1 Joe Peterson 2012-10-04 15:00:25 UTC
Created attachment 68084 [details]
Corruption of the dotted rectangle in selected button

Note, WM is openbox.
Comment 2 Joe Peterson 2012-10-04 15:01:33 UTC
Created attachment 68085 [details]
How the same button looks using UXA
Comment 3 Chris Wilson 2012-10-04 15:08:11 UTC
gen4 flushing bug, I shall wait until I hear feedback from testing with linux-3.7, or it may even require patches from my tree.
Comment 4 Chris Wilson 2012-10-17 22:38:22 UTC
Created attachment 68732 [details] [review]
Flush state changes

Can you please test the attached patch?
Comment 5 Chris Wilson 2012-10-18 11:44:54 UTC
Created attachment 68755 [details] [review]
Flush state changes
Comment 6 Chris Wilson 2012-10-19 14:57:19 UTC
I've uploaded commit 257abfdabe39629fb458ed65fab11283f7518dc4
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Oct 17 23:34:22 2012 +0100

    sna/gen4: Presume we need a flush upon state change similar to gen5+
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=55627
    References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

in the hope that gen4 has the same brokenness as the later generations. Please reopen if this doesn't fix the corruption, thanks.
Comment 7 Joe Peterson 2012-10-23 20:06:28 UTC
I tested just now with the latest git, and problem persists.  Just to make sure I did this correctly, I replaced the following three files on my system with freshly-built ones:

/usr/lib/xorg/modules/drivers/intel_drv.so
/usr/lib/libI810XvMC.so.1.0.0
/usr/lib/libIntelXvMC.so.1.0.0

The other lib symlinks are, of course, there, for the last two.
Comment 8 Chris Wilson 2012-11-11 16:13:38 UTC
This will be worth checking with

commit b2245838c15b54d72557de8facb7cc15d59624ae
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Nov 6 16:32:32 2012 +0000

    sna/gen4: opacity spans requires the per-rectangle flush w/a
    
    Note that this is worsened, but not caused, by:
    
    commit e1a63de8991a6586b83c06bcb3369208871cf43d
    Author: Chris Wilson <chris@chris-wilson.co.uk>
    Date:   Fri Nov 2 09:10:32 2012 +0000
    
        sna/gen4+: Prefer GPU spans if the destination is active
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=55500
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

Thanks.
Comment 9 Joe Peterson 2012-11-13 23:06:36 UTC
(In reply to comment #8)
> This will be worth checking with
> 
> commit b2245838c15b54d72557de8facb7cc15d59624ae
> Author: Chris Wilson <chris@chris-wilson.co.uk>
> Date:   Tue Nov 6 16:32:32 2012 +0000

Yep, I just did a git pull to get the latest and rebuilt - the issue appears to be gone with the latest code.
Comment 10 Chris Wilson 2012-11-13 23:38:49 UTC
Thanks for testing and the bug report. I'm marking this one as closed, and keeping bug 55500 for a rather subtle rendering error.

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.