Re: options list with 2 drivers (bug 10132) - propably fixed
On Mon, 2007-12-03 at 06:41 +0100, michalwd1979 wrote: I finally managed to get my 2 drivers working on my system. I am attaching a patch that fixed the problem for me, but I am not a dri developer. Please review it, I am not sure if by fixing one problem I did not create another. I started with the problem described here: http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg29940.html but with radeon and mga driver. Dri works only on first screen on second it fails even when Xorg log says that everything is OK. I think that the problem was with extern declaration (in Mesa-7.0.2/include/GL/internal/dri_interface.h) of __driConfigOptions. With 2 extern declarations (in 2 drives) one always hide the other and both drivers try to use the same option list. nConfigOptions is declared as static. I changed declaration of __driConfigOptions to static (in h file as well as in drivers) and now it works. This change breaks xdriinfo (and thus driconf) because the symbol is no longer exported from the driver binary. Does the attached patch fix it? (You'll have to make sure the *_dri.so get regenerated by the patched mklib) -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer diff --git a/bin/mklib b/bin/mklib index 2bfd1b9..7d271de 100755 --- a/bin/mklib +++ b/bin/mklib @@ -208,8 +208,13 @@ case $ARCH in if [ $NOPREFIX = 1 ] ; then # No lib or .so part echo mklib: Making $ARCH shared library: ${LIBNAME} - #OPTS=-shared -Wl,-soname,${LIBNAME} # soname??? - OPTS=-shared + case $ARCH in 'Linux' | 'GNU' | GNU/*) + OPTS=-Xlinker -Bsymbolic -shared + ;; + *) + OPTS=-shared + ;; + esac # Check if objects are 32-bit and we're running in 64-bit # environment. If so, pass -m32 flag to linker. - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4-- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: options list with 2 drivers (bug 10132) - propably fixed
This change breaks xdriinfo (and thus driconf) because the symbol is no longer exported from the driver binary. Does the attached patch fix it? (You'll have to make sure the *_dri.so get regenerated by the patched mklib) You are right, xdriinfo can not find any options for drivers. It seems that we have bigger problem - we can not have 2 extern declarations because one driver always get option from second, but at the same time we need to export the option list. I don't see a simple solution now... mix the names? __driConfigOptions_radeon? But then we will need to change xdriinfo and possibly other things. Do you have any idea? Regards, Michael Widlok - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: options list with 2 drivers (bug 10132) - propably fixed
On Mon, 2007-12-03 at 15:43 +0100, michalwd1979 wrote: This change breaks xdriinfo (and thus driconf) because the symbol is no longer exported from the driver binary. Does the attached patch fix it? (You'll have to make sure the *_dri.so get regenerated by the patched mklib) You are right, xdriinfo can not find any options for drivers. It seems that we have bigger problem - we can not have 2 extern declarations because one driver always get option from second, but at the same time we need to export the option list. I don't see a simple solution now... mix the names? __driConfigOptions_radeon? But then we will need to change xdriinfo and possibly other things. Do you have any idea? Please test my patch. It should fix the problem (by passing -Bsymbolic to ld), but I can't verify it because I don't have multiple cards in any of my machines. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: options list with 2 drivers (bug 10132)
I'm looking at the details in the bugzilla entry right now. This may or may not apply to michalwd1979's problem. I think the problem happens when r128CreateScreen calls driParseOptionInfo. It gets the two arguments __driConfigOptions and __driNConfigOptions. Both are defined in the same r128screen.c file. The error message indicates that there is a mismatch between the two variables. I noticed that __driConfigOptions is public, since driconf needs to be able to access it, while __driNConfigOptions is static. Both drivers (shared objects) have a __driConfigOptions symbol with the same name. I guess what's happening is that the dynamic linker resolves __driConfigOptions to the same object in both drivers in a dual-screen system. On the second screen that happens to be the wrong one. I'm not sure how to fix this. Some linker magic may be needed. You need to make sure that in the r128 driver, __driConfigOptions is resolved to its own version of the symbol in all cases, even when another driver is linked in that has a symbol with the same name. I hope this analysis helps. Regards, Felix Am Freitag, den 30.11.2007, 11:06 +0100 schrieb Michel Dänzer: On Fri, 2007-11-30 at 08:28 +0100, michalwd1979 wrote: Hello, I found this report [Bug 10132] New: dri doesn't work on second head (r128) on the archives, and it seems to be also my problem (radeon 7000 and mga card). I would risk a statement that it would hit any system with 2 drivers that use different options. It is quite strange that there is so little reports about this. I guess that kind of setup is rare. I have tried to find out where the problem is, but I am not a dri developer and it was ... hard. I simply have no idea why both drivers get option list form first screen. Do You think that I have any chance to find the problem? I can spend some time working on it but please point me to right direction. Where should I start looking? I'd start by tracing driParseConfigFiles() to make sure it really only parses options for the specified screen/driver. I'm Cc'ing Felix Kühling, who wrote the driconf code and might be able to give more hints. For your reference Felix, the bug report mentioned above is https://bugs.freedesktop.org/show_bug.cgi?id=10132 . I am not sure if I am right but it seems that drivers get theirs options from xorg.conf and then form drirc file. I tried to play with options in drirc, but this not change anything. In my case MGA drivers constantly gets options defined in xorg.conf for radeon and fails. But how this options were send to it? drirc files are readed when opengl application starts and opens drivers but what is going on with the list from xorg.conf? xorg.conf options don't (directly) affect the Mesa drivers, so they're probably irrelevant for this. -- | Felix Kühling [EMAIL PROTECTED] http://fxk.de.vu | | PGP Fingerprint: 6A3C 9566 5B30 DDED 73C3 B152 151C 5CC1 D888 E595 | - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
options list with 2 drivers (bug 10132) - propably fixed
Hello, I finally managed to get my 2 drivers working on my system. I am attaching a patch that fixed the problem for me, but I am not a dri developer. Please review it, I am not sure if by fixing one problem I did not create another. I started with the problem described here: http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg29940.html but with radeon and mga driver. Dri works only on first screen on second it fails even when Xorg log says that everything is OK. I think that the problem was with extern declaration (in Mesa-7.0.2/include/GL/internal/dri_interface.h) of __driConfigOptions. With 2 extern declarations (in 2 drives) one always hide the other and both drivers try to use the same option list. nConfigOptions is declared as static. I changed declaration of __driConfigOptions to static (in h file as well as in drivers) and now it works. Attached patch should be applied in Mesa-7.0.2 dir with -p1 option. Notes: I did not touch files from other drivers just radeon and mga. Now other might have __driConfigOptions declared as extern, and might bring an error during compile. If static declaration of __driConfigOptions will not bring problems then we should change it everywhere, but now I am just not sure. Regards, Michael W. dual_driver.patch Description: Binary data - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4-- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: options list with 2 drivers (bug 10132)
On Fri, 2007-11-30 at 08:28 +0100, michalwd1979 wrote: Hello, I found this report [Bug 10132] New: dri doesn't work on second head (r128) on the archives, and it seems to be also my problem (radeon 7000 and mga card). I would risk a statement that it would hit any system with 2 drivers that use different options. It is quite strange that there is so little reports about this. I guess that kind of setup is rare. I have tried to find out where the problem is, but I am not a dri developer and it was ... hard. I simply have no idea why both drivers get option list form first screen. Do You think that I have any chance to find the problem? I can spend some time working on it but please point me to right direction. Where should I start looking? I'd start by tracing driParseConfigFiles() to make sure it really only parses options for the specified screen/driver. I'm Cc'ing Felix Kühling, who wrote the driconf code and might be able to give more hints. For your reference Felix, the bug report mentioned above is https://bugs.freedesktop.org/show_bug.cgi?id=10132 . I am not sure if I am right but it seems that drivers get theirs options from xorg.conf and then form drirc file. I tried to play with options in drirc, but this not change anything. In my case MGA drivers constantly gets options defined in xorg.conf for radeon and fails. But how this options were send to it? drirc files are readed when opengl application starts and opens drivers but what is going on with the list from xorg.conf? xorg.conf options don't (directly) affect the Mesa drivers, so they're probably irrelevant for this. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: options list with 2 drivers (bug 10132)
Whoops, I got Felix's address wrong, it's [EMAIL PROTECTED] . I bounced the post there, but please make sure to use the correct address on followups. -- Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
options list with 2 drivers (bug 10132)
Hello, I found this report [Bug 10132] New: dri doesn't work on second head (r128) on the archives, and it seems to be also my problem (radeon 7000 and mga card). I would risk a statement that it would hit any system with 2 drivers that use different options. It is quite strange that there is so little reports about this. I have tried to find out where the problem is, but I am not a dri developer and it was ... hard. I simply have no idea why both drivers get option list form first screen. Do You think that I have any chance to find the problem? I can spend some time working on it but please point me to right direction. Where should I start looking? I am not sure if I am right but it seems that drivers get theirs options from xorg.conf and then form drirc file. I tried to play with options in drirc, but this not change anything. In my case MGA drivers constantly gets options defined in xorg.conf for radeon and fails. But how this options were send to it? drirc files are readed when opengl application starts and opens drivers but what is going on with the list from xorg.conf? Regrds, Michael - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel