From pxc@lists.prosa.it  Fri May  4 08:35:25 2001
From: pxc@lists.prosa.it (Pragyan)
Date: Fri, 4 May 2001 03:35:25 -0400 (EDT)
Subject: [Pxc] Trouble with "pxc_load"
Message-ID: <20010504073559.5B8041F1@mir.prosa.it>

Hello,

I am having the following problem while loading the driver for PXC-200L02

After compiling, when I type "pxc_load" I am getting an error message
that says

"Loading pxc200 device driver (./pxc.o)..../pxc.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters
 failed"


or to be more specific, if I type "/sbin/insmod pxc.o" I am getting

"pxc.o: init_module: Device or resource busy
Hint: insmod errors can be caused by incorrect module parameters, including invalid IO or IRQ parameters"

Is there any way of getting around this problem? Any tips or help would
be appreciated.

Thanks,
Pragyan




From pxc@lists.prosa.it  Fri May  4 11:53:16 2001
From: pxc@lists.prosa.it (Alessandro Rubini)
Date: Fri, 4 May 2001 12:53:16 +0200
Subject: [Pxc] Trouble with "pxc_load"
In-Reply-To: <20010504073559.5B8041F1@mir.prosa.it>
Message-ID: <20010504125316.A19749@morgana.systemy.it>

Hi.

> "pxc.o: init_module: Device or resource busy
> Hint: insmod errors can be caused [...]

Could you please look at what does the kernel say? It's in /var/log/kern.log
or equivalent file.

Most likely you didn't reserve high memory for DMA, see the documentation
about this problem.

/alessandro, who's delaying work on pxc by a week (deliver next week)


From pxc@lists.prosa.it  Fri May  4 19:47:31 2001
From: pxc@lists.prosa.it (Pragyan)
Date: Fri, 4 May 2001 14:47:31 -0400 (EDT)
Subject: [Pxc] Trouble with "pxc_load"
In-Reply-To: <20010504125316.A19749@morgana.systemy.it> from "Alessandro Rubini" at May 4, 2001 12:53:16 pm
Message-ID: <20010504184750.04A7E1F0@mir.prosa.it>

Hi Alessandro and others,

Well, here is what the kernel says..

PCI: Enabling bus mastering for device 00:98
found PXC200L: mem=0xffbea000, irq=9
allocator: no free high memory to use

I think your guess is right. If that's the problem, do I have to 
change lilo.conf and allocate memory for DMA. etc. etc.?

Thanks very much,
Pragyan


> 
> 
> Hi.
> 
> > "pxc.o: init_module: Device or resource busy
> > Hint: insmod errors can be caused [...]
> 
> Could you please look at what does the kernel say? It's in /var/log/kern.log
> or equivalent file.
> 
> Most likely you didn't reserve high memory for DMA, see the documentation
> about this problem.
> 
> /alessandro, who's delaying work on pxc by a week (deliver next week)
> 
> __
> Pxc mailing list at Pxc@lists.prosa.it
> Send help as subject to pxc-request@lists.prosa.it for help
> Archives at http://lists.prosa.it/pipermail/pxc


From pxc@lists.prosa.it  Tue May  8 09:02:53 2001
From: pxc@lists.prosa.it (Rob Deuel)
Date: Mon, 07 May 2001 22:02:53 -1000
Subject: [Pxc] Problem
Message-ID: <4.2.0.58.20010507220032.00a1a800@pop.maui.net>

I am running (or rather trying to) your version "pxc-0.28" for the 
Imagenation pxc200F video board.
Running on i686 cpu, RH 6.2, kernel 2.2.14-5.0.

Seems to have installed OK.
Loads OK.

But, when I try to run pxc_xgrab (or pxc_live, or any other), I get 
"application initialization failed.  No display name and no $DISPLAY 
environment variable".  And "invalid argument".

What have I missed?
Any help will be greatly appreciated.
Thanks. 


From pxc@lists.prosa.it  Tue May  8 09:18:57 2001
From: pxc@lists.prosa.it (Chanop Silpa-Anan)
Date: Tue, 8 May 2001 18:18:57 +1000
Subject: [Pxc] Problem
In-Reply-To: <4.2.0.58.20010507220032.00a1a800@pop.maui.net>; from robdeuel@maui.net on Mon, May 07, 2001 at 10:02:53PM -1000
References: <4.2.0.58.20010507220032.00a1a800@pop.maui.net>
Message-ID: <20010508181857.A28819@dynax.anu.edu.au>

Hi rob,

Once upon a time, I heard Rob Deuel say

> I am running (or rather trying to) your version "pxc-0.28" for the 
> Imagenation pxc200F video board.
> Running on i686 cpu, RH 6.2, kernel 2.2.14-5.0.
> 
> Seems to have installed OK.
> Loads OK.
> 
> But, when I try to run pxc_xgrab (or pxc_live, or any other), I get 
> "application initialization failed.  No display name and no $DISPLAY 
> environment variable".  And "invalid argument".
> 
> What have I missed?
> Any help will be greatly appreciated.
> Thanks. 

It sounds like your are running the "pxc_xgrab" with the wrong environment
for X. May be, you did su to root and try to run those programs or run 
those programs in linux console.

I believe that pxc_load does set permission of the device to 666, therefore,
you can use normal user account to access the device.

Check your environment that it is sane, e.g. the DISPLAY variable. If it's
there, check the permission of the display, xhost may help.


Chanop
-- 
 ##########################################
 #Chanop Silpa-Anan                       #
 #gpg @ http://dynax.anu.edu.au/chanop.asc#
 ##########################################


From pxc@lists.prosa.it  Wed May  9 03:02:15 2001
From: pxc@lists.prosa.it (Rob Deuel)
Date: Tue, 08 May 2001 16:02:15 -1000
Subject: [Pxc] Problem
In-Reply-To: <20010508181857.A28819@dynax.anu.edu.au>
References: <4.2.0.58.20010507220032.00a1a800@pop.maui.net>
 <4.2.0.58.20010507220032.00a1a800@pop.maui.net>
Message-ID: <4.2.0.58.20010508151546.00a14ac0@pop.maui.net>

Back again.  Thanks to Chanop Silpa-Anan for various suggestions.
Here is what happened.  [This is in a terminal window on GNOME desktop.]
May be more than you want to know, but figured to show what I have tried.

Check environment for DISPLAY variable:
	DISPLAY=:0
Check display permission:
	xhost gives "access control enabled, only authorized clients can connect".
Change with:
	xhost + gives "access control disabled, clients can connect from any host".
Do pxc_load:
	get "Loading pxc200 device driver (./pxc.o).......done".
Do pxc_xgrab:
	get "./pxc_xgrab: couldn't open "/dev/pxc0pgm": invalid argument".
Do pxc_status:
	get "./pxc_status: /dev/pxc0ctl: Invalid argument".
Do pxc_live:
	get "./pxc_live: using /dev/pxc0pgm
	Error in startup script: couldn't open "/dev/pxc0pgm": invalid argument'
	while executing "open $devicefile r" (file "./pxc_live" line 58)

What else?
Thanks.


From pxc@lists.prosa.it  Thu May 10 21:59:38 2001
From: pxc@lists.prosa.it (Alessandro Rubini)
Date: Thu, 10 May 2001 22:59:38 +0200
Subject: [Pxc] Problem
Message-ID: <20010510225938.A24480@morgana.systemy.it>

Your display access problems are solved, it seems.

> Do pxc_load:
> 	get "Loading pxc200 device driver (./pxc.o).......done".

good.

> Do pxc_xgrab:
> 	get "./pxc_xgrab: couldn't open "/dev/pxc0pgm": invalid argument".
> Do pxc_status:
> 	get "./pxc_status: /dev/pxc0ctl: Invalid argument".

Than it looks like you have some problems in the "open()" system call.
What do your kernel messages report? What does "strace pxc_status"
report?

There's nothing in "pxc_open()" that retund EINVAL (invalid argument).

/alessandro


From pxc@lists.prosa.it  Sat May 12 01:29:22 2001
From: pxc@lists.prosa.it (Rob Deuel)
Date: Fri, 11 May 2001 14:29:22 -1000
Subject: [Pxc] Problem
In-Reply-To: <20010510225938.A24480@morgana.systemy.it>
Message-ID: <4.2.0.58.20010511142055.00a1d590@pop.maui.net>

--=====================_23590977==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

I certainly appreciate your help; and thank you.

At 10:59 PM 5/10/01 +0200, you wrote: Your display access problems are 
solved, it seems.

Yes.

> > Do pxc_status:
> >       get "./pxc_status: /dev/pxc0ctl: Invalid argument".
>
>Than it looks like you have some problems in the "open()" system call.
>What do your kernel messages report?

Found no kernel message for this event.

>What does "strace pxc_status" report?

I have attached a copy of the report obtained with the "strace" for pxc_status.
I see that on line 26,
         open ("/dev/pxc0ctl", 0_RDONLY)   = -1 EINVAL (Invalid argument)

I hope that this will be helpful.



--=====================_23590977==_
Content-Type: application/msword; name="MAY11B.doc";
 x-mac-type="42494E41"; x-mac-creator="4D535744"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="MAY11B.doc"

[encoded data, 29029 characters]
AAAAAAAAAAAAAAAAAAAA
--=====================_23590977==_--



From pxc@lists.prosa.it  Mon May 14 00:17:09 2001
From: pxc@lists.prosa.it (Alessandro Rubini)
Date: Mon, 14 May 2001 01:17:09 +0200
Subject: [Pxc] Problem
Message-ID: <20010514011709.A6381@morgana.systemy.it>

> I certainly appreciate your help; and thank you.

Despite your (appreciated) appreciation, I think I can't help.

> Found no kernel message for this event.

Ok.
 
>>What does "strace pxc_status" report?

>          open ("/dev/pxc0ctl", 0_RDONLY)   = -1 EINVAL (Invalid argument)

Oh.... I can't explain this. The device is obviously right, as your
"pxc_load" script succeeded. If you "ls -l /dev/pxc0ctl" you *do* find
a char device with the same major as in "grep pxc /proc/devices". Do you?
Yes, obviously. At least that's what I exepect.
Then, I can't tell where does EINVAL come from.

What version of the driver are you running, BTW?

> Content-Type: application/msword; name="MAY11B.doc";

I can't explain this, too :) 20kB of proprierary file format for 1kB
of plain text. Fortunately "catdoc" handled it well, but please avoid
making violence to textual information this way.... respect the
elegance and self-evidence of clear text, it will also save time and money
to all of us.

/alessandro, hoping your /dev/pxc0ctl is not what I exepect. Else, i've no idea


From pxc@lists.prosa.it  Tue May 15 06:49:19 2001
From: pxc@lists.prosa.it (Rob Deuel)
Date: Mon, 14 May 2001 19:49:19 -1000
Subject: [Pxc] Problem
In-Reply-To: <20010514011709.A6381@morgana.systemy.it>
Message-ID: <4.2.0.58.20010514191739.009725b0@pop.maui.net>

At 01:17 AM 5/14/01 +0200, you wrote:

>What version of the driver are you running, BTW?
Version 0.28.

And /dev/pxc0ctl is special character device file with major number = 60; 
and /proc/devices shows pxc = 60 pxc200.  So, it all seems to agree.

> > Content-Type: application/msword; name="MAY11B.doc";
>
>I can't explain this, too :) 20kB of proprierary file format for 1kB
>of plain text.

Sorry, my fault there.  Stuck it in a document file format (app name 
withheld to avoid offense; but which adds lots of format garbage).

Thanks again.  Will continue to work on the problem here and will let you 
know what we discover.






From pxc@lists.prosa.it  Tue May 22 15:12:28 2001
From: pxc@lists.prosa.it (Alessandro Rubini)
Date: Tue, 22 May 2001 16:12:28 +0200
Subject: [Pxc] pxc development
Message-ID: <20010522161228.A19240@morgana.systemy.it>

I'm working on the pxc driver (well, I've been for a few days, but I
can't devote full-time to a single project).

I'm adding support for a list of buffers. A process can get hold of a
buffer and no DMA will be performed on that buffer before it releases
the buffer.  If DMA is continuously running and you asked for at least
three buffers, a program can always release a buffer an immediately
access the most recent frame (buffer) with no delay at all.

Things are being massively restructured and will be overall
simplified. I'm also adding proper locking for SMP operation and other
goodies (like select() etc).

However, I plant to drop support for version 2.0 of the kernel, for a
few reasons (I have problems in testing it twice, I can use
generalized lists that are not there in 2.0, I can implement poll and
not select).

Is there some use of the pxc driver that needs 2.0 support and some
feature that is not yet present in the current versions? If so, I
think I'll split the source tree and port back those needed features
to the 2.0 source tree; given my strict schedule the next version will
most likely be 2.2 only (and 2.4 in a near future).

Thanks for your feedback
/alessandro


From pxc@lists.prosa.it  Tue May 22 17:19:39 2001
From: pxc@lists.prosa.it (Robert Schwebel)
Date: Tue, 22 May 2001 18:19:39 +0200 (CEST)
Subject: [Pxc] pxc development
In-Reply-To: <20010522161228.A19240@morgana.systemy.it>
Message-ID: <Pine.LNX.4.21.0105221752320.329-100000@callisto.local>

Hello Alessandro, 

On Tue, 22 May 2001, Alessandro Rubini wrote:
> I'm adding support for a list of buffers.

I have worked with your PXC driver and a PXC200 PCI board some time ago
and I must say the driver is great. Unfortunately, we had some problems
with the camera we used, because it was an interlaced model and we had
difficulties with 50 Hz disturbances from the factory the system was
installed in, so at the moment I'm working with a digital 12 bit camera
from PCO.

All these cameras have nearly the same features: an optical image comes in
at one end and a digital frame is written to some buffers at a certain
frame rate at the other end. Besides that, there are some functions to
control parameters. However, I'm wondering if there is a way to make a
generic interface all these camera drivers could offer to the user.

Does anybody have experience with such a system? What does v4l offer?
Would it be a solution (having in mind that images can be 8...16 Bit
grayscale or even colour)? Is there another possibility? Do you know the
SANE interface definition for scanners? It has a very nice callback scheme
which can be used to implement generic options to a imaging device;
perhaps something like that would be great for video as well.

Just some thoughts...

Robert



From pxc@lists.prosa.it  Tue May 22 17:19:39 2001
From: pxc@lists.prosa.it (Robert Schwebel)
Date: Tue, 22 May 2001 18:19:39 +0200 (CEST)
Subject: [Pxc] pxc development
In-Reply-To: <20010522161228.A19240@morgana.systemy.it>
Message-ID: <Pine.LNX.4.21.0105221752320.329-100000@callisto.local>

Hello Alessandro, 

On Tue, 22 May 2001, Alessandro Rubini wrote:
> I'm adding support for a list of buffers.

I have worked with your PXC driver and a PXC200 PCI board some time ago
and I must say the driver is great. Unfortunately, we had some problems
with the camera we used, because it was an interlaced model and we had
difficulties with 50 Hz disturbances from the factory the system was
installed in, so at the moment I'm working with a digital 12 bit camera
from PCO.

All these cameras have nearly the same features: an optical image comes in
at one end and a digital frame is written to some buffers at a certain
frame rate at the other end. Besides that, there are some functions to
control parameters. However, I'm wondering if there is a way to make a
generic interface all these camera drivers could offer to the user.

Does anybody have experience with such a system? What does v4l offer?
Would it be a solution (having in mind that images can be 8...16 Bit
grayscale or even colour)? Is there another possibility? Do you know the
SANE interface definition for scanners? It has a very nice callback scheme
which can be used to implement generic options to a imaging device;
perhaps something like that would be great for video as well.

Just some thoughts...

Robert



From pxc@lists.prosa.it  Mon May 28 03:11:36 2001
From: pxc@lists.prosa.it (Rob Deuel)
Date: Sun, 27 May 2001 16:11:36 -1000
Subject: [Pxc] Problem
In-Reply-To: <20010514011709.A6381@morgana.systemy.it>
Message-ID: <4.2.0.58.20010527155050.00a205b0@pop.maui.net>

Alessandro,

I've been working w/Rob trying to get the PXC200 card to work and could use 
some additional feed back.  After discussing Rob's experiences. I decided 
to try the card on my PC running Redhat 6.1 and everything worked fine.  So 
I did a complete un-install and reinstall of your sftwr on Rob's PC and 
still got the same error messages (invalid argument).  Also, I tried to 
access other devices (/dev/pxc1pgm) and got  "no such device" error 
message, even though I can ls -lag /dev/pxc1pgm and it's there.  The only 
thing I know that is different on Rob's machine is that he's running a 
program called VMware (MS Windows shell), but even if I close VMware down I 
still get the same error messages ???  The kernel module has no trouble 
loading and reports that it "sees" the pxc200 board, but for some reason 
the /dev files are unable to access the board ??? Any ideas, we need to get 
this thing operational in the next week to 10 days, so any help would be 
greatly appreciated.


jim


From pxc@lists.prosa.it  Mon May 28 17:38:41 2001
From: pxc@lists.prosa.it (Alessandro Rubini)
Date: Mon, 28 May 2001 18:38:41 +0200
Subject: [Pxc] pxc-0.29-beta
Message-ID: <20010528183841.A29636@morgana.systemy.it>

I just uploaded pxc-0.29. It looks like there are still some minor
problems, and it only works with version 2.2 of the kernel.

It's available at ftp://ftp.systemy.it/pub/develop as well as
ftp://gnu.systemy.it/pb/pxc.

This evening (european time) I plan to commit the changes to the
public CVS and update the web page.

The nodocs version has source for the docs, and you need TeX to compile them.
The full tarball includes compiled documentation (info, ps, pdf, txt).

/alessandro

-rw-rw-r--  1 rubini   staff  181709 May 28 18:33 pxc-0.29-beta-nodocs.tar.gz
-rw-rw-r--  1 rubini   staff  783727 May 28 18:31 pxc-0.29-beta.tar.gz

d041985c100eedaae401df0c7f56bb24  pxc-0.29-beta-nodocs.tar.gz
f67691a1f698e3810fcac893623d3dfc  pxc-0.29-beta.tar.gz



