Re: [Dri-devel] R200-0-1-branch devfs patch.

2002-07-16 Thread Michel Dänzer

On Tue, 2002-07-16 at 07:41, Eric Anholt wrote:
 On Mon, 2002-07-15 at 23:15, Mike Mestnik wrote:
 
  2. There is no suported flag, so DRM_SUP can go.
 
 Well, it removes the ability for a platform to simply not have
 __REALLY_HAVE_SG (for example, this was the case on FreeBSD for quite a
 while, and might be the case on a new OS, too) and by doing that not
 support the PCI versions of the cards.  When we support alpha on
 FreeBSD, we won't have AGP for it, so it would be nice to disable
 support for the AGP cards from the PCI ids (so they don't get probed as
 supported cards and then attach the DRM uselessly).

I was going to say: the AGP cards work with PCI GART though (the ATI
cards do), but I guess you mean as yet AGP only cards like Matrox?


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast



---
This sf.net email is sponsored by: Jabber - The world's fastest growing
real-time communications platform! Don't just IM. Build it in!
http://www.jabber.com/osdn/xim
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



Re: [Dri-devel] R200-0-1-branch devfs patch.

2002-07-15 Thread Eric Anholt

On Mon, 2002-07-15 at 23:15, Mike Mestnik wrote:
 It was a copy/past job.  I'm working on rewriting a lot of it, the main point of the 
patch is to
 get devfs working.  The pci ids are only needed if there is more than one card(under 
linux) and
 the code was copied from BSD so I just assumed that things would work there also.
 
 I'm going to rewrite the device struct to match the one expected by linux...
 
 struct pci_device_id {
 unsigned int vendor, device;/* Vendor and device ID or 
PCI_ANY_ID */
 unsigned int subvendor, subdevice;  /* Subsystem ID's or PCI_ANY_ID */
 unsigned int class, class_mask; /* (class,subclass,prog-if) triplet 
*/
 unsigned long driver_data;  /* Data private to the driver */
 };
 
 1. There is no name feild.

The name field is nice on FreeBSD so people can see what actual device
it's attaching to, and so that when I get a (limited) bug report with a
dmesg I can see it easily.  It might fit into driver_data, unless that's
reserved for something else in your scheme.

 2. There is no suported flag, so DRM_SUP can go.

Well, it removes the ability for a platform to simply not have
__REALLY_HAVE_SG (for example, this was the case on FreeBSD for quite a
while, and might be the case on a new OS, too) and by doing that not
support the PCI versions of the cards.  When we support alpha on
FreeBSD, we won't have AGP for it, so it would be nice to disable
support for the AGP cards from the PCI ids (so they don't get probed as
supported cards and then attach the DRM uselessly).

What does using that linux version of the struct do to improve Linux
support?  (your other mail about it confused me).

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




---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



[Dri-devel] R200-0-1-branch devfs patch.

2002-07-14 Thread Mike Mestnik

I patched my devfs patch so it can be used with the r200 branch.  This was needed b/c 
my original
patch depended upon the shared structure introduced for BSD.  BTW dose the R200 work 
on BSD?

__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com

diff -aNur orig/linux/drm/kernel/drm.h myne/linux/drm/kernel/drm.h
--- orig/linux/drm/kernel/drm.h Fri Jul  5 03:31:09 2002
+++ myne/linux/drm/kernel/drm.h Wed Jul 10 05:11:30 2002
@@ -80,6 +80,7 @@
 
 #if CONFIG_XFREE86_VERSION = XFREE86_VERSION(4,1,0,0)
 #define DRM_MAJOR   226
+/* If max minor is bigger than  there is a buffer overrun */
 #define DRM_MAX_MINOR   15
 #endif
 #define DRM_NAME   drm /* Name in kernel, /dev, and /proc*/
@@ -439,7 +440,7 @@
 #define DRM_IOCTL_SG_ALLOC DRM_IOW( 0x38, drm_scatter_gather_t)
 #define DRM_IOCTL_SG_FREE  DRM_IOW( 0x39, drm_scatter_gather_t)
 
-/* Device specfic ioctls should only be in their respective headers
+/* Device specific ioctls should only be in their respective headers
  * The device specific ioctl range is 0x40 to 0x79.  */
 #define DRM_COMMAND_BASE0x40
 
diff -aNur orig/linux/drm/kernel/drmP.h myne/linux/drm/kernel/drmP.h
--- orig/linux/drm/kernel/drmP.hFri Jul  5 03:31:09 2002
+++ myne/linux/drm/kernel/drmP.hWed Jul 10 00:35:48 2002
@@ -69,6 +69,7 @@
 #include linux/tqueue.h
 #include linux/poll.h
 #include asm/pgalloc.h
+#include linux/devfs_fs_kernel.h
 #include drm.h
 
 #include drm_os_linux.h
@@ -108,6 +109,8 @@
 /* Begin the DRM...
  */
 
+#define DRM_SUP_LINUX 1
+
 #define DRM_DEBUG_CODE 2 /* Include debugging code (if  1, then
 also include looping detection. */
 
@@ -271,10 +274,13 @@
 typedef int drm_ioctl_t( struct inode *inode, struct file *filp,
 unsigned int cmd, unsigned long arg );
 
-typedef struct drm_pci_list {
-   u16 vendor;
-   u16 device;
-} drm_pci_list_t;
+typedef struct drm_chipinfo
+{
+   int vendor;
+   int device;
+   int supported;
+   char *name;
+} drm_chipinfo_t;
 
 typedef struct drm_ioctl_desc {
drm_ioctl_t  *func;
@@ -522,6 +528,7 @@
char  *unique;  /* Unique identifier: e.g., busid  */
int   unique_len;   /* Length of unique field  */
dev_t device;   /* Device number for mknod */
+   devfs_handle_tdev_handle;   /* Device handel for devfs */
char  *devname; /* For /proc/interrupts*/
 
int   blocked;  /* Blocked due to VC switch?   */
diff -aNur orig/linux/drm/kernel/drm_drv.h myne/linux/drm/kernel/drm_drv.h
--- orig/linux/drm/kernel/drm_drv.h Fri Jul  5 03:31:09 2002
+++ myne/linux/drm/kernel/drm_drv.h Wed Jul 10 05:53:30 2002
@@ -87,6 +87,16 @@
 #ifndef __HAVE_KERNEL_CTX_SWITCH
 #define __HAVE_KERNEL_CTX_SWITCH   0
 #endif
+#ifndef DRM_MAX_MINOR
+/*
+ * Do not try to bend the spoon, that's impossible.
+ * Instead edit drm.h
+ * 
+ * This is only hear for the case where something is wrong with your computer.
+ */
+# define DRM_MAX_MINOR 16
+#endif
+
 
 #ifndef DRIVER_PREINIT
 #define DRIVER_PREINIT()
@@ -145,7 +155,7 @@
 #endif
 
 /*
- * The default number of instances (minor numbers) to initialize.
+ * The default number of instances (minor numbers) to initialise.
  */
 #ifndef DRIVER_NUM_CARDS
 #define DRIVER_NUM_CARDS 1
@@ -338,7 +348,7 @@
 * in drm_dma_enqueue.  This is more resource-efficient for
 * hardware that does not do DMA, but may mean that
 * drm_select_queue fails between the time the interrupt is
-* initialized and the time the queues are initialized.
+* initialised and the time the queues are initialised.
 */
DRIVER_POSTSETUP();
return 0;
@@ -501,14 +511,14 @@
 }
 
 /*
- * Figure out how many instances to initialize.
+ * Figure out how many instances to initialise.
  */
 static int drm_count_cards(void)
 {
int num = 0;
 #if defined(DRIVER_CARD_LIST)
int i;
-   drm_pci_list_t *l;
+   drm_chipinfo_t *l;
u16 device, vendor;
struct pci_dev *pdev = NULL;
 #endif
@@ -519,14 +529,19 @@
num = DRIVER_COUNT_CARDS();
 #elif defined(DRIVER_CARD_LIST)
for (i = 0, l = DRIVER_CARD_LIST; l[i].vendor != 0; i++) {
+   if (l[i].supported) 
+{
pdev = NULL;
vendor = l[i].vendor;
device = l[i].device;
if(device == 0x) device = PCI_ANY_ID;
if(vendor == 0x) vendor = PCI_ANY_ID;
while ((pdev = pci_find_device(vendor, device, pdev))) {
+  printk(There is a %s in slot %s.\n,
+ l[i].name, pdev-slot_name);
num++;
  

Fwd: [Dri-devel] R200-0-1-branch devfs patch.

2002-07-14 Thread Mike Mestnik

Opps, forgot to say, this patch is fully functional but incomplete.  It still needs 
PCI ids,
however this is only needed if you have more than one card.


--- Mike Mestnik [EMAIL PROTECTED] wrote:
 From: Mike Mestnik [EMAIL PROTECTED]
 To: lists.sourceforge.net dri-devel [EMAIL PROTECTED]
 Subject: [Dri-devel] R200-0-1-branch devfs patch.
 Date: Sun, 14 Jul 2002 20:33:17 -0700 (PDT)
 
 I patched my devfs patch so it can be used with the r200 branch.  This was needed 
b/c my
 original
 patch depended upon the shared structure introduced for BSD.  BTW dose the R200 work 
on BSD?
 


__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com


---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



Re: [Dri-devel] R200-0-1-branch devfs patch.

2002-07-14 Thread Keith Whitwell

Mike Mestnik wrote:
 I patched my devfs patch so it can be used with the r200 branch.  This was needed 
b/c my original
 patch depended upon the shared structure introduced for BSD.  BTW dose the R200 work 
on BSD?
 

I've got the bsd changes merged in my local cvs.  I need to build a test box  
check it works before I commit.

Keith





---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel