Bug 21963 - (mild) screen corruption on left rotated display (RS780)
Summary: (mild) screen corruption on left rotated display (RS780)
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: 7.4 (2008.09)
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-27 06:47 UTC by Octoploid
Modified: 2010-10-19 17:22 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
xorg.conf (1.24 KB, patch)
2009-05-27 07:34 UTC, Octoploid
no flags Details | Splinter Review
Xorg.0.log (70.54 KB, patch)
2009-05-27 07:35 UTC, Octoploid
no flags Details | Splinter Review
workaround (1.75 KB, patch)
2009-05-27 11:23 UTC, Alex Deucher
no flags Details | Splinter Review
normal (672.99 KB, image/jpeg)
2009-05-29 08:10 UTC, Octoploid
no flags Details
double line (849.53 KB, image/jpeg)
2009-05-29 08:11 UTC, Octoploid
no flags Details
corruption (366.00 KB, image/jpeg)
2009-05-29 08:12 UTC, Octoploid
no flags Details

Description Octoploid 2009-05-27 06:47:02 UTC
I've build a new AM3 workstation with the 790GX chipset recently.
The motherboard has a build Radeon HD 3300 (RS780) graphic card.
My monitor runs in portrait mode (xrandr --output DVI-0 --rotate left).

With this setup my display gets corrupted as follows:

- In xterm when I type commands in the shell there appears a thin vertical line
  after each character.
- When I start inkscape with a blank document on a virtual desktop and
  switch to another desktop and then back to inkscape, random black vertical
  lines appear on the screen. The pattern of the lines changes every time
  I switch back and forth again.
- When I switch to a running mc (midnight commander) in my (gnu-)screen
  session, random white vertical lines appear on the screen.  The pattern
  of the lines changes every time I switch back and forth again.

I've tried to capture the corruption with a screenshot, but the screenshots
are always uncorrupted.
Comment 1 Alex Deucher 2009-05-27 07:30:11 UTC
Please attach your xorg log and config.  Does it work better with xf86-video-ati from git master?
Comment 2 Octoploid 2009-05-27 07:34:42 UTC
Created attachment 26247 [details] [review]
xorg.conf
Comment 3 Octoploid 2009-05-27 07:35:16 UTC
Created attachment 26248 [details] [review]
Xorg.0.log
Comment 4 Octoploid 2009-05-27 07:37:33 UTC
No, xf86-video-ati from git master does not help. I'm still seeing the same corruption.
Comment 5 Alex Deucher 2009-05-27 11:23:32 UTC
Created attachment 26256 [details] [review]
workaround

There seems to be an off-by-one somewhere in the texture coordinates when transforms are used on r6xx/r7xx.  The attached patch works around most of the problems but breaks certain other cases.  Perhaps someone has an idea of what's going on, nothing is obviously jumping out at me.
Comment 6 Octoploid 2009-05-29 02:21:09 UTC
Thanks for the workaround. Things look much better now.

There is only one problem left as far as I can see:

The vertical line of pixels ~10 pixels from the left is always
duplicated in the very next vertical line of pixels.
(E.g. if you move 1 pixel wide vertical line to that location it
will appear as a 2 pixel wide line on the screen.)
Comment 7 Alex Deucher 2009-05-29 06:41:37 UTC
(In reply to comment #6)
> Thanks for the workaround. Things look much better now.
> 
> There is only one problem left as far as I can see:
> 
> The vertical line of pixels ~10 pixels from the left is always
> duplicated in the very next vertical line of pixels.
> (E.g. if you move 1 pixel wide vertical line to that location it
> will appear as a 2 pixel wide line on the screen.)
> 

Is there any way you could get a picture of it?
Comment 8 Octoploid 2009-05-29 08:10:13 UTC
Created attachment 26288 [details]
normal
Comment 9 Octoploid 2009-05-29 08:11:06 UTC
Created attachment 26289 [details]
double line
Comment 10 Octoploid 2009-05-29 08:12:12 UTC
Created attachment 26290 [details]
corruption
Comment 11 Octoploid 2009-05-29 08:18:42 UTC
OK, I've uploaded three photos.
The first shows no line doubling (normal).
The second shows the doubling of the black-yellow line ~10 pixels
from the left side of my monitor.
The third shows general corruption in this screen area (red lines),
produced by slowly moving the window with the red border. 
Comment 12 Hajo E. 2009-06-01 00:01:51 UTC
Thank you very much on working on this, Alex Deucher

I don't know if this could help solving the issue, but doing xrandr --rotate right ends in horizontal lines instead of vertical that appear on moving objects.

I created a short video on how moving a window looks like with xrandr --rotate left ( http://tinypic.com/r/2uqnpc3/5 ) which is also available as attachment.
Comment 13 Ram Yalamanchili 2009-06-07 12:39:33 UTC
I see a similar issue on my left rotated screen.

What branch is the workaround applied to? I am synced to git master, but see this as my latest changeset on src/r600_exa.c as:

commit 7e4948a3ad80ae0885df89ac7320457cb90f0b55
Author: Alex Deucher <alexdeucher@gmail.com>
Date:   Thu Mar 26 14:22:35 2009 -0400

    R6xx/R7xx EXA: rework composite pixel shader
    
    - move to vram storage
    - move swizzle logic to tex setup

The patch fails against my tree.. I am on an HD3450.
Comment 14 Alex Deucher 2009-06-08 07:00:51 UTC
(In reply to comment #13)
> I see a similar issue on my left rotated screen.
> 
> What branch is the workaround applied to? I am synced to git master, but see
> this as my latest changeset on src/r600_exa.c as:

It's not applied to any branch.  It's attached to this bug.
Comment 15 Ram Yalamanchili 2009-06-08 07:41:26 UTC
Alex, what i meant was, I can't seem to apply your workaround patch to my git master tree. 

radeonhd/xf86-video-radeonhd$ grep -Ri vs_alu_const *
radeonhd/xf86-video-radeonhd$ 

Which branch was it diff'ed against?
Comment 16 Alex Deucher 2009-06-08 08:36:42 UTC
(In reply to comment #15)
> Alex, what i meant was, I can't seem to apply your workaround patch to my git
> master tree. 
> 
> radeonhd/xf86-video-radeonhd$ grep -Ri vs_alu_const *
> radeonhd/xf86-video-radeonhd$ 
> 
> Which branch was it diff'ed against?
> 

The patch is for radeon, not radeonhd.
Comment 17 Peter Hercek 2009-06-28 13:34:42 UTC
I have this bug too. DRM is from kernel 2.6.30, radeon git version from 2009-06-28 with the partial fix from Alex applied. I have dual head configuration, first monitor is 1400x1050 and the second one is 2560x1024. The first monitor is rotated left and the second one has position set to "1050 160". The card is RV670PRO (agp version). Here is how it looks like (pixel columns mumbered from 0 to 1049):
* 0. column is not shown (it is always black on the monitor)
* columns 1-10 seem to be shown correclty after the black column
* columns 11-27 are corrupted, it looks like the logical 17 columns are shown on 16 physical (monitor) columns
* columns 28-1048 are shown correctly but they are shifted by one to the right on the monitor (so logical column 1048 is the last physical column on the monitor)
* column 1049 (the last one) is not shown on the first monitor at all
* but the columns 1048 and 1049 are shown as the first two columns of the second monitor (that means column 1048 is shown two times (once on each monitor))
Comment 18 Alex Deucher 2009-06-28 13:57:28 UTC
fixed in 407e676b04117c7ca3dcc0cc072f3552b03c64e5
Comment 19 Peter Hercek 2009-06-29 04:42:10 UTC
patch 407e676b04117c7ca3dcc0cc072f3552b03c64e5 fixes the problem with the incorrect rendering of columns 11-27. Also the image looks sharper now. I noticed it is a bit fuzzy before but I incorrectly attributed it to poor TN viewing angle in vertical direction.
It does not fix everything though:
* column 0 is still black - there is no image on it except the mouse cursor
* column 1048 is the last one on the first monitor (which sounds ok considering the first column of pixels on LCD is not used)
* the image on the second monitor starts with columns 1048 and 1049 which belong to the first monitor (i.e. column 1048 is displayed twice (once on each monitor))

I think this bug should be reopened (what I did) or a new one should be created. Still, it is much better than it was, thanks.
Comment 20 Octoploid 2009-06-29 05:07:10 UTC
In my case everything is fine and fixed now.
A big thank you to Roland.
Comment 21 Peter Hercek 2009-07-01 14:23:50 UTC
I tried it with catalyst and got similar result. Column 1048 is shown on both monitors. So this part is probably not a radeon driver problem. The only thing (I still believe is raden driver fault) is that the first column of points is not shown with radeon driver but is shown correctly with catalyst driver.
Comment 22 Alex Deucher 2010-10-19 17:22:56 UTC
xserver bug in the xrandr rotation code. fixed in 1.9.


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.