Re: CMEMK Error

2009-10-08 Thread Vladimir Pantelic

Jaya krishnan wrote:

Hi
I am  unable  to insmod the  CMEM driver. The parameters Phys_start  and  
phys_end are  not  detected, eventhogh I  supplied  it  properly.
At the  same  time , I am able  to insert  other  modules like dsplink. I do 
not  suspect  any  problems with CMEM driver, since  the same  had been  used  
earlier  successfully.  The  error  message is  given  below. Pls  suggest  a  
solution

\...@\h:\w\$ ./loadmodules.sh
cmemk: Unknown parameter `"phys_start'


why don't you also post the line that tries to load cmem?


CMEMK Error: Pysical start and end addresses not supplied
insmod: cannot insert 'cmemk.ko': invalid parameter



___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error

2009-10-08 Thread Vladimir Pantelic

Jaya krishnan wrote:

Yes, here is  it
insmod cmemk.ko phys_start=0x8500 phys_end=0x8aa0 
pools=5x4697152,64x718848



looks OK to me.

a wild guess, are you sure it's not some weird charset error that makes the 
module loader not like the parameters?



--- Original Message ---
Sender : Vladimir Pantelic
Date   : Oct 08, 2009 16:51 (GMT+09:00)
Title  : Re: CMEMK Error

Jaya krishnan wrote:

 Hi
 I am  unable  to insmod the  CMEM driver. The parameters Phys_start  and  
phys_end are  not  detected, eventhogh I  supplied  it  properly.
 At the  same  time , I am able  to insert  other  modules like dsplink. I do 
not  suspect  any  problems with CMEM driver, since  the same  had been  used  
earlier  successfully.  The  error  message is  given  below. Pls  suggest  a  
solution

 \...@\h:\w\$ ./loadmodules.sh
 cmemk: Unknown parameter `"phys_start'


why don't you also post the line that tries to load cmem?


 CMEMK Error: Pysical start and end addresses not supplied
 insmod: cannot insert'cmemk.ko': invalid parameter



___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Jayakrishnan M M
Research Engineer
Key Systems Development Group
Security&  Imaging Solutions Division
SAMSUNG TECHWIN CO.,LTD

TEL +82-2-3467-7255
FAX +82-2-3467-7316
Mobile +82-10-6409-3619
E-mail:jaya.krish...@samsung.com








___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error

2009-10-08 Thread david.kondrad
> Jaya krishnan wrote:
> Hi
> Thanks  for the mail
> No  such  errors.  Could  this  be related  to  the shell?
> It happened  after I  changed  the Busybox.

Yes, that happened to us also... the busybox insmod is *very* picky.
Try using the full path to the module with the same parameters you listed..
\

I.E:
insmod /full_path_to/cmemk.ko \
  phys_start=0x8500 phys_end=0x8aa0 pools=5x4697152,64x718848

Also, dsplink looked like it was complaining about a missing version
struct.

You should go through the cmem and dsplink builds and make sure the kernel
environment variable points to the right place.

Oh, that reminds me...

I had to patch the dsplink build to include the kernel config file and
check whether module versioning is enabled. CMEM doesn't need this
because it uses the kernel build system natively.

I don't have an official patch, but look inside
//cetools/packages/dsplink/make/Linux

Inside file: linux-davinci-2.6.mk
Make sure these variables are set properly...

# Set this to the kernel full path
BASE_BUILDOS:= /your/path/to/kernel/root

# Set this to your kernel config file
BASE_BUILDOS_CONFIG=.config

Now, look for this header

#   ==
#   Post processing utilities for Linux 2.6
#   ==

Change whatever is there to this:

ifneq ($(CONFIG_MODVERSIONS),)
CMD_MODPOST_FLAGS := -m -i
else
CMD_MODPOST_FLAGS := -i
endif

CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost \
  $(CMD_MODPOST_FLAGS) $(BASE_BUILDOS)/Module.symvers $
(BASE_BUILDOS)/vmlinux

With those changes in place, your dsplink module will have the same
versioning
method as your kernel and you shouldn't have any complaints from the
loader.

Hope this helps out,
David

--
DAVID A. KONDRAD
Software Design Engineer
Legrand, Home Systems Division (formerly On-Q)
www.onqlegrand.com

This email, and any document attached hereto, may contain
confidential and/or privileged information.  If you are not the
intended recipient (or have received this email in error) please
notify the sender immediately and destroy this email.  Any
unauthorized, direct or indirect, copying, disclosure, distribution
or other use of the material or parts thereof is strictly
forbidden.

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: CMEMK Error

2009-10-08 Thread Tivy, Robert
 

> -Original Message-
> From: davinci-linux-open-source-boun...@linux.davincidsp.com 
> [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com
> ] On Behalf Of david.kond...@legrandna.com
> Sent: Thursday, October 08, 2009 7:47 AM
> To: jaya.krish...@samsung.com
> Cc: davinci-linux-open-source@linux.davincidsp.com
> Subject: Re: CMEMK Error
> 
> > Jaya krishnan wrote:
> > Hi
> > Thanks  for the mail
> > No  such  errors.  Could  this  be related  to  the shell?
> > It happened  after I  changed  the Busybox.
> 
> Yes, that happened to us also... the busybox insmod is *very* picky.
> Try using the full path to the module with the same 
> parameters you listed..
> \
> 
> I.E:
> insmod /full_path_to/cmemk.ko \
>   phys_start=0x8500 phys_end=0x8aa0 
> pools=5x4697152,64x718848
> 

I'll blame the busybox "sh", since I've had bad experience with it, and because 
your original email showed something strange:
> cmemk: Unknown parameter `"phys_start'
Note the double quote before phys_start, it's inside the single quotes, which 
tells me that's what insmod is getting.

Regards,

- Rob___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error

2009-10-11 Thread Jaya krishnan
Hi
The  problem is  solved  after  I  changed  the  Busybox. Thanks
JK

 
 

--- Original Message ---
Sender : Tivy, Robert
Date   : Oct 09, 2009 01:47 (GMT+09:00)
Title  : RE: CMEMK Error

 

> -Original Message-
> From: davinci-linux-open-source-boun...@linux.davincidsp.com 
> [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com
> ] On Behalf Of david.kond...@legrandna.com
> Sent: Thursday, October 08, 2009 7:47 AM
> To: jaya.krish...@samsung.com
> Cc: davinci-linux-open-source@linux.davincidsp.com
> Subject: Re: CMEMK Error
> 
> > Jaya krishnan wrote:
> > Hi
> > Thanks  for the mail
> > No  such  errors.  Could  this  be related  to  the shell?
> > It happened  after I  changed  the Busybox.
> 
> Yes, that happened to us also... the busybox insmod is *very* picky.
> Try using the full path to the module with the same 
> parameters you listed..
> \
> 
> I.E:
> insmod /full_path_to/cmemk.ko \
>   phys_start=0x8500 phys_end=0x8aa0 
> pools=5x4697152,64x718848
> 

I'll blame the busybox "sh", since I've had bad experience with it, and 
because your original email showed something strange:
> cmemk: Unknown parameter `"phys_start'
Note the double quote before phys_start, it's inside the single quotes, 
which tells me that's what insmod is getting.

Regards,

- Rob
 
   Jayakrishnan M M
Research Engineer
Key Systems Development Group
Security & Imaging Solutions Division
SAMSUNG TECHWIN CO.,LTD

TEL +82-2-3467-7255
FAX +82-2-3467-7316
Mobile +82-10-6409-3619
E-mail:jaya.krish...@samsung.com
 
  
 
 ___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error

2009-10-18 Thread Albert Burbea
Hi
please update us about which version of BusyBox you switched to.
It shall help others here
Thanks
Albert

On Mon, Oct 12, 2009 at 6:23 AM, Jaya krishnan wrote:

> Hi
> The  problem is  solved  after  I  changed  the  Busybox. Thanks
> JK
>
>
>
>
> --- Original Message ---
> Sender : Tivy, Robert
> Date   : Oct 09, 2009 01:47 (GMT+09:00)
> Title  : RE: CMEMK Error
>
>
>
> > -Original Message-
> > From: davinci-linux-open-source-boun...@linux.davincidsp.com
> > [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com
> > ] On Behalf Of david.kond...@legrandna.com
> > Sent: Thursday, October 08, 2009 7:47 AM
> > To: jaya.krish...@samsung.com
> > Cc: davinci-linux-open-source@linux.davincidsp.com
> > Subject: Re: CMEMK Error
> >
> > > Jaya krishnan wrote:
> > > Hi
> > > Thanks  for the mail
> > > No  such  errors.  Could  this  be related  to  the shell?
> > > It happened  after I  changed  the Busybox.
> >
> > Yes, that happened to us also... the busybox insmod is *very* picky.
> > Try using the full path to the module with the same
> > parameters you listed..
> > \
> >
> > I.E:
> > insmod /full_path_to/cmemk.ko \
> >   phys_start=0x8500 phys_end=0x8aa0
> > pools=5x4697152,64x718848
> >
>
> I'll blame the busybox "sh", since I've had bad experience with it,
> and because your original email showed something strange:
> > cmemk: Unknown parameter `"phys_start'
> Note the double quote before phys_start, it's inside the single quotes,
> which tells me that's what insmod is getting.
>
> Regards,
>
> - Rob
>
>Jayakrishnan M M
> Research Engineer
> Key Systems Development Group
> Security & Imaging Solutions Division
> SAMSUNG TECHWIN CO.,LTD
>
> TEL +82-2-3467-7255
> FAX +82-2-3467-7316
> Mobile +82-10-6409-3619
> E-mail:jaya.krish...@samsung.com 
>
>
>
>
>
> ___
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>
>


-- 
Albert Burbea
Harishonim 8
Ramat Gan 52502, Israel
Tel/Fax + 972-3-7526016
Mobile: +972-52-3541842
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: Re: CMEMK Error

2009-10-08 Thread Jaya krishnan
Yes, here is  it
insmod cmemk.ko phys_start=0x8500 phys_end=0x8aa0 
pools=5x4697152,64x718848 

 
 

--- Original Message ---
Sender : Vladimir Pantelic
Date   : Oct 08, 2009 16:51 (GMT+09:00)
Title  : Re: CMEMK Error

Jaya krishnan wrote:
> Hi
> I am  unable  to insmod the  CMEM driver. The parameters Phys_start  and  
> phys_end are  not  detected, eventhogh I  supplied  it  properly.
> At the  same  time , I am able  to insert  other  modules like dsplink. I do 
> not  suspect  any  problems with CMEM driver, since  the same  had been  used 
>  earlier  successfully.  The  error  message is  given  below. Pls  suggest  
> a  solution
>
> \...@\h:\w\$ ./loadmodules.sh
> cmemk: Unknown parameter `"phys_start'

why don't you also post the line that tries to load cmem?

> CMEMK Error: Pysical start and end addresses not supplied
> insmod: cannot insert 'cmemk.ko': invalid parameter


___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

 
   Jayakrishnan M M
Research Engineer
Key Systems Development Group
Security & Imaging Solutions Division
SAMSUNG TECHWIN CO.,LTD

TEL +82-2-3467-7255
FAX +82-2-3467-7316
Mobile +82-10-6409-3619
E-mail:jaya.krish...@samsung.com
 
  
 
 ___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: Re: CMEMK Error

2009-10-18 Thread Jaya krishnan

Yes. That  would  be  fine.
New  BusyBox  V 1.1.3
Old  one  BusyBox V1.13.4 (Which  causes  problem)

Regards
JK


 
 

--- Original Message ---
Sender : Albert Burbea
Date   : Oct 18, 2009 19:38 (GMT+09:00)
Title  : Re: CMEMK Error

Hi
please update us about which version of BusyBox you switched to. 
It shall help others here
Thanks
Albert

On Mon, Oct 12, 2009 at 6:23 AM, Jaya krishnan  
wrote:
Hi
The  problem is  solved  after  I  changed  the  Busybox. Thanks
JK




--- Original Message ---
Sender : Tivy, Robert
Date   : Oct 09, 2009 01:47 (GMT+09:00)
Title  : RE: CMEMK Error



> -Original Message-
> From: davinci-linux-open-source-boun...@linux.davincidsp.com
> [mailto:davinci-linux-open-source-boun...@linux.davincidsp.com
> ] On Behalf Of david.kond...@legrandna.com
> Sent: Thursday, October 08, 2009 7:47 AM
> To: jaya.krish...@samsung.com
> Cc: davinci-linux-open-source@linux.davincidsp.com
> Subject: Re: CMEMK Error
>
> > Jaya krishnan wrote:
> > Hi
> > Thanks  for the mail
> > No  such  errors.  Could  this  be related  to  the shell?
> > It happened  after I  changed  the Busybox.
>
> Yes, that happened to us also... the busybox insmod is *very* picky.
> Try using the full path to the module with the same
> parameters you listed..
> \
>
> I.E:
> insmod /full_path_to/cmemk.ko \
>   phys_start=0x8500 phys_end=0x8aa0
> pools=5x4697152,64x718848
>

I'll blame the busybox "sh", since I've had bad experience with it, and 
because your original email showed something strange:
> cmemk: Unknown parameter `"phys_start'
Note the double quote before phys_start, it's inside the single quotes, 
which tells me that's what insmod is getting.

Regards,

- Rob

  Jayakrishnan M M
Research Engineer
Key Systems Development Group
Security & Imaging Solutions Division
SAMSUNG TECHWIN CO.,LTD

TEL +82-2-3467-7255
FAX +82-2-3467-7316
Mobile +82-10-6409-3619
E-mail:jaya.krish...@samsung.com



 
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source




-- 
Albert Burbea
Harishonim 8
Ramat Gan 52502, Israel
Tel/Fax + 972-3-7526016
Mobile: +972-52-3541842

 
   Jayakrishnan M M
Research Engineer
Key Systems Development Group
Security & Imaging Solutions Division
SAMSUNG TECHWIN CO.,LTD

TEL +82-2-3467-7255
FAX +82-2-3467-7316
Mobile +82-10-6409-3619
E-mail:jaya.krish...@samsung.com
 
  
 
 ___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error: GETPHYS: Failed to convert virtual 0x8425c050

2007-09-05 Thread chenleiming
hello,
you can check the uboot params (bootargs mem=), make sure that the 
memory is not overlapped between linux and cmem 
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: CMEMK Error: GETPHYS: Failed to convert virtual 0x8425c050 to physical.

2007-09-04 Thread Tivy, Robert
> CMEMK Error: GETPHYS: Failed to convert virtual 0x841b3050 to 
> physical.
> Decode Error: VIDDEC_process() failed with a fatal error (-2 
> ext: 0x28)

I'm not sure under which context the CMEM GETPHYS ioctl is called, but
the CMEMK error is due to an unmapped virtual address.  The address
0x841b3050 (and the similar one specified in the Subject: ) does not
look like a valid virtual address.  It appears to be a physical address,
which would explain the error, but it's not in the address range of
physical memory managed by CMEM (0x8780-0x8900).  Regardless,
the GETPHYS ioctl needs a valid, mapped virtual address.  While the CMEM
GETPHYS ioctl will work for any mapped virtual address, it is generally
used only for buffers allocated through CMEM (perhaps via the OSAL
Memory_contigAlloc() API).

Regards,

- Rob

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> ] On Behalf Of Wendell Liu
> Sent: Tuesday, September 04, 2007 12:46 PM
> To: 'davinci-linux-open-source@linux.davincidsp.com'
> Subject: CMEMK Error: GETPHYS: Failed to convert virtual 
> 0x8425c050 to physical.
> 
> Hello,
> 
> I try to test a codec on the Davinci platform. Please someone 
> give me a hint what's this error means, and how to solve it? 
> 
> Thank you so much!
> Wendell
> ==
> After I run "./decoded -v t.264", I got the following error:
> 
> Decode Debug: NTSC selected
> Decode demo started.
> Decode Debug: Codec Engine initialized
> Decode Debug: Init rendezvous opened for 3 threads Decode 
> Debug: Cleanup rendezvous opened for 3 threads Decode Debug: 
> Priming rendezvous opened for 2 threads Decode Debug: Display 
> buffer 0 mapped to 0x412d1000 has physical address 0x8680 
> Decode Debug: Display buffer 1 mapped to 0x413d has 
> physical address 0x868ff000 Decode Debug: Display buffer 2 
> mapped to 0x414cf000 has physical address 0x869fe000 Decode 
> Debug: Video display device initialized.
> Decode Debug: Display thread created
> Decode Debug: Video file successfully opened Decode Debug: 
> OSD successfully initialized Decode Debug: OSD transparency 
> initialized Decode Debug: Codec Engine opened in video thread 
> Decode Debug: Codec Engine opened in control thread Decode 
> Debug: Video decoder created Decode Debug: Contiguous buffer 
> allocated at physical address 0x88bac000 Decode Debug: 
> Contiguous buffer allocated at physical address 0x882ac000 
> Decode Debug: Contiguous buffer allocated at physical address 
> 0x885ac000 Decode Debug: Contiguous buffer allocated at 
> physical address 0x888ac000 Decode Debug: User interface 
> created Decode Debug: Entering display main loop.
> 
> CMEMK Error: GETPHYS: Failed to convert virtual 0x841b3050 to 
> physical.
> Decode Error: VIDDEC_process() failed with a fatal error (-2 
> ext: 0x28)
> 
> Decode Debug: Entering video main loop.
> Total I-frames: 0, P-frames: 0, B-frames: 0, IDR-frames: 0 
> rejected: 0 ==
> My loadmodules.sh is:
> 
> insmod cmemk.ko phys_start=0x8780 phys_end=0x8900
> pools=20x4096,10x131072,6x3145728
> insmod dsplinkk.ko ddr_start=0x8fa0 ddr_size=0x40
> 
> rm -f /dev/dsplink
> mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" 
> /proc/devices` 0 ==
> 
> 
> 
> 
> ___
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


RE: CMEMK Error: GETPHYS: Failed to convert virtual 0x8425c050 to physical.

2007-09-05 Thread Wendell Liu
Thank you, Rob.
Funny thing is: after I power off/on the board, everything is just working.

Wendell

-Original Message-
From: Tivy, Robert [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 04, 2007 6:58 PM
To: Wendell Liu; davinci-linux-open-source@linux.davincidsp.com
Subject: RE: CMEMK Error: GETPHYS: Failed to convert virtual 0x8425c050
to physical.


> CMEMK Error: GETPHYS: Failed to convert virtual 0x841b3050 to 
> physical.
> Decode Error: VIDDEC_process() failed with a fatal error (-2 
> ext: 0x28)

I'm not sure under which context the CMEM GETPHYS ioctl is called, but
the CMEMK error is due to an unmapped virtual address.  The address
0x841b3050 (and the similar one specified in the Subject: ) does not
look like a valid virtual address.  It appears to be a physical address,
which would explain the error, but it's not in the address range of
physical memory managed by CMEM (0x8780-0x8900).  Regardless,
the GETPHYS ioctl needs a valid, mapped virtual address.  While the CMEM
GETPHYS ioctl will work for any mapped virtual address, it is generally
used only for buffers allocated through CMEM (perhaps via the OSAL
Memory_contigAlloc() API).

Regards,

- Rob

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> ] On Behalf Of Wendell Liu
> Sent: Tuesday, September 04, 2007 12:46 PM
> To: 'davinci-linux-open-source@linux.davincidsp.com'
> Subject: CMEMK Error: GETPHYS: Failed to convert virtual 
> 0x8425c050 to physical.
> 
> Hello,
> 
> I try to test a codec on the Davinci platform. Please someone 
> give me a hint what's this error means, and how to solve it? 
> 
> Thank you so much!
> Wendell
> ==
> After I run "./decoded -v t.264", I got the following error:
> 
> Decode Debug: NTSC selected
> Decode demo started.
> Decode Debug: Codec Engine initialized
> Decode Debug: Init rendezvous opened for 3 threads Decode 
> Debug: Cleanup rendezvous opened for 3 threads Decode Debug: 
> Priming rendezvous opened for 2 threads Decode Debug: Display 
> buffer 0 mapped to 0x412d1000 has physical address 0x8680 
> Decode Debug: Display buffer 1 mapped to 0x413d has 
> physical address 0x868ff000 Decode Debug: Display buffer 2 
> mapped to 0x414cf000 has physical address 0x869fe000 Decode 
> Debug: Video display device initialized.
> Decode Debug: Display thread created
> Decode Debug: Video file successfully opened Decode Debug: 
> OSD successfully initialized Decode Debug: OSD transparency 
> initialized Decode Debug: Codec Engine opened in video thread 
> Decode Debug: Codec Engine opened in control thread Decode 
> Debug: Video decoder created Decode Debug: Contiguous buffer 
> allocated at physical address 0x88bac000 Decode Debug: 
> Contiguous buffer allocated at physical address 0x882ac000 
> Decode Debug: Contiguous buffer allocated at physical address 
> 0x885ac000 Decode Debug: Contiguous buffer allocated at 
> physical address 0x888ac000 Decode Debug: User interface 
> created Decode Debug: Entering display main loop.
> 
> CMEMK Error: GETPHYS: Failed to convert virtual 0x841b3050 to 
> physical.
> Decode Error: VIDDEC_process() failed with a fatal error (-2 
> ext: 0x28)
> 
> Decode Debug: Entering video main loop.
> Total I-frames: 0, P-frames: 0, B-frames: 0, IDR-frames: 0 
> rejected: 0 ==
> My loadmodules.sh is:
> 
> insmod cmemk.ko phys_start=0x8780 phys_end=0x8900
> pools=20x4096,10x131072,6x3145728
> insmod dsplinkk.ko ddr_start=0x8fa0 ddr_size=0x40
> 
> rm -f /dev/dsplink
> mknod /dev/dsplink c `awk "\\$2==\"dsplink\" {print \\$1}" 
> /proc/devices` 0 ==
> 
> 
> 
> 
> ___
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error: GETPHYS: Failed to convert virtual 0x8425c050 to phy sical.

2007-09-05 Thread Kevin Hilman

Wendell Liu wrote:



I try to test a codec on the Davinci platform. Please someone give me a hint
what's this error means, and how to solve it? 



The getphys implementation in the CMEM module is broken.  In my patchset 
 posted here to run the demos against newer kernels, I rewrote how CMEM 
get_phys works.  I've attached just the cmemk-getphys.patch for you to 
try.  Depending on which version of the demos you have, you may have to 
rework the patch slightly.


Kevin
Index: dvevm_1_00_00_32/cmem_1_00/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
===
--- dvevm_1_00_00_32.orig/cmem_1_00/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
+++ dvevm_1_00_00_32/cmem_1_00/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
@@ -97,26 +97,44 @@ static struct file_operations cmem_fxns 
 /* Traverses the page tables and translates a virtual adress to a physical. */
 static unsigned long get_phys(unsigned long virtp)
 {
-pgd_t *pgd;
-pmd_t *pmd;
-pte_t *pte;
+unsigned long physp = 0;
 struct mm_struct *mm = current->mm;
+struct vm_area_struct *vma;
 
-pgd = pgd_offset(mm, virtp);
-if (!(pgd_none(*pgd) || pgd_bad(*pgd))) {
-pmd = pmd_offset(pgd, virtp);
-
-if (!(pmd_none(*pmd) || pmd_bad(*pmd))) {
-pte = pte_offset_kernel(pmd, virtp);  
-
-if (pte_present(*pte)) {
-return __pa(page_address(pte_page(*pte)) +
-(virtp & ~PAGE_MASK));
-}
-}
+/* For kernel direct-mapped memory, take the easy way */
+if (virtp >= PAGE_OFFSET) {
+	physp = virt_to_phys((void *)virtp);
+}
+
+/* this will catch, kernel-allocated, mmaped-to-usermode addresses */
+else if ((vma = find_vma(mm, virtp)) &&
+	 (vma->vm_flags & VM_IO) &&
+	 (vma->vm_pgoff)) {
+ 	physp =  (vma->vm_pgoff << PAGE_SHIFT) + (virtp - vma->vm_start);
+}
+
+/* otherwise, use get_user_pages() for general userland pages */
+else {
+	int res, nr_pages = 1;
+	struct page *pages;
+	down_read(¤t->mm->mmap_sem);
+
+	res = get_user_pages(current, current->mm,
+			 virtp, nr_pages,
+			 1, 0,
+			 &pages, NULL);
+	up_read(¤t->mm->mmap_sem);
+
+	if (res == nr_pages) {
+	physp = __pa(page_address(&pages[0]) + (virtp & ~PAGE_MASK));
+	} else {
+	__E("%s: Unable to find phys addr for 0x%08lx\n",
+		__FUNCTION__, virtp);
+	__E("%s: get_user_pages() failed: %d\n", __FUNCTION__, res);
+	}
 }
 
-return 0;
+return physp;
 }
 
 /* Allocates space from the top "highmem" contiguous buffer for pool buffer. */
@@ -145,6 +163,7 @@ static unsigned long alloc_pool_buffer(u
 return 0;
 }
 
+#ifdef __DEBUG
 /* Only for debug */
 static void dump_lists(int idx)
 {
@@ -175,6 +194,7 @@ static void dump_lists(int idx)
 
 up(&cmem_mutex);
 }
+#endif
 
 static int proc_fxn(char *page, char **start, off_t offset, int len,
 int *eof, void *data)
___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source


Re: CMEMK Error: GETPHYS: Failed to convert virtual 0x8425c050 to phy sical.

2007-09-10 Thread Andrew Armstrong
Hi,

I would really like to try out this module, but do not have the means of
compiling it at the moment (not in the office).

I would be really grateful is someone could send me the latest patched
version (for standard EVM ddr configuration) to try. I periodically see
CMEMK errors and would like to see if this helps.

Best Regards,

Andrew

On Wed, 2007-09-05 at 18:27 -0700, Kevin Hilman wrote:
> Wendell Liu wrote:
> 
> > 
> > I try to test a codec on the Davinci platform. Please someone give me a hint
> > what's this error means, and how to solve it? 
> > 
> 
> The getphys implementation in the CMEM module is broken.  In my patchset 
>   posted here to run the demos against newer kernels, I rewrote how CMEM 
> get_phys works.  I've attached just the cmemk-getphys.patch for you to 
> try.  Depending on which version of the demos you have, you may have to 
> rework the patch slightly.
> 
> Kevin
> 
> ___
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> 

___
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source