Bug 45829

Summary: [r300g, git master] SEGFAULT with rotated display
Product: xorg Reporter: Till Matthiesen <high.entropy>
Component: Driver/RadeonAssignee: xf86-video-ati maintainers <xorg-driver-ati>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Xorg.0.log
none
xorg.conf
none
dmesg (from TP R50p)
none
possible fix none

Description Till Matthiesen 2012-02-09 04:29:21 UTC
Created attachment 56811 [details] [review]
Xorg.0.log

Hi!

X stops working for my setup with newest ddx from git master.
The following message precedes the segfault:

(EE) RADEON(0): Couldn't allocate shadow pixmap for rotated CRTC

I'm using libdrm from git master and xorg-server 1.11.4
on a Radeon X300 graphics adapter with two displays attached.
One of the displays is rotated (see xorg.conf as attached).

Unfortunately I won't have time to bisect but this configuration
worked as expected with ddx from git master as of 2-3 days ago.
There is also no such issue with 6.14.3.

Thanks in advance for looking into this!

PS. On a side note:

(EE) RADEON(1):  reusing fd for second head

What does this *error* actually mean?
It also present in the working configuration.
Comment 1 Till Matthiesen 2012-02-09 04:29:46 UTC
Created attachment 56812 [details] [review]
xorg.conf
Comment 2 Till Matthiesen 2012-02-10 09:05:22 UTC
This issue "seems" to be connected to the r300 driver only.

Testing with an ATI 4850 in zaphod mode (one display rotated) works flawless.
On the other hand, with a Thinkpad R50p (FireGL Mobility, r300 class) X segfaults once I configure at least one display as a rotated output.
Comment 3 Alex Deucher 2012-02-10 09:22:49 UTC
The driver is failing to allocate memory for the rotated buffer; probably out of vram.  Can you bisect when this started happening?  Please attach your dmesg output as well.
Comment 4 Till Matthiesen 2012-02-10 09:53:08 UTC
Hi Alex,

it's commit 615033f2b5e3817e335e9d022fc9fdcf8ac8b11a

r600-evergreen: use common surface allocator for tiling v11
Use libdrm common surface code so mesa,ddx have same idea
about tiling surface and what their pitch should be and
the alignment constraint.


PS. Can you tell me (in short) something about the following error message?

(EE) RADEON(1):  reusing fd for second head

Is this anything to worry about? I couldn't find any useful
information about it (or how to get a rid of it). 
This shows up in every (ati) zaphod configuration that I use, 
even if everything seems to work as expected.
Comment 5 Alex Deucher 2012-02-10 09:55:36 UTC
(In reply to comment #4)
> 
> PS. Can you tell me (in short) something about the following error message?
> 
> (EE) RADEON(1):  reusing fd for second head
> 
> Is this anything to worry about? I couldn't find any useful
> information about it (or how to get a rid of it). 
> This shows up in every (ati) zaphod configuration that I use, 
> even if everything seems to work as expected.

You can ignore that.  That is the expected behaviour.  Both instances of the driver for zaphod use the same drm fd since we only allow a single master.
Comment 6 Till Matthiesen 2012-02-10 09:56:08 UTC
Created attachment 56881 [details]
dmesg (from TP R50p)
Comment 7 Alex Deucher 2012-02-10 10:06:50 UTC
Created attachment 56883 [details] [review]
possible fix

Does this patch fix the issue?
Comment 8 Till Matthiesen 2012-02-10 14:36:37 UTC
Yes, this does the trick.

PS. Thanks for the explanation. I saw you "fixed" that as well.

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.