Re: Multimon failure with two identical PCI cards and driver.

2004-03-12 Thread Cheshire Cat Fish
More info:

lspci reports that indeed, one of my devices has its access ranges disabled.

00:0b.0 Non-VGA unclassified device: PLX Technology, Inc.: Unknown device 
2784 (rev 03) (prog-if 03)
   Subsystem: PLX Technology, Inc.: Unknown device 9056
   Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
   Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- 
TAbort- MAbort- SERR- PERR-
   Latency: 32, cache line size 08
   Region 0: Memory at db00 (32-bit, non-prefetchable) [disabled] 
[size=512]
   Region 1: I/O ports at b800 [disabled] [size=256]
   Region 2: Memory at da00 (32-bit, non-prefetchable) [disabled] 
[size=16M]
   Region 3: Memory at d980 (32-bit, non-prefetchable) [disabled] 
[size=1M]
   Capabilities: [40] Power Management version 2
   Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
   Status: D0 PME-Enable- DSel=0 DScale=0 PME-
   Capabilities: [48] #06 []
   Capabilities: [4c] Vital Product Data

00:0c.0 Non-VGA unclassified device: PLX Technology, Inc.: Unknown device 
2784 (rev 03) (prog-if 03)
   Subsystem: PLX Technology, Inc.: Unknown device 9056
   Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr- 
Stepping- SERR- FastB2B-
   Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- 
TAbort- MAbort- SERR- PERR-
   Latency: 32, cache line size 08
   Region 0: Memory at d900 (32-bit, non-prefetchable) [size=512]
   Region 1: I/O ports at b400 [size=256]
   Region 2: Memory at d400 (32-bit, non-prefetchable) [size=64M]
   Region 3: Memory at d380 (32-bit, non-prefetchable) [size=1M]
   Capabilities: [40] Power Management version 2
   Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)
   Status: D0 PME-Enable- DSel=0 DScale=0 PME-
   Capabilities: [48] #06 []
   Capabilities: [4c] Vital Product Data

Can anyone provide me with some hints were to start looking for this 
problem?  What would cause
my PCI addresses to be disabled?  Presumably the RAC is doing this, but why?

Thanks,
Noel
Ok, I have taken this over from Mike, and I have some more information on 
this.  The problem seems to be in how the devices are mapped into memory.  
BTW, the configuration is actually 3 heads.  An ATI VGA card, and my two 
Image Systems cards, neither of which has any VGA ability.

During ScreenInit we map in the framebuffers for each card.  Right before 
ScreenInit exits, I added code to draw a test pattern on the screen, and 
then pause for a few seconds so I can view it.  This works perfectly for 
both heads.  Once I return from ScreenInit, things go bad. I added similar 
code to the start of SaveScreen, and on the first call to SaveScreen 
framebuffer accesses to the first device device cease to work entirely.  
Framebuffer access to the second device still work, but seem to be slower 
than they should be.  Changing the order of the screens in my XF86Sonfig 
file changes which screen tanks and which works.  It is always the first 
screen intalized that fails.
If I remove either screen from the XF86config file, the remaining screen 
works perfectly (so simply haveing both boards in the system isn't enough 
to cause the failure)

My best guess is that something is happening to my PCI mappings, but how? 
Driver has no accelerations in it, all drawing is direct frame buffer 
access.

Looking at my log file,

(II) XMP: ImageScreenInit drawing test pattern..
(II) XMP: ImageScreenInit exit.
(==) RandR enabled
Screen 1 is using RAC for mem
Screen 1 is using RAC for io
Screen 2 is using RAC for mem
Screen 2 is using RAC for io
(II) Entity 0 shares no resources
(II) Screen 1 shares mem  io resources
(II) Screen 2 shares mem  io resources
Why is RAC being used for my driver?  Why does it say my screens share mem 
and io resources?  There are no shared resources on the Image Systems 
boards.  They do hi-res only and do not have a VGA core.  I assume Entity 0 
is my ATI card.

Where can I find documetation on how Linux/XFree maps and manages PCI 
address spaces?  Is it XFree that does this, or the Linux kernel?



Failing system notes and observations:

1. The video hardware does not have a BIOS or VGA core of any kind.
2. The video driver functions properly when using a single head 
configuration on either head.
3. The video driver and hardware are 8 bit only, one 1200x1600 mode,
with no accelerations.
4. The primary head is lit and will respond to framebuffer writes
after memory mapping in the driver and
  the written data remains unmolested through the entire XServer
session.
5. The cursor appears to move into the drawing area of the primary
head, but is not visible there.
6. Running Xinerama has no effect on the failure to draw on the
primary head.
7. Multimon function is correct when configured to run only one 

Re: DRI and Silicon Motion

2003-09-05 Thread Cheshire Cat Fish
Just so.  Unless otherwise specified, cat_fish's code would be
considered a work for hire, and copyright would belong to the employer.
:-)  Thank you all for your concern in this matter, but it is clearly 
covered in my proposal that the work will remain open source and be 
re-submitted to XFree (and to the DRI project as well, since it appears that 
is a separate code tree).

My primary concern at this time is providing an accurate estimate up front 
for how much work this will be.  Thank you all for your advice and help.  If 
this thing gets approved, I will most certianly be back with more questions.

Noel.
--
A precariously balanced mixture of myopic optimism and rampant paranoia.
_
Need more e-mail storage? Get 10MB with Hotmail Extra Storage.   
http://join.msn.com/?PAGE=features/es

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


DRI and Silicon Motion

2003-09-03 Thread Cheshire Cat Fish
I am investigating supporting DRI and OpenGL for the Silicon Motion driver.
I'm new to both of those, so some of these may be newbie sounding questions.
1) I have the  OpenGL code from the Windows 2000 Silicon Motion driver.  Can 
this code be mostly used as is?  Or will the Linux code be entirely 
different?

2) In the DRI Users Guide, section 3.2-Graphics Hardware, Silicon Motion is 
not listed as currently being supported.  Is this still the case? Is anyone 
working on this?  Or am I starting from scratch?

3) How big of a task am I looking at here? Since I alrady have the Win2k OGL 
code to base my work on, it seems to me it shouldn't be too hard to drop 
that code in and hook it up to DRI.  A few weeks maybe?  Or am I missing 
something fundamental?

Thanks,
Noel.
--
A precariously balanced mixture of myopic optimism and rampant paranoia.
_
MSN 8: Get 6 months for $9.95/month http://join.msn.com/?page=dept/dialup
___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


initial palette wrong.

2003-08-14 Thread Cheshire Cat Fish
I've written a driver for an 8-bpp-only device.  This is a non-VGA device 
and runs as a second display alongside another board (in my case, an S3 - 
also running in 8bpp)

The problem I am seeing is that after I first boot-up the screen colors are 
wrong for my device.  I've verified that I am writing the correct colors to 
the the CLUT, it is that XFree86 is giving me the wrong colors.

Now, if I Ctrl-Alt-F1 to a console (which appears on the S3 card) and then 
Ctrl-Alt-F7 back to the X desktop, now the colors appear correctly.  Or if 
the screen saver kicks in, then when the screen saver exits, my colors will 
be correct.

This is my first X driver, and I am not sure where to start looking.  I am 
not sure how I have caused X to not select the proper colors upon startup. 
Any pointers on where to start looking  would be appreciated.

Thanks,
Noel.
--
A precariously balanced mixture of myopic optimism and rampant paranoia.
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Re: initial palette wrong.

2003-08-14 Thread Cheshire Cat Fish
What are you passing to xf86HandleColormaps() ?

I looked at this, at it appears I need to set CMAP_EVEN_IF_OFFSCREEN.
At least setting that fixed the problem.  Must be a multi-monitor thing???
Anyway, thanks Mark.

Noel.
--
A precariously balanced mixture of myopic optimism and rampant paranoia.
_
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel


Reading a file.

2003-06-26 Thread Cheshire Cat Fish
How do I go about reading a file from within my X driver.  I want to read in 
a table of gamma correction values.  If I use fopen() I get an unresolved 
symbol error.

Do I need to link to libc somehow? Or use something other than fopen()?

Thanks,
Noel.
--
A precariously balanced mixture of myopic optimism and rampant paranoia.
_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

___
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel