Bug 21084

Summary: [Q45 KMS] black screen on console
Product: DRI Reporter: zhao jian <jian.j.zhao>
Component: DRM/IntelAssignee: MaLing <ling.ma>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: high    
Version: XOrg git   
Hardware: Other   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
dmsg of booting system with KMS on q45
none
kernel config file
none
dmesg
none
dmesg
none
register dump
none
hi Jian ,please try the debug patch, then upload demsg in kms, thanks.
none
new dmesg
none
please try the patch on your machine.
none
pleaset try the patch on your machine, thanks.
none
pleaset try the patch on your machine, thanks. none

Description zhao jian 2009-04-07 03:49:38 UTC
Created attachment 24641 [details]
dmsg of booting system with KMS on q45

Host:           q45
Arch:           x86_64
OSD:            Fedora release 9 (Sulphur)
Kernel_version:         2.6.29
Kernel:   (drm-intel-2.6.29)0e56a4d653b66d4729f944b23935a00c4472f987

Bug Description:
---------------------
I built kenel with config file in attachment which has added kernel mode setting in it. Then after it passes grub, it will soon be black screen. But I can still log in it from remote side. When start X, the screen will have output there as normal. Its dmesg is in attachment. But on other platforms with the same config file build the kernel, they all have the output normally.  

Reproduce Steps:
---------------------
1. build kernel with the config file configured as the attachment
2 [review]. just boot the OS. (afer the grub it will become black screen soon)
Comment 1 zhao jian 2009-04-07 03:51:23 UTC
Created attachment 24642 [details]
kernel config file
Comment 2 Gordon Jin 2009-04-07 17:57:51 UTC
Jbarnes, Jian's kernel config shows CONFIG_FRAMEBUFFER_CONSOLE=y. We don't know why the console still blank.
Comment 3 Jesse Barnes 2009-04-07 18:09:21 UTC
Can you insmod the drm module with debug=1 so we can see what may have failed?  It'll generate a bunch of kernel messages when i915 loads that we need to check.
Comment 4 zhao jian 2009-04-09 02:41:24 UTC
Created attachment 24682 [details]
dmesg
Comment 5 zhao jian 2009-04-09 02:42:37 UTC
I add drm.debug=1 in grub and get the dmesg. As shown in attachment. 
Comment 6 zhao jian 2009-04-10 01:32:40 UTC
Created attachment 24691 [details]
dmesg

maybe this one can offer more information.
Comment 7 Jesse Barnes 2009-05-04 15:09:06 UTC
Hm, weird.  Does this still happen?  Register dumps might help here too since it appears at least one of the outputs was probed correctly...
Comment 8 zhao jian 2009-05-17 23:44:30 UTC
(In reply to comment #7)
> Hm, weird.  Does this still happen?  Register dumps might help here too since
> it appears at least one of the outputs was probed correctly...

Yes. It still exist on 2.6.30-rc5 on Q45. And its register dump is in attachment. 
Comment 9 zhao jian 2009-05-17 23:45:32 UTC
Created attachment 25950 [details]
register dump
Comment 10 Gordon Jin 2009-06-09 14:47:38 UTC
This seems critical, so increasing priority/severity.
Comment 11 zhao jian 2009-06-09 23:45:41 UTC
It still existed on 2.6.30-rc8 on Q45. 
Comment 12 MaLing 2009-06-10 07:15:39 UTC
Hi Jian

From register dump, we know the output is VGA, could you please try DVI output to check the issue ?

Thanks for your help

Ma Ling
Comment 13 zhao jian 2009-06-10 22:04:55 UTC
(In reply to comment #12)
> Hi Jian
> From register dump, we know the output is VGA, could you please try DVI output
> to check the issue ?
> Thanks for your help
> Ma Ling

I have tried it, and it will have a blackscreen and a console with red colored stripped background appeared intermittently. All these are tested with DVI-I interface. And if tested with DVI-D interface, it works well. 
Comment 14 MaLing 2009-06-10 23:01:58 UTC
II):                SDVOC: 0x8000089c (enabled, pipe A, stall disabled, detected)
...
...
(II):                 ADPA: 0x80000c00 (enabled, pipe A, -hsync, -vsync)
SDVOC and VGA share one pipe :-), it is interesting.
Comment 15 MaLing 2009-06-14 18:37:44 UTC
Created attachment 26788 [details]
hi Jian ,please try the debug patch, then upload demsg in kms, thanks.
Comment 16 zhao jian 2009-06-15 02:03:31 UTC
(In reply to comment #15)
> Created an attachment (id=26788) [details]
> hi Jian ,please try the debug patch, then upload demsg in kms, thanks.

Here is the dmesg on G45 with your patch. 
Comment 17 zhao jian 2009-06-15 02:05:20 UTC
Created attachment 26800 [details]
new dmesg
Comment 18 MaLing 2009-06-15 05:49:53 UTC
[    7.300042] mytest: monitor is detected
[    7.377573] i2c-adapter i2c-1: unable to read EDID block.
[    7.420229] i915 0000:00:02.0: VGA-1: no EDID data
[    7.420233] 
[    7.420233]  mytest: return mode number is 0
[    7.420236] 
[    7.420237]  mytest HDMIB is not connected
[    7.637114] 
[    7.637115]  mytest HDMIC is connected

from above message, I think there are two issues.
1) unable to read EDID block
2) HDMIC should be detected because machine is only connected with VGA with DVI-I.

Comment 19 MaLing 2009-06-15 05:50:36 UTC
(In reply to comment #18)
> [    7.300042] mytest: monitor is detected
> [    7.377573] i2c-adapter i2c-1: unable to read EDID block.
> [    7.420229] i915 0000:00:02.0: VGA-1: no EDID data
> [    7.420233] 
> [    7.420233]  mytest: return mode number is 0
> [    7.420236] 
> [    7.420237]  mytest HDMIB is not connected
> [    7.637114] 
> [    7.637115]  mytest HDMIC is connected
> from above message, I think there are two issues.
> 1) unable to read EDID block
> 2) HDMIC should be detected because machine is only connected with VGA with
> DVI-I.

2) HDMIC should not be detected because machine is only connected with VGA with
 DVI-I.
Comment 20 MaLing 2009-06-23 22:49:12 UTC
Created attachment 27070 [details]
please try the patch on your machine.

Jian,
Please verify the patch
The root cause is from below:
1) HDMIC is detected incorrectly
2) CRT EDID can't be fetched successfully.

Thanks
Ma Ling
Comment 21 zhao jian 2009-06-25 02:33:02 UTC
(In reply to comment #20)
> Created an attachment (id=27070) [details]
> please try the patch on your machine.
> Jian,
> Please verify the patch
> The root cause is from below:
> 1) HDMIC is detected incorrectly
> 2) CRT EDID can't be fetched successfully.
> Thanks
> Ma Ling

This patch doesn't work. 
Comment 22 MaLing 2009-06-25 02:37:27 UTC
Created attachment 27121 [details]
pleaset try the patch on your machine, thanks.

update the patch ,thanks.
Comment 23 zhao jian 2009-06-25 19:52:02 UTC
(In reply to comment #22)
> Created an attachment (id=27121) [details]
> pleaset try the patch on your machine, thanks.
> update the patch ,thanks.

I tried a patch modified upon this one by Maling, it works. Maling maybe send it out later. 
Comment 24 MaLing 2009-06-28 20:28:15 UTC
(In reply to comment #23)
> (In reply to comment #22)
> > Created an attachment (id=27121) [details] [details]
> > pleaset try the patch on your machine, thanks.
> > update the patch ,thanks.
> I tried a patch modified upon this one by Maling, it works. Maling maybe send
> it out later. 

hi Jian
The patch has been sent to mailing list
[Resend][PATCH 1/4] drm/i915: crt fetch EDID by DVI-I converter on G4x platform

We found one person who said the patch would caused some worning message,
Jian, could you please upload the two dmesgs before and after the patch respectively ?

Thanks for your help.
Ma Ling

Comment 25 zhao jian 2009-06-30 19:19:33 UTC
(In reply to comment #24)
> (In reply to comment #23)
> > (In reply to comment #22)
> > > Created an attachment (id=27121) [details] [details] [details]
> > > pleaset try the patch on your machine, thanks.
> > > update the patch ,thanks.
> > I tried a patch modified upon this one by Maling, it works. Maling maybe send
> > it out later. 
> hi Jian
> The patch has been sent to mailing list
> [Resend][PATCH 1/4] drm/i915: crt fetch EDID by DVI-I converter on G4x platform
> We found one person who said the patch would caused some worning message,
> Jian, could you please upload the two dmesgs before and after the patch
> respectively ?
> Thanks for your help.
> Ma Ling

Hi Ling, 
Can you upload your final patch here please? I see it on mailing list maybe you have just modified your patch again. Thanks! 
Comment 26 MaLing 2009-07-01 02:56:47 UTC
Created attachment 27289 [details]
pleaset try the patch on your machine, thanks.

The patch is that one I sent on Tuesday.
Comment 27 zhao jian 2009-07-01 20:27:42 UTC
(In reply to comment #26)
> Created an attachment (id=27289) [details]
> pleaset try the patch on your machine, thanks.
> The patch is that one I sent on Tuesday.

I tried with your patch, it can log in the first time, after I reboot it, it will be black screen again and I can't log onto it any more. Strangely is that when I revert your patch and build again, it works well and is not black screen any more. 
Comment 28 zhao jian 2009-07-01 20:31:56 UTC
I used for-linus branch and the commit is b5aa8a0fc132dd512c33e7c2621d075e3b77a65e. 
Comment 29 zhao jian 2009-07-02 01:36:12 UTC
(In reply to comment #28)
> I used for-linus branch and the commit is
> b5aa8a0fc132dd512c33e7c2621d075e3b77a65e. 

sorry, I tested with drm-intel-next with the commit of 1ae8c0a56eeb3ed358b78ccadd024d6b721f26bc. With your patch it works well. But I find even without that patch it also works well. Maybe your patch has made in. 
Comment 30 MaLing 2009-07-02 02:38:06 UTC
(In reply to comment #29)
> (In reply to comment #28)
> > I used for-linus branch and the commit is
> > b5aa8a0fc132dd512c33e7c2621d075e3b77a65e. 
> sorry, I tested with drm-intel-next with the commit of
> 1ae8c0a56eeb3ed358b78ccadd024d6b721f26bc. With your patch it works well. But I
> find even without that patch it also works well. Maybe your patch has made in. 

This is because you used drm-intel-next, not for-linus branch, which make HDMI detect correctly.

Even if in current drm-intel-next version it works, driver also faile to fetch EDID, the patch will get EDID correctly and work better.
 
Comment 31 MaLing 2009-07-08 21:58:18 UTC
patch commit 8e4d36b993898b344f9176147f1dfeca583f81fd fixed this issue.

so close it now.
thanks
Ma Ling
Comment 32 zhao jian 2009-07-13 19:51:14 UTC
Verified with 5019914ca3b7517b2d82db2e92e3f683ac48e535 on drm-intel-next branch. 
Comment 33 Elizabeth 2017-10-06 14:54:56 UTC
Closing old verified.

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.