Bug 14991 - randr12 not working with nv25
Summary: randr12 not working with nv25
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 14405
  Show dependency treegraph
 
Reported: 2008-03-13 08:33 UTC by pl4nkton
Modified: 2008-04-27 15:52 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
xlog (65.36 KB, application/octet-stream)
2008-03-13 08:33 UTC, pl4nkton
no flags Details
xlog randr12 modeset_trace (21.11 KB, application/x-bzip)
2008-03-13 10:05 UTC, pl4nkton
no flags Details
radeontool regs output - different configs (2.87 KB, application/x-bzip)
2008-03-26 13:47 UTC, pl4nkton
no flags Details
radeontool regs output - different configs (3.69 KB, application/x-bzip)
2008-03-26 14:47 UTC, pl4nkton
no flags Details
Possibility 1 (1.07 KB, patch)
2008-03-26 15:24 UTC, Stuart Bennett
no flags Details | Splinter Review
Possibility 2 (1.03 KB, patch)
2008-03-26 15:25 UTC, Stuart Bennett
no flags Details | Splinter Review
xlog randr12, regs (12.57 KB, application/x-bzip)
2008-03-26 15:38 UTC, pl4nkton
no flags Details

Description pl4nkton 2008-03-13 08:33:51 UTC
Created attachment 15091 [details]
xlog

if randr12 is enabled xserver hung with black screen.
drm debug output is the same as without.

(II) NOUVEAU(0): EDID vendor "ENC", prod id 6022
(II) NOUVEAU(0): nv_analog_output_detect is called.
-- black screen - nothing happen for some time
(II) NOUVEAU(0): Setting owner: 0x0.
(II) NOUVEAU(0): Setting owner: 0x0.
-- still no image - stop x
(II) NOUVEAU(0): NVCloseScreen is called.
Comment 1 pl4nkton 2008-03-13 10:05:22 UTC
Created attachment 15094 [details]
xlog randr12 modeset_trace
Comment 2 Stuart Bennett 2008-03-13 16:21:00 UTC
I assume the monitor is correctly detected as being attached on DVI-D? Assuming this is so, this is not expected to work currently on your particular card as a separate TMDS chip needs programming up, so there's going to be some work in getting it going.

Do the VGA and DVI-A connections work as expected?
Comment 3 pl4nkton 2008-03-18 13:59:10 UTC
Yes VGA and DVI-A works well. I tried only booting with the screen connected at boot, but no "hot plugging" and detection while xserver is runing.
Connected with DVI-D the screen stay on but shows only black. The driver detects the right mode.
Comment 4 Stuart Bennett 2008-03-26 10:15:50 UTC
If only the DVI output is used at boot, does it work with nouveau in non-randr12 mode or the nv driver? If it does:
git clone git://people.freedesktop.org/~airlied/radeontool
git checkout origin/nvidia
make

then run "./radeontool regs > logfile", both when in the working non-randr12 state, and (if possible) remotely over ssh when in the broken randr12 state, and attach the logs to this bug.

If nv / non-randr12 doesn't work, but console mode does, comparative working/non-working dumps would still be useful.
Comment 5 pl4nkton 2008-03-26 13:47:00 UTC
Created attachment 15481 [details]
radeontool regs output - different configs

dvi-d works with nv and nouveau no randr12 when the screen is connected from boot.
this is the dvi-d chip on the card. I'm not sure if I2C is connected but in the datasheet is a description of registers.
http://www.siliconimage.com/docs/SiI-DS-0021-E-164.pdf
Comment 6 Maarten Maathuis 2008-03-26 14:00:02 UTC
I think something went wrong, that log is filled mostly with zeros and some random stuff.
Comment 7 Stuart Bennett 2008-03-26 14:11:00 UTC
While bringing up the SIL may be eventually interesting, we first ought to be able to bring up a display by not breaking the existing setup (as in the non-randr12 case) -- radeontool dumps should let us do this.

Unfortunately the radeontool dumps you provided are broken, as you have many nvidia pci devices, and radeontool is somewhat stupid :)

To fix this, change radeontool.c line 501 from
radeon_cntl_mem = map_devince_memory(base,0x700000);

to

radeon_cntl_mem = map_devince_memory(0xe4000000,0x700000);

recompile, and dump again (logfile_nouveau and log_nouv_r12 being the interesting ones)

Comment 8 pl4nkton 2008-03-26 14:47:12 UTC
Created attachment 15482 [details]
radeontool regs output - different configs
Comment 9 Stuart Bennett 2008-03-26 14:56:30 UTC
Please make the with-randr12 dump again, with the following change to nv_output.c:

diff --git a/src/nv_output.c b/src/nv_output.c
index 5841492..a4e1917 100644
--- a/src/nv_output.c
+++ b/src/nv_output.c
@@ -1113,6 +1113,7 @@ void NvSetupOutputs(ScrnInfoPtr pScrn)
                                sprintf(outputname, "DVI-A-%d", dvia_count++);
                        break;
                case OUTPUT_TMDS:
+                       pNv->dcb_table.entry[i].heads = 2;
                        sprintf(outputname, "DVI-D-%d", dvid_count++);
                        break;
                case OUTPUT_TV:
Comment 10 Stuart Bennett 2008-03-26 15:24:56 UTC
Created attachment 15486 [details] [review]
Possibility 1

A possible patch (given that the hack in the previous comment fixed it)
Comment 11 Stuart Bennett 2008-03-26 15:25:23 UTC
Created attachment 15487 [details] [review]
Possibility 2

A second option
Comment 12 pl4nkton 2008-03-26 15:38:17 UTC
Created attachment 15488 [details]
xlog randr12, regs

hack from comment 9 make it working
Comment 13 Stuart Bennett 2008-04-03 15:23:46 UTC
If you feel like having a poke at some registers, I've a couple of candidates -- CR59 and 0x6808c0. What this means in practice, is running *without* the comment 9 hack, and trying (via ssh) all four combinations of:

./radeontool regset C0:59 M        where M is 0 or 1
and
./radeontool regset 0x6808c0 N     where N is 0 or 0x100

It may not do much, but at least we can discount them afterwards :-)
Comment 14 pl4nkton 2008-04-04 04:08:54 UTC
I can't see any difference. The regs was 1 / 0x100.
Comment 15 Stuart Bennett 2008-04-26 16:56:33 UTC
Please test whether it now works with an unmodified copy of the latest code in git. If it does, testing whether changing between CRTC 0 and 1 with "xrandr --output DVI-D-0 --mode something --crtc n" works would be a good additional test.
Comment 16 pl4nkton 2008-04-27 15:52:53 UTC
Now it works :) Also switching the crtc. Thank you.


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.