Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Jung-uk Kim
On Sunday 21 August 2005 07:55 pm, Vladimir Dergachev wrote:
  And so on, through /dev/dri/card254
 
  Mind you, /dev/dri/card0 exists:
 
  [ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
  total 1
  dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
  dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
  crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0
 
  Any ideas?

 Is the major ok ? On my (linux) system I get:

 crw-rw-rw-  1 root root 226, 0 Aug 21 19:07 card0

 I would expect a difference, but, it might have changed..

FYI, FreeBSD -CURRENT does not use fixed major number any more.  It's 
dynamically assigned when it's created.

Jung-uk Kim

 Also, check that the DRM driver knows your PCI id.

best

   Vladimir Dergachev

  Adam


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Vladimir Dergachev


I would expect a difference, but, it might have changed..


FYI, FreeBSD -CURRENT does not use fixed major number any more.  It's
dynamically assigned when it's created.


Cool ! Is this more devfs style (with kernel space code) or udevd style
(with userspace code) ?

best

  Vladimir Dergachev



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Adam K Kirchhoff

Vladimir Dergachev wrote:



And so on, through /dev/dri/card254

Mind you, /dev/dri/card0 exists:

[ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
total 1
dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0

Any ideas?



Is the major ok ? On my (linux) system I get:

crw-rw-rw-  1 root root 226, 0 Aug 21 19:07 card0

I would expect a difference, but, it might have changed..

Also, check that the DRM driver knows your PCI id.

  best

 Vladimir Dergachev



It's listed:

shared/drm_pciids.txt:0x1002 0x4153 CHIP_RV350 ATI Radeon AS 9600 AS


Would the kernel driver even attach to the device (as it appears to be 
doing) if it didn't know my PCI ID?


Adam



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Eric Anholt
On Mon, 2005-08-22 at 13:54 -0400, Vladimir Dergachev wrote:
 
  I would expect a difference, but, it might have changed..
 
  FYI, FreeBSD -CURRENT does not use fixed major number any more.  It's
  dynamically assigned when it's created.
 
 Cool ! Is this more devfs style (with kernel space code) or udevd style
 (with userspace code) ?

FreeBSD has been using a kernel devfs (and loving it, in my opinion)
since 5.x.  Dynamically assigning majors is somewhat more recent, but
applies to nearly all drivers.

In reference to the OP: I've been using r300 (Radeon 9600, specifically)
on FreeBSD-current since I merged the bits to Mesa CVS.  Not sure what's
going on there.

-- 
Eric Anholt [EMAIL PROTECTED]
http://people.freebsd.org/~anholt/  [EMAIL PROTECTED]



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Jung-uk Kim
On Monday 22 August 2005 01:54 pm, Vladimir Dergachev wrote:
  I would expect a difference, but, it might have changed..
 
  FYI, FreeBSD -CURRENT does not use fixed major number any more. 
  It's dynamically assigned when it's created.

 Cool ! Is this more devfs style (with kernel space code) or udevd
 style (with userspace code) ?

I don't know much about Linux, so I cannot say, but it's not user 
space code for sure.  FreeBSD's devfs is responsible for (randomly) 
allocating major numbers.

Jung-uk Kim

  best

Vladimir Dergachev


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Jung-uk Kim
On Monday 22 August 2005 02:49 pm, Adam K Kirchhoff wrote:
 Vladimir Dergachev wrote:
  And so on, through /dev/dri/card254
 
  Mind you, /dev/dri/card0 exists:
 
  [ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
  total 1
  dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
  dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
  crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0
 
  Any ideas?
 
  Is the major ok ? On my (linux) system I get:
 
  crw-rw-rw-  1 root root 226, 0 Aug 21 19:07 card0
 
  I would expect a difference, but, it might have changed..
 
  Also, check that the DRM driver knows your PCI id.
 
best
 
   Vladimir Dergachev

 It's listed:

 shared/drm_pciids.txt:0x1002 0x4153 CHIP_RV350 ATI Radeon AS 9600
 AS


 Would the kernel driver even attach to the device (as it appears to
 be doing) if it didn't know my PCI ID?

Correct.  AFAIK, if you built r300_dri.so from Mesa CVS, you need 
libGL.so and its friends from the Mesa CVS also.  If you did it 
already, please set:

sysctl hw.dri.0.debug=1

Start Xorg and do:

grep drm /var/log/messages  drm_debug.txt

Please send us drm_debug.txt.

Thanks,

Jung-uk Kim

 Adam


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Adam K Kirchhoff

Jung-uk Kim wrote:


On Monday 22 August 2005 02:49 pm, Adam K Kirchhoff wrote:
 


Vladimir Dergachev wrote:
   


And so on, through /dev/dri/card254

Mind you, /dev/dri/card0 exists:

[ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
total 1
dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0

Any ideas?
   


Is the major ok ? On my (linux) system I get:

crw-rw-rw-  1 root root 226, 0 Aug 21 19:07 card0

I would expect a difference, but, it might have changed..

Also, check that the DRM driver knows your PCI id.

 best

Vladimir Dergachev
 


It's listed:

shared/drm_pciids.txt:0x1002 0x4153 CHIP_RV350 ATI Radeon AS 9600
AS


Would the kernel driver even attach to the device (as it appears to
be doing) if it didn't know my PCI ID?
   



Correct.  AFAIK, if you built r300_dri.so from Mesa CVS, you need 
libGL.so and its friends from the Mesa CVS also.




It's all from Mesa CVS.

 If you did it 
already, please set:


sysctl hw.dri.0.debug=1

Start Xorg and do:

grep drm /var/log/messages  drm_debug.txt

Please send us drm_debug.txt.
 



Attached.  Thanks!

Adam
Aug 22 15:23:06 sorrow kernel: drm0: ATI Radeon AS 9600 AS port 0xa000-0xa0ff 
mem 0xc000-0xcfff,0xe900-0xe900 irq 10 at device 0.0 on pci1
Aug 22 15:23:06 sorrow kernel: info: [drm] AGP at 0xe000 128MB
Aug 22 15:23:06 sorrow kernel: info: [drm] Initialized radeon 1.17.0 20050720
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_open] open_count = 0
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_open_helper] pid = 897, minor = 0
Aug 22 15:50:24 sorrow kernel: [drm:pid897:radeon_driver_open] 
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_addmap] offset = 0xe900, 
size = 0x0001, type = 1
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_addmap] Added map 1 
0xe900/0x1
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_addmap] offset = 0xc000, 
size = 0x1000, type = 0
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_addmap] Added map 0 
0xc000/0x1000
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_firstopen] 
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, cmd=0xc0246400, 
nr=0x00, dev 0xc2358300, auth=1
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, cmd=0xc0246400, 
nr=0x00, dev 0xc2358300, auth=1
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_close] open_count = 1
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_close] pid = 897, device = 
0xc2358300, open_count = 1
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_lastclose] 
Aug 22 15:50:24 sorrow kernel: [drm:pid897:radeon_do_cleanup_cp] 
Aug 22 15:50:24 sorrow kernel: [drm:pid897:drm_rmmap] mtrr_del = 0
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_open] open_count = 0
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_open_helper] pid = 897, minor = 0
Aug 22 15:50:25 sorrow kernel: [drm:pid897:radeon_driver_open] 
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_addmap] offset = 0xe900, 
size = 0x0001, type = 1
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_addmap] Added map 1 
0xe900/0x1
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_addmap] offset = 0xc000, 
size = 0x1000, type = 0
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_addmap] Added map 0 
0xc000/0x1000
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_firstopen] 
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, cmd=0xc0246400, 
nr=0x00, dev 0xc2358300, auth=1
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, cmd=0xc0246400, 
nr=0x00, dev 0xc2358300, auth=1
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_close] open_count = 1
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_close] pid = 897, device = 
0xc2358300, open_count = 1
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_lastclose] 
Aug 22 15:50:25 sorrow kernel: [drm:pid897:radeon_do_cleanup_cp] 
Aug 22 15:50:25 sorrow kernel: [drm:pid897:drm_rmmap] mtrr_del = 0
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_open] open_count = 0
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_open_helper] pid = 897, minor = 0
Aug 22 15:50:26 sorrow kernel: [drm:pid897:radeon_driver_open] 
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_addmap] offset = 0xe900, 
size = 0x0001, type = 1
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_addmap] Added map 1 
0xe900/0x1
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_addmap] offset = 0xc000, 
size = 0x1000, type = 0
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_addmap] Added map 0 
0xc000/0x1000
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_firstopen] 
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, cmd=0xc0106407, 
nr=0x07, dev 0xc2358300, auth=1
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, cmd=0xc0086401, 
nr=0x01, dev 0xc2358300, auth=1
Aug 22 15:50:26 sorrow kernel: [drm:pid897:drm_ioctl] pid=897, 

Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Jung-uk Kim
On Monday 22 August 2005 03:53 pm, Adam K Kirchhoff wrote:
 Jung-uk Kim wrote:
 On Monday 22 August 2005 02:49 pm, Adam K Kirchhoff wrote:
 Vladimir Dergachev wrote:
 And so on, through /dev/dri/card254
 
 Mind you, /dev/dri/card0 exists:
 
 [ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
 total 1
 dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
 dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
 crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0
 
 Any ideas?
 
 Is the major ok ? On my (linux) system I get:
 
 crw-rw-rw-  1 root root 226, 0 Aug 21 19:07 card0
 
 I would expect a difference, but, it might have changed..
 
 Also, check that the DRM driver knows your PCI id.
 
   best
 
  Vladimir Dergachev
 
 It's listed:
 
 shared/drm_pciids.txt:0x1002 0x4153 CHIP_RV350 ATI Radeon AS
  9600 AS
 
 
 Would the kernel driver even attach to the device (as it appears
  to be doing) if it didn't know my PCI ID?
 
 Correct.  AFAIK, if you built r300_dri.so from Mesa CVS, you need
 libGL.so and its friends from the Mesa CVS also.

 It's all from Mesa CVS.

   If you did it
 already, please set:
 
  sysctl hw.dri.0.debug=1
 
 Start Xorg and do:
 
  grep drm /var/log/messages  drm_debug.txt
 
 Please send us drm_debug.txt.

 Attached.  Thanks!

It seems you built DRM from DRI CVS, right?  Can you try the following 
patch and do the test again?

http://people.freebsd.org/~jkim/fbsd_vs_drm-20050818.diff

Thanks,

Jung-uk Kim

 Adam


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Adam K Kirchhoff

Jung-uk Kim wrote:


 It seems you built DRM from DRI CVS, right?

Yep.  Is that not the correct way to do it these days?

 Can you try the following
 patch and do the test again?

 http://people.freebsd.org/~jkim/fbsd_vs_drm-20050818.diff


That patched solved my problems.  I now have DRI working on FreeBSD with 
my r300.  Thanks!


Adam


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-22 Thread Jung-uk Kim
On Monday 22 August 2005 06:23 pm, Adam K Kirchhoff wrote:
 Jung-uk Kim wrote:
   It seems you built DRM from DRI CVS, right?

 Yep.  Is that not the correct way to do it these days?

:-)  It IS the correct way.  However DRI CVS is not always stable, at 
least for FreeBSD.  More stable version goes to FreeBSD CVS.

   Can you try the following
   patch and do the test again?
  
   http://people.freebsd.org/~jkim/fbsd_vs_drm-20050818.diff

 That patched solved my problems.  I now have DRI working on FreeBSD
 with my r300.  Thanks!

Thank you for testing the patch,

Jung-uk Kim


---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel


r300 + FreeBSD -CURRENT?

2005-08-21 Thread Adam K Kirchhoff


I'm curious if anyone has gotten r300 working on FreeBSD now that the 
driver has been merged with Mesa and the DRM cvs tree? 

I managed to get Mesa CVS to build on FreeBSD with some help from Adam 
Jackson and Daniel Stone on irc today.  DRM from the cvs tree compiled 
as well.  The kernel module loads when I start X:


drm0: ATI Radeon AS 9600 AS port 0xa000-0xa0ff mem 
0xc000-0xcfff,0xe900-0xe900 irq 10 at device 0.0 on pci1

info: [drm] AGP at 0xe000 128MB
info: [drm] Initialized radeon 1.17.0 20050720

Xorg gives me the standard warning about DRM on r300:

(WW) RADEON(0): Enabling DRM support

   *** Direct rendering support is highly experimental for Radeon 9500
   *** and newer cards. The 3d mesa driver is not provided in this 
tree.
   *** A very experimental (and incomplete) version is available 
from Mesa CVS.
   *** Additional information can be found on 
http://r300.sourceforge.net

   *** This message has been last modified on 2005-08-07.


But Direct Rendering is disabled.  I get:

drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenByBusid: Searching for BusID pci::01:00.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 6, (OK)
drmOpenByBusid: drmOpenMinor returns 6
drmOpenByBusid: drmGetBusid reports
drmOpenDevice: node name is /dev/dri/card1
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: open result is -1, (No such file or directory)
drmOpenDevice: Open failed
drmOpenByBusid: drmOpenMinor returns -1013

And so on, through /dev/dri/card254

Mind you, /dev/dri/card0 exists:

[ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
total 1
dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0

Any ideas?

Adam



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel


Re: r300 + FreeBSD -CURRENT?

2005-08-21 Thread Vladimir Dergachev


And so on, through /dev/dri/card254

Mind you, /dev/dri/card0 exists:

[ [EMAIL PROTECTED] - ~ ]: ls -la /dev/dri
total 1
dr-xr-xr-x  2 root  wheel   512 Aug 21 18:37 .
dr-xr-xr-x  5 root  wheel   512 Dec 31  1969 ..
crw-rw-rw-  1 root  wheel0, 162 Aug 21 18:35 card0

Any ideas?


Is the major ok ? On my (linux) system I get:

crw-rw-rw-  1 root root 226, 0 Aug 21 19:07 card0

I would expect a difference, but, it might have changed..

Also, check that the DRM driver knows your PCI id.

  best

 Vladimir Dergachev




Adam



---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel




---
SF.Net email is Sponsored by the Better Software Conference  EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile  Plan-Driven Development * Managing Projects  Teams * Testing  QA
Security * Process Improvement  Measurement * http://www.sqe.com/bsce5sf
--
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel