Created attachment 20080 [details] verbose log with git version Motherboard: Foxconn A7GM-S (RS780) Sense() always fails to detected VGA monitor and HPD for HDMI port always succeeds.
Created attachment 20081 [details] [review] workaround for both RandR and non-RandR This patch lets me start X server on VGA monitor.
Created attachment 20082 [details] verbose log with the workaround (RandR)
Created attachment 20083 [details] verbose log with the workaround (non-RandR)
Kim, I'm a little reluctant to do something like the first patch as this is the first time we are running into this issue. I would prefer to find out why sensing isn't working for you. Could you please run rhd_conntest, for the case of a. nothing connected b. VGA connected c. DVI connected This may get us some information on what's going on. Thanks! A note on the side: the change to rhd_randr.c should not matter. There is a set of brackets missing, but this should be irrelevant, too.
(In reply to comment #4) > Kim, I'm a little reluctant to do something like the first patch as this is the > first time we are running into this issue. > I would prefer to find out why sensing isn't working for you. > Could you please run rhd_conntest, for the case of > a. nothing connected > b. VGA connected > c. DVI connected Please note the rhd_conntest only works for Linux with procfs or sysfs because libpci does not fill sizes. I had to hack rhd_conntest.c to do it. Also note that I do not have DVI monitor to test. a. nothing connected rhd_conntest: v1.2.3, git branch master, commit 680f05ac + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE b. VGA connected rhd_conntest: v1.2.3, git branch master, commit 680f05ac + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 > This may get us some information on what's going on. > Thanks! > > A note on the side: the change to rhd_randr.c should not matter. There is a set > of brackets missing, but this should be irrelevant, too. I know but it was confusing because of the indentation. ;-) Thanks!
Created attachment 20230 [details] [review] A hack to make rhd_conntest working on my box
I am a i386 and amd64 FBD 7.0 & 7.1 guy and can only report "b" on all with two MSI-4870 cards. Hope this helps you/us. SEanS 2008/11/10 <bugzilla-daemon@freedesktop.org> > http://bugs.freedesktop.org/show_bug.cgi?id=18393 > > > > > > --- Comment #4 from Egbert Eich <eich@pdx.freedesktop.org> 2008-11-10 > 14:22:15 PST --- > Kim, I'm a little reluctant to do something like the first patch as this is > the > first time we are running into this issue. > I would prefer to find out why sensing isn't working for you. > Could you please run rhd_conntest, for the case of > a. nothing connected > b. VGA connected > c. DVI connected > This may get us some information on what's going on. > Thanks! > > A note on the side: the change to rhd_randr.c should not matter. There is a > set > of brackets missing, but this should be irrelevant, too. > > > -- > Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email > ------- You are receiving this mail because: ------- > You are the QA contact for the bug. > _______________________________________________ > xorg-team mailing list > xorg-team@lists.x.org > http://lists.x.org/mailman/listinfo/xorg-team > -- > To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org<radeonhd%2Bunsubscribe@opensuse.org> > For additional commands, e-mail: radeonhd+help@opensuse.org<radeonhd%2Bhelp@opensuse.org> > >
Kim, a. on FreeBSD you don't get the sizes filled in when you call pci_fill_info() with PCI_FILL_SIZES? bummer! I agree that this call needs to be added and we also need some fallback if the sizes are not filled in. So your rhd_conntest fix looks ok. I may probably wrap things with '#if defined (__FreeBSD__)' for now. b. Could you switch to use AtomBIOS and see if load detection works there? If it does i need to have a look at your BIOS. To do this please add the option: Option "UseAtomBIOS" "yes" to the device section of your xorg.conf and create a logverbose 7 log for the output. I'm going to mark HPD as broken for your chip for now. c. >> A note on the side: the change to rhd_randr.c should not matter. There is a set >> of brackets missing, but this should be irrelevant, too. > >I know but it was confusing because of the indentation. ;-) Right. Saw that, should be fixed now :) Thanks for hanging in so patiently :)
(In reply to comment #8) > Kim, > a. on FreeBSD you don't get the sizes filled in when you call pci_fill_info() > with PCI_FILL_SIZES? bummer! I agree that this call needs to be added and we > also need some fallback if the sizes are not filled in. So your rhd_conntest > fix looks ok. > I may probably wrap things with '#if defined (__FreeBSD__)' for now. I see that you already checked it in. Thanks. However, I believe it is more like this: @@ -547,7 +547,7 @@ MapBar(struct pci_dev *device, int ioBar, int devMem) pci_fill_info(device, PCI_FILL_BASES | PCI_FILL_SIZES); if (!device->base_addr[ioBar] -#if !defined (__FreeBSD__) +#if defined (__linux__) || !device->size[ioBar] #endif ) or you don't want to check at all because only Linux with procfs or sysfs fills it up by default, as I said. For other platforms, libpci does/can not fill the sizes according to libpci sources. > b. Could you switch to use AtomBIOS and see if load detection works there? > If it does i need to have a look at your BIOS. > To do this please add the option: > Option "UseAtomBIOS" "yes" > to the device section of your xorg.conf and create a logverbose 7 log for the > output. Yes, it does. However, it fails to restore previous text mode when it exits. I will attach two ROMs, one for HDMI and one for DVI. This board has both HDMI and DVI ports and one of them can be selected from BIOS. By selecting the option, corresponding VGA ROM is loaded when BIOS is POST'ed. > I'm going to mark HPD as broken for your chip for now. I see you also checked it in. Thanks, the HPD is properly black-listed for both HDMI and DVI cases. > c. > >> A note on the side: the change to rhd_randr.c should not matter. There is a set > >> of brackets missing, but this should be irrelevant, too. > > > >I know but it was confusing because of the indentation. ;-) > Right. Saw that, should be fixed now :) :-) > Thanks for hanging in so patiently :) Thank YOU for listening to my whining. ;-)
Created attachment 20381 [details] VGA option ROM for HDMI port
Created attachment 20382 [details] VGA option ROM for DVI port
Created attachment 20383 [details] verbose log with ATOM BIOS and HDMI port
Created attachment 20384 [details] verbose log with ATOM BIOS and DVI port
Please note the last two logs are taken without your quirk entry and my hacks to reduce diff against previous logs that I posted.
Created attachment 20561 [details] [review] Fix. This fix makes load detection on DCE3.x hardware more reliable for me. Kim, could you please test this fix? Currently it's for rhd_conntest only. Please check if it prints out the monitor attached to the DAC correctly. If it helps please check if reducing the usleep value to 50 also works. Thanks!
Hmm, interesting. I tried it with different values but nothing worked reliably for me. However, I did the following instead: @@ -854,6 +854,20 @@ RV620DACLoadDetect(void *map, Bool tv, int dac) usleep(32); ret = RegRead(map, offset + RV620_DACA_AUTODETECT_STATUS); + if (!tv && !(ret & 0x111)) { + CARD32 prev = ret & 0x111; + int retries; + for (retries = 1; retries <= 10 ; retries++) { + usleep(32); + ret = RegRead(map, offset + RV620_DACA_AUTODETECT_STATUS); + if (prev != (ret & 0x111)) { +#if 1 + fprintf(stderr, "DAC%i: ret = 0x%x retries = %d\n", dac, ret, retries); +#endif + break; + } + } + } RegWrite(map, offset + RV620_DACA_AUTODETECT_CONTROL, DetectControl); RegWrite(map, offset + RV620_DACA_CONTROL1, Control1); And it works! hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): DAC0: ret = 0x1010011 retries = 7 Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): DAC0: ret = 0x1000011 retries = 3 Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): DAC0: ret = 0x1000011 retries = 2 Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): DAC0: ret = 0x1000011 retries = 2 Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): DAC0: ret = 0x1000011 retries = 7 Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 01:05:00 rhd_conntest: v1.2.3, git branch master, commit dc81290f + changes Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): DAC0: ret = 0x1000011 retries = 5 Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 Can this be a reasonable workaround? Thanks!
Created attachment 20564 [details] [review] A patch that works reliably for me.
Kim, it could be a valid workaround. With the autodetection logic Could you check if the values are oscillating by printing them for every retry? Have you tried to enable the wait algorithm at the beginning of the function by changing the #if 0 to an #if 1?
(In reply to comment #18) > Kim, it could be a valid workaround. Great. > With the autodetection logic Could you check if the values are oscillating by > printing them for every retry? It always returns 0 until it gets the right value. > Have you tried to enable the wait algorithm at the beginning of the function by > changing the #if 0 to an #if 1? I just tried it but it didn't make a difference.
This problem is fixed by the following commits: http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/commit/?id=10dc7797c7b6199117884c907fd1ed33a8ca345b http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/commit/?id=8b89b94d50f08b672cacb6f053dc8dd7ea754183 Please close it. Thanks! Jung-uk Kim
Kim, thanks for hanging in there and checking! I'm sorry it took so long :(
I guess I spoke too soon. I rebuilt the driver and it still shows the problem. It turned out the my hack was in my local tree. :-( To be sure, I rebuilt it from 1.3.0 source + the patch (DACSenseRV620_MethB): hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_DACA HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_NONE hammer# ./rhd_conntest 1:5:0 rhd_conntest: v1.3.0, dist of git branch master, commit 8cbff7bf Found card: ATI Technologies Inc - Radeon HD 3200 Graphics Checking connectors on 0x9610, 0x105B, 0x0E0F (@01:05:00): Load Detection: RHD_OUTPUT_NONE HotPlug: RHD_HPD_0 RHD_HPD_2 DDC: RHD_DDC_0 You see there is one success out of ten tries. If I comment out the method A, it never works, i.e., I tried method B about 100 times but never succeeded. Please also note the DDC was not probed some times. Sorry for the noise. Jung-uk Kim
Does this issue occur with the preferred ati driver (xf86-vide-ati)? If so, please move this to the Driver/Radeon component. Development of radeonhd has pretty much halted and development focus is on the ati driver. Please see http://www.x.org/wiki/radeonhd If the issue does not exist in the ati driver (or if there is no response to this message), this bug will be closed as WONTFIX unless someone contributes a patch.
Closing due to lack of response. Please reopen and move to the Driver/Radeon component if this issue persists with xf86-video-ati
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.