Skip to contentSkip to conversation

New: [BISECTED] nouveau, nv50: External VGA not detected anymore

Bug 64904 [email protected] 1 participant 15 messages May 23, 2013 – Jun 2, 2013 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=64904

Priority: medium
Bug ID: 64904
Assignee: [email protected]
Summary: [BISECTED] nouveau, nv50: External VGA not detected
anymore
QA Contact: [email protected]
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86 (IA32)
Status: NEW
Version: unspecified
Component: Driver/nouveau
Product: xorg

I have a lenove thinkpad T61p with a NVIDIA Corporation G84GLM [Quadro FX 570M].
When connecting my external VGA monitor my monitor is no more detected properly:

Quoted 1 line

cat /sys/class/drm/card0-VGA-1/status

gives now "disconnected"

I bisected the kernel sources from
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
and filed a bug report at https://bugzilla.kernel.org
(https://bugzilla.kernel.org/show_bug.cgi?id=58021).

Last good commit is ef22c8bb7b3fac45919b7fde412d36d1a8367d51
drm/nv50/disp: call into core to handle dac/sor power state changes

First bad commit is 7ebb38b556485449bfaa506a196439f6a6fd6ebd drm/nv50/disp: call into core for dac load detection

The responsible function is
nv50_dac_detect in drivers/gpu/drm/nouveau/nv50_dac.c (moved to drivers/gpu/drm/nouveau/nv50_display.c in more recent kernels).

Also tried a 3.9.1 kernel. The problem still remains.

However, replacing nv50_dac_detect with the corresponding version from the last good commit fixed the problem (tried with a 3.8.10 and a 3.8.13 kernel).

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#2 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #1 from Gerhard Bräunlich <[email protected]> --- I didn't mention: As a consequence the monitor stays blank.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#3 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #2 from Emil Velikov <[email protected]> --- Hi Gerhard

There are three distinct changes introduced with the bad commit

* the timeout has been decreased - 45 > 9.5 ms
* the DPMS_MODE was explicitly set before + after the DAC detection, but not any more
* the NV50_PDISPLAY_DAC_CLK_CTRL1 was set at the beginning, whereas the new version is not touching the register

So one at a time, can you increase the delay back to 45ms

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#4 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #3 from Gerhard Bräunlich <[email protected]> --- (In reply to comment #2)

Quoted 1 line

So one at a time, can you increase the delay back to 45ms

Hi Emil
If you get you right, that means that I should put

mdelay(45);

back into the function nv50_dac_detect.
Is that correct?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#5 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #4 from Emil Velikov <[email protected]> --- Created attachment 79775
--> https://bugs.freedesktop.org/attachment.cgi?id=79775&action=edit
Increase the delay during dac sense

Take a look at the patch to clear any confusion. It should apply cleanly on top of the 3.9 branch

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #5 from Gerhard Bräunlich <[email protected]> --- (In reply to comment #4)

Quoted 5 lines

Created attachment 79775 [details] [review]
Increase the delay during dac sense

Take a look at the patch to clear any confusion. It should apply cleanly on top of the 3.9 branch

OK thank you! I don't have my thinkpad with me at the moment. But I will test the patch tomorrow.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #6 from Gerhard Bräunlich <[email protected]> --- (In reply to comment #2)

Quoted 1 line

So one at a time, can you increase the delay back to 45ms

OK, done: this doesn't fix the problem!

Also tried to set NV50_PDISPLAY_DAC_CLK_CTRL1 (see patch). Didn't fix it too.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#8 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #7 from Gerhard Bräunlich <[email protected]> --- Created attachment 79820
--> https://bugs.freedesktop.org/attachment.cgi?id=79820&action=edit
set NV50_PDISPLAY_DAC_CLK_CTRL1

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#9 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #8 from Emil Velikov <[email protected]> --- Created attachment 79852
--> https://bugs.freedesktop.org/attachment.cgi?id=79852&action=edit
mangle with dpms mode, before/after dac sense

This is the final piece.

If it does not help, then the three changes could be more closely related than I expected. Either way give it a try, it should apply cleanly on top of linus 3.9

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#10 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #9 from Gerhard Bräunlich <[email protected]> --- (In reply to comment #8)

Quoted 8 lines

Created attachment 79852 [details] [review]
mangle with dpms mode, before/after dac sense

This is the final piece.

If it does not help, then the three changes could be more closely related than I expected. Either way give it a try, it should apply cleanly on top of linus 3.9

Didn't fix it.
Don't know if the following is useful:
In the statement (nv50_dac_detect)

    if (ret || load != 7)
        return connector_status_disconnected;

I get ret=0 and load!=7 (but don't know the value of load). So load!=7 is responsible that connector_status_disconnected is returned.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#11 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #10 from Maarten Lankhorst <[email protected]> --- Strictly speaking it should probably be (load & 7) == 7, but I don't think
it'll fix it on its own, you might want to dump the value of load to be sure,
with all those patches.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#12 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #11 from Gerhard Bräunlich <[email protected]> --- (In reply to comment #10)

Quoted 3 lines

Strictly speaking it should probably be (load & 7) == 7, but I don't think it'll fix it on its own, you might want to dump the value of load to be sure, with all those patches.

OK, I get load=0.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#13 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

--- Comment #12 from Joshua Baergen <[email protected]> --- I can confirm this issue on a ThinkPad W530, NVIDIA Corporation GK107GLM
[Quadro K1000M] (rev a1). I noticed the issue at work when I tried to connect to VGA extender which in turn was hooked up to a projector. However,
connecting directly to a VGA monitor worked fine.

I took Gerhard's suggestion and patched my 2.8.13 Gentoo kernel with the nv50_dac_detect from ef22c8bb7b3fac45919b7fde412d36d1a8367d51 and I was then able to connect to the projector.

FWIW, at least one other thing I noticed in the patch is that in the working code, there's the following sequence:

1) Write (NV50_PDISPLAY_DAC_LOAD_CTRL_ACTIVE | load_pattern) to DAC_LOAD_CTRL(i).
2) Read DAC_LOAD_CTRL(i).
3) Write 0 to DAC_LOAD_CTRL(i).

In the new code, it's:

1) Write (NV50_PDISPLAY_DAC_LOAD_CTRL_ACTIVE | load_pattern) to DAC_LOAD_CTRL(i).
2) Write NV50_PDISPLAY_DAC_LOAD_CTRL_DONE to DAC_LOAD_CTRL(i).
3) Read DAC_LOAD_CTRL(i).

Being completely unfamiliar with the hardware, I'm not sure if this is significant, and unfortunately, I don't have much (if any) opportunity to experiment.

Josh

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#14 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

Emil Velikov <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED

--- Comment #13 from Emil Velikov <[email protected]> --- (In reply to comment #12)

Quoted 2 lines

...
2) Write NV50_PDISPLAY_DAC_LOAD_CTRL_DONE to DAC_LOAD_CTRL(i).

Nice catch Josh, although this write is not the one causing the issue.

Just got a VGA cable and I can reproduce the issue.

Would need to do some testing if the fix does not break the behaviour on any other cards

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#15 lore raw

[Bug 64904] [BISECTED] nouveau, nv50: External VGA not detected anymore

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=64904

Emil Velikov <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
Assignee|[email protected] |[email protected]
|rg |

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau