[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DRI1 for xserver-xorg-video-savage / libmesa



Dear X list,

Maybe it is better style to split those topics in multiple mails or
even file bug reports. On the other hand I am still drafting and think
the topics are related and it's easier to pick something to answer.

Am Sat, 15 Jun 2013 05:25:11 +0200
schrieb kardan <kardan@riseup.net>:

> Dear X list,
> 
> T23 1] is my laptop, SuperSavage my VGA card for which is not DRI2
> capable and DRI1 support has been dropped in libgl1-mesa-dri in
> 0.8.0.1 [2] as beeing deprecated upstream [3] (e4344161bd) in Aug
> 2011.[4].
> 
> $ lspci -knnvvv -d
> 5333:8c2e 01:00.0 VGA compatible controller [0300]: S3 Inc.
> SuperSavage IX/C SDR [5333:8c2e] (rev 05) (prog-if 00 [VGA
> controller]) Subsystem: IBM ThinkPad T23 [1014:01fc] Control: I/O+
> Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR-
> FastB2B- DisINTx- Status: Cap+ 66MHz+ UDF- FastB2B- ParErr-
> DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx- Latency:
> 64 (1000ns min, 63750ns max), Cache Line Size: 32 bytes Interrupt:
> pin A routed to IRQ 11 Region 0: Memory at c0100000 (32-bit,
> non-prefetchable) [size=512K] Region 1: Memory at e8000000 (32-bit,
> prefetchable) [size=64M] Region 2: Memory at e4000000 (32-bit,
> prefetchable) [size=64M] Region 3: Memory at e0000000 (32-bit,
> prefetchable) [size=32M] [virtual] Expansion ROM at e2000000
> [disabled] [size=64K] Capabilities: <access denied>
> 
> mesa (8.0-1) experimental; urgency=low [ Cyril Brulebois ]
>   * New upstream release.
>   * Update rules file to strop building DRI1 drivers, they went away
>     with the following upstream commit:
>     - dri: Remove all DRI1 drivers (e4344161bd).
> 
> ${ORIGIN}/dri/savage_dri.so failed (${ORIGIN}/dri/savage_dri.so:
> cannot open shared object file: No such file or directory) libGL:
> OpenDriver: warning: couldn't open libtxc_dxtn.so, software DXTn
> compression/decompression unavailable
> (full glxinfo output is attached)
Sorry, forgot that one before.

> On the gentoo forum [6] was a hint to just install DRI from mesa 7.11
Here is what I just did, luckily it's was not as complicated as in [1]

$ git clone git://anongit.freedesktop.org/git/mesa/mesa
$ git checkout mesa-7.9.2
$ ./configure --enable-debug --enable-32-bit --with-dri-drivers=savage
$ make # went all fine

The modules were installed to /usr/lib/dri from where I copied them
to /usr/lib/i386-linux-gnu/dri/. (Just in case somebody wants to
reproduce).

The first try with Xephyr and awesome in a 1024x768 window was promising

$ glxinfo
server glx vendor string: SGI
server glx version string: 1.4
OpenGL renderer string: Mesa DRI SuperSavage 20061110 AGP 1x x86/MMX/SSE

$ glxgears
libGL: XF86DRIGetClientDriverName: 2.3.4 savage (screen 0)
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/tls/savage_dri.so
libGL: OpenDriver: trying /usr/lib/i386-linux-gnu/dri/savage_dri.so
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: Searching for BusID pci:0000:01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 4, (OK)
drmOpenByBusid: drmOpenMinor returns 4
drmOpenByBusid: Interface 1.4 failed, trying 1.1
drmOpenByBusid: drmGetBusid reports pci:0000:01:00.0
libGL: Can't open configuration file /home/kardan/.drirc: No such file
or directory.
1461 frames in 5.0 seconds = 292.129 FPS

Restarting the X server even doubled the pleasure.

Mesa: Mesa 7.9.2 DEBUG build Jun 15 2013 13:12:13
Mesa warning: couldn't open libtxc_dxtn.so, software DXTn
compression/decompression unavailable 
2429 frames in 5.0 seconds = 485.674 FPS

From 10 to 500 -  the time paid quite off. However glxinfo exits with
code 1. I am not sure how to interpret those values to gather more info.
<
X Error of failed request:  BadDrawable (invalid Pixmap or Window
parameter) Major opcode of failed request:  136 (XFree86-DRI)
  Minor opcode of failed request:  9 ()
  Resource id in failed request:  0x1400004
  Serial number of failed request:  45
  Current serial number in output stream:  45
[Inferior 1 (process 19607) exited with code 01]
>

Once there was a trace in Xephyr, not very informative in my eyes:
<
Backtrace:
0: Xephyr (xorg_backtrace+0x49) [0xb7772e19]
1: Xephyr (mieqEnqueue+0x22b) [0xb76903db]
2: Xephyr (0xb75dc000+0x63465) [0xb763f465]
3: Xephyr (0xb75dc000+0x8951d) [0xb766551d]
4: Xephyr (0xb75dc000+0x898dc) [0xb76658dc]
5: Xephyr (0xb75dc000+0x25cd2) [0xb7601cd2]
6: Xephyr (0xb75dc000+0x89bb1) [0xb7665bb1]
7: Xephyr (BlockHandler+0x56) [0xb762e3c6]
8: Xephyr (WaitForSomething+0xfa) [0xb777003a]
9: Xephyr (0xb75dc000+0x4e14e) [0xb762a14e]
10: Xephyr (0xb75dc000+0x23585) [0xb75ff585]
11: /lib/i386-linux-gnu/i686/cmov/libc.so.6 (__libc_start_main+0xe6)
[0xb70b2e46] 12: Xephyr (0xb75dc000+0x238d9) [0xb75ff8d9]
>

I was curious about that libtxc_dxtn.so thing and found

< http://people.freedesktop.org/~cbrill/libtxc_dxtn/
> Currently, s3tc is supported on all graphic cards which use the radeon
> (original Radeon, VE, 7000, 7200, 7500,  some Radeon IGP), r200
> (Radeon 8500, 9100, 9000, 9200, IGP9100 (RS300)), i830 (i830, i845,
> i852, i855, i865 - of course only the chipset versions which actually
> have integrated graphics...) and i915 driver (btw the i830 driver is
> considered obsolete, use the i915 driver instead). Other DRI drivers
> are not supported, even if the hardware could do it, at least not
> until someone writes the code for it (at least for the savage driver
> this would be possible).

erm, i never wrote a video driver before. Where to start? [2] [3]

I installed it, the warning disappeared, but there was no change in
performance (as expected) except the glx version changing from 1.4 to
1.2. (see attached diff). Has anybody an eye on this?

BTW what is the proper way to handle the manual issue #340993?
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340993

(The mentioned segfault in glxdemo with no/wrong DISPLAY is present in
8.1.0 also. As there are no stripped symbols in a package I used the
source mentioned in #706022.

Program received signal SIGSEGV, Segmentation fault.
make_rgb_db_window (dpy=<optimized out>, width=<optimized out>, height=<optimized out>) at glxdemo.c:59
59         scrnum = DefaultScreen( dpy );
Thread 1 (Thread 0xb7966a20 (LWP 15008)):
#0  make_rgb_db_window (dpy=<optimized out>, width=<optimized out>, height=<optimized out>) at glxdemo.c:59
#1  main (argc=1, argv=0xbffff5e4) at glxdemo.c:118

#706022 There is a new upstream version available (8.1.0)
< http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706022
> I have pushed the new upstream version to our git repository[1],
> should be uploaded some time after the Wheezy release.
> 1. http://anonscm.debian.org/gitweb/?p=pkg-xorg/app/mesa-demos.git

Thanks,
Kardan

1] http://dri.freedesktop.org/wiki/Building/
2] https://en.wikipedia.org/wiki/DXTn
3] http://dri.freedesktop.org/wiki/S3TC/
 
dxtn related commits in mesa (see git url above)

commit 9388ce41917fa4c706c5e284d960e1ca648ee935
Author: José Fonseca <jfonseca@vmware.com>
Date:   Wed Mar 31 22:46:42 2010 +0100

    util: Hook into libtxc_dxtn.so (WIP).

commit 3bf12c8bea667f5fff0b6f495820a27141f595a2
Author: Maciej Cencora <m.cencora@gmail.com>
Date:   Wed Nov 18 22:19:25 2009 +0100

    r300: allow disabling s3tc support if libtxc_dxtn is available

Attachment: glxgears.dri1
Description: Binary data

Attachment: glxinfo.dri1
Description: Binary data

Attachment: glxinfo.nodri
Description: Binary data

1,2c1,2
< name of display: :1.0
< display: :1  screen: 0
---
> name of display: :0
> display: :0  screen: 0
5c5
< server glx version string: 1.4
---
> server glx version string: 1.2
7,8c7,8
<     GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
<     GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
---
>     GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, 
>     GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_OML_swap_method, 
10c10
<     GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event
---
>     GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
23c23
< GLX version: 1.4
---
> GLX version: 1.2
29c29
<     GLX_SGIX_pbuffer
---
>     GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
44,46c44,47
<     GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_edge_clamp, 
<     GL_EXT_texture_env_add, GL_EXT_texture_lod_bias, GL_EXT_texture_object, 
<     GL_EXT_vertex_array, GL_APPLE_packed_pixels, GL_IBM_multimode_draw_arrays, 
---
>     GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_compression_s3tc, 
>     GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add, 
>     GL_EXT_texture_lod_bias, GL_EXT_texture_object, GL_EXT_vertex_array, 
>     GL_APPLE_packed_pixels, GL_IBM_multimode_draw_arrays, 
50c51
<     GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays
---
>     GL_SGIS_texture_lod, GL_SUN_multi_draw_arrays, GL_S3_s3tc
52c53
< 12 GLX Visuals
---
> 16 GLX Visuals
56,67c57,72
< 0x0fd 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x0fe 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x0ff 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x100 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x101 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x102 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x11a 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x11b 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x11c 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x11d 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x11e 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x11f 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
---
> 0x021 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x053 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x054 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x055 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x056 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x057 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
> 0x058 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x059 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
> 0x05a 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x05b 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x05c 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x05d 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x05e 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x05f 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
> 0x060 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x061 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
69c74
< 12 GLXFBConfigs:
---
> 16 GLXFBConfigs:
73,84c78,93
< 0x085 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x086 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x087 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x088 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x089 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x08a 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x0df 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x0e0 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x0e1 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x0e2 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
< 0x0e3 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
< 0x0e4 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
---
> 0x043 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x044 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x045 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x046 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x047 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x048 16 tc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
> 0x049 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x04a 16 tc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
> 0x04b 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x04c 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x04d 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0  0  0  0  0  0 0 None
> 0x04e 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  0 16 16 16  0  0 0 Slow
> 0x04f 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x050 16 dc  0  16  0 r  . .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow
> 0x051 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8  0  0  0  0  0 0 Slow
> 0x052 16 dc  0  16  0 r  y .   5  6  5  0 .  .  0 16  8 16 16 16  0  0 0 Slow

Attachment: glxinfo.txc
Description: Binary data


Reply to: