Subject: Re: Linux/SGI /dev/opengl magic ioctl

From: [email-masked] (Robert Tray)
Date: Thu, 11 Sep 1997 21:59:00 -0700

>    From: Miguel de Icaza <[email-masked]>
>    
>    
>    Hello guys,
>    
>       Ok, 2 questions 2 for tonight :-).
>    
>       Ok, I am getting close, just out of curiosity, what does the ioctl
>    cmd=1 do on the /dev/opengl device?  
>    
>       If the ioctl does not return 3, the X server complains.  Right now
>    I have this nice piece of code in the graphics driver:
>    
>    	switch (cmd){
>    		...
>    
>    	case 1:
>    		return 3;
>    		...
>    	}

This is basically a version check.  1 == GFX_SYNC which is supposed
to return a number which the kernel gfx driver and the Xserver agree
is the current version.  (The version you have is 3)

>        Second question: what does the GFX_LABEL ioctl do on the
>    /dev/opengl device?  I am missing this one in my implementation.
>    

The X server sends down the ":display.screen_number".  I don't see
the kernel doing anything with it.

Robert Tray