All of lore.kernel.org
 help / color / mirror / Atom feed
* Using OMAP3 ISP live display and snapshot sample applications
@ 2012-01-03  9:40 James
  2012-01-03 11:17 ` Laurent Pinchart
  0 siblings, 1 reply; 19+ messages in thread
From: James @ 2012-01-03  9:40 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

Happy New Year!!

I saw that there is a simple viewfinder in your repo for OMAP3 and
wish to know more about it.

http://git.ideasonboard.org/?p=omap3-isp-live.git;a=summary

I intend to test it with my 12-bit (Y12) monochrome camera sensor
driver, running on top of Gumstix's (Steve v3.0) kernel.

Is it workable at the moment?

-- 
Regards,
James

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-03  9:40 Using OMAP3 ISP live display and snapshot sample applications James
@ 2012-01-03 11:17 ` Laurent Pinchart
  2012-01-04  7:07   ` James
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2012-01-03 11:17 UTC (permalink / raw)
  To: James; +Cc: linux-media

Hi James,

On Tuesday 03 January 2012 10:40:10 James wrote:
> Hi Laurent,
> 
> Happy New Year!!

Thank you. Happy New Year to you as well. May 2012 bring you a workable OMAP3 
ISP solution ;-)

> I saw that there is a simple viewfinder in your repo for OMAP3 and
> wish to know more about it.
> 
> http://git.ideasonboard.org/?p=omap3-isp-live.git;a=summary
> 
> I intend to test it with my 12-bit (Y12) monochrome camera sensor
> driver, running on top of Gumstix's (Steve v3.0) kernel.
> 
> Is it workable at the moment?

The application is usable but supports raw Bayer sensors only at the moment. 
It requires a frame buffer and an omap_vout device (both should be located 
automatically) and configures the OMAP3 ISP pipeline automatically to produce 
the display resolution.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-03 11:17 ` Laurent Pinchart
@ 2012-01-04  7:07   ` James
  2012-01-05  9:55     ` James
  2012-01-06 12:34     ` Laurent Pinchart
  0 siblings, 2 replies; 19+ messages in thread
From: James @ 2012-01-04  7:07 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

On Tue, Jan 3, 2012 at 7:17 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi James,
>
> On Tuesday 03 January 2012 10:40:10 James wrote:
>> Hi Laurent,
>>
>> Happy New Year!!
>
> Thank you. Happy New Year to you as well. May 2012 bring you a workable OMAP3
> ISP solution ;-)
>

Yeah! that's on #1 of my 2012 wishlist!! (^^)

But, it start off with a disappointment on the quest to get
"gst-launch v4l2src" to work..
http://patches.openembedded.org/patch/8895/

Saw reported success in get v4l2src to work with MT9V032 by applying
the hack but no luck with my Y12 monochrome sensor. (-.-)"

>> I saw that there is a simple viewfinder in your repo for OMAP3 and
>> wish to know more about it.
>>
>> http://git.ideasonboard.org/?p=omap3-isp-live.git;a=summary
>>
>> I intend to test it with my 12-bit (Y12) monochrome camera sensor
>> driver, running on top of Gumstix's (Steve v3.0) kernel.
>>
>> Is it workable at the moment?
>
> The application is usable but supports raw Bayer sensors only at the moment.
> It requires a frame buffer and an omap_vout device (both should be located
> automatically) and configures the OMAP3 ISP pipeline automatically to produce
> the display resolution.
>

Will there be a need to patch for Y12 support or workable out-of-the-box?

Likely your previous notes, I know that 12-bit Y12 to the screen is an
overkill but will it be able to capture Y12 from CCDC output and then
output to the screen?

Y12 sensor-> CCDC -> CCDC output -> screen

I've one board connected to a LCD monitor via a DVI chip using GS's
Tobi board as reference and another via 4.3" LG LCD Touchscreen using
GS's Chestnut board as reference.

Many thanks in adv

-- 
Regards,
James

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-04  7:07   ` James
@ 2012-01-05  9:55     ` James
  2012-01-06  6:24       ` James
  2012-01-06 12:34     ` Laurent Pinchart
  1 sibling, 1 reply; 19+ messages in thread
From: James @ 2012-01-05  9:55 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

On Wed, Jan 4, 2012 at 3:07 PM, James <angweiyang@gmail.com> wrote:
> Hi Laurent,
>
> On Tue, Jan 3, 2012 at 7:17 PM, Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
>> Hi James,
>>
>> On Tuesday 03 January 2012 10:40:10 James wrote:
>>> Hi Laurent,
>>>
>>> Happy New Year!!
>>
>> Thank you. Happy New Year to you as well. May 2012 bring you a workable OMAP3
>> ISP solution ;-)
>>
>
> Yeah! that's on #1 of my 2012 wishlist!! (^^)
>
> But, it start off with a disappointment on the quest to get
> "gst-launch v4l2src" to work..
> http://patches.openembedded.org/patch/8895/
>
> Saw reported success in get v4l2src to work with MT9V032 by applying
> the hack but no luck with my Y12 monochrome sensor. (-.-)"
>
>>> I saw that there is a simple viewfinder in your repo for OMAP3 and
>>> wish to know more about it.
>>>
>>> http://git.ideasonboard.org/?p=omap3-isp-live.git;a=summary
>>>
>>> I intend to test it with my 12-bit (Y12) monochrome camera sensor
>>> driver, running on top of Gumstix's (Steve v3.0) kernel.
>>>
>>> Is it workable at the moment?
>>
>> The application is usable but supports raw Bayer sensors only at the moment.
>> It requires a frame buffer and an omap_vout device (both should be located
>> automatically) and configures the OMAP3 ISP pipeline automatically to produce
>> the display resolution.
>>
>
> Will there be a need to patch for Y12 support or workable out-of-the-box?
>
> Likely your previous notes, I know that 12-bit Y12 to the screen is an
> overkill but will it be able to capture Y12 from CCDC output and then
> output to the screen?
>
> Y12 sensor-> CCDC -> CCDC output -> screen
>
> I've one board connected to a LCD monitor via a DVI chip using GS's
> Tobi board as reference and another via 4.3" LG LCD Touchscreen using
> GS's Chestnut board as reference.
>
> Many thanks in adv
>
> --
> Regards,
> James

I did a native compilation on my overo and the result is as below.

root@omap3-multi:~/omap3-isp-live# ln -s
/usr/src/linux-sakoman-pm-3.0-r102/include/ /usr/src/linux/usr/include
root@omap3-multi:~/omap3-isp-live# make KDIR=/usr/src/linux
CROSS_COMPILE=arm-angstrom-linux-gnueabi-
make -C isp CROSS_COMPILE=arm-angstrom-linux-gnueabi- KDIR=/usr/src/linux
make[1]: Entering directory `/home/root/omap3-isp-live/isp'
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -fPIC -c -o controls.o controls.c
In file included from /usr/src/linux/usr/include/linux/omap3isp.h:30:0,
                 from controls.c:25:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -fPIC -c -o media.o media.c
In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
                 from media.c:34:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -fPIC -c -o omap3isp.o omap3isp.c
In file included from /usr/src/linux/usr/include/linux/v4l2-mediabus.h:14:0,
                 from omap3isp-priv.h:26,
                 from omap3isp.c:31:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
omap3isp.c:271:13: warning: 'omap3_isp_pool_free_buffers' defined but not used
omap3isp.c: In function 'omap3_isp_pipeline_build':
omap3isp.c:329:15: warning: 'nbufs' may be used uninitialized in this function
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -fPIC -c -o subdev.o subdev.c
In file included from /usr/src/linux/usr/include/linux/v4l2-subdev.h:27:0,
                 from subdev.c:33:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
subdev.c:49:20: warning: 'pixelcode_to_string' defined but not used
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -fPIC -c -o v4l2.o v4l2.c
In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
                 from v4l2.c:36:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -fPIC -c -o v4l2-pool.o v4l2-pool.c
In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
                 from v4l2-pool.h:25,
                 from v4l2-pool.c:26:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -o libomap3isp.so -shared controls.o
media.o omap3isp.o subdev.o v4l2.o v4l2-pool.o
make[1]: Leaving directory `/home/root/omap3-isp-live/isp'
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -c -o live.o live.c
In file included from /usr/src/linux/usr/include/linux/fb.h:4:0,
                 from live.c:44:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -c -o videoout.o videoout.c
In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
                 from videoout.c:23:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -Lisp -o live live.o videoout.o -lomap3isp -lrt
arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
-I/usr/src/linux/usr/include -c -o snapshot.o snapshot.c
In file included from /usr/src/linux/usr/include/linux/spi/spidev.h:25:0,
                 from snapshot.c:41:
/usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
"Attempt to use kernel headers from user space, see
http://kernelnewbies.org/KernelHeaders"
arm-angstrom-linux-gnueabi-gcc -Lisp -o snapshot snapshot.o -lomap3isp -lrt
root@omap3-multi:~/omap3-isp-live# ls
LICENSE   README  live	  live.o    snapshot.c	videoout.c  videoout.o
Makefile  isp	  live.c  snapshot  snapshot.o	videoout.h
root@omap3-multi:~/omap3-isp-live# live --help
-sh: live: command not found
root@omap3-multi:~/omap3-isp-live# ./live --help
./live: error while loading shared libraries: libomap3isp.so: cannot
open shared object file: No such file or directory
root@omap3-multi:~/omap3-isp-live# cd isp
root@omap3-multi:~/omap3-isp-live/isp# ls
LICENSE     libomap3isp.so  omap3isp-priv.h  subdev.h	  v4l2-pool.o
Makefile    list.h	    omap3isp.c	     subdev.o	  v4l2.c
controls.c  media.c	    omap3isp.h	     tools.h	  v4l2.h
controls.h  media.h	    omap3isp.o	     v4l2-pool.c  v4l2.o
controls.o  media.o	    subdev.c	     v4l2-pool.h
root@omap3-multi:~/omap3-isp-live/isp# cd ..
root@omap3-multi:~/omap3-isp-live# ls /
bin   dev  home  linuxrc     media  proc  sys  usr
boot  etc  lib	 lost+found  mnt    sbin  tmp  var
root@omap3-multi:~/omap3-isp-live# ls /usr/
arm-angstrom-linux-gnueabi  etc    include  libexec  share
bin			    games  lib	    sbin     src
root@omap3-multi:~/omap3-isp-live#

I ran ./live --help and there is an error
./live --help
./live: error while loading shared libraries: libomap3isp.so: cannot
open shared object file: No such file or directory

Please advise.

Many thanks in adv.

-- 
Regards,
James

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-05  9:55     ` James
@ 2012-01-06  6:24       ` James
  2012-01-06 13:09         ` Laurent Pinchart
  0 siblings, 1 reply; 19+ messages in thread
From: James @ 2012-01-06  6:24 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

On Thu, Jan 5, 2012 at 5:55 PM, James <angweiyang@gmail.com> wrote:
> Hi Laurent,
>
> On Wed, Jan 4, 2012 at 3:07 PM, James <angweiyang@gmail.com> wrote:
>> Hi Laurent,
>>
>> On Tue, Jan 3, 2012 at 7:17 PM, Laurent Pinchart
>> <laurent.pinchart@ideasonboard.com> wrote:
>>> Hi James,
>>>
>>> On Tuesday 03 January 2012 10:40:10 James wrote:
>>>> Hi Laurent,
>>>>
>>>> Happy New Year!!
>>>
>>> Thank you. Happy New Year to you as well. May 2012 bring you a workable OMAP3
>>> ISP solution ;-)
>>>
>>
>> Yeah! that's on #1 of my 2012 wishlist!! (^^)
>>
>> But, it start off with a disappointment on the quest to get
>> "gst-launch v4l2src" to work..
>> http://patches.openembedded.org/patch/8895/
>>
>> Saw reported success in get v4l2src to work with MT9V032 by applying
>> the hack but no luck with my Y12 monochrome sensor. (-.-)"
>>
>>>> I saw that there is a simple viewfinder in your repo for OMAP3 and
>>>> wish to know more about it.
>>>>
>>>> http://git.ideasonboard.org/?p=omap3-isp-live.git;a=summary
>>>>
>>>> I intend to test it with my 12-bit (Y12) monochrome camera sensor
>>>> driver, running on top of Gumstix's (Steve v3.0) kernel.
>>>>
>>>> Is it workable at the moment?
>>>
>>> The application is usable but supports raw Bayer sensors only at the moment.
>>> It requires a frame buffer and an omap_vout device (both should be located
>>> automatically) and configures the OMAP3 ISP pipeline automatically to produce
>>> the display resolution.
>>>
>>
>> Will there be a need to patch for Y12 support or workable out-of-the-box?
>>
>> Likely your previous notes, I know that 12-bit Y12 to the screen is an
>> overkill but will it be able to capture Y12 from CCDC output and then
>> output to the screen?
>>
>> Y12 sensor-> CCDC -> CCDC output -> screen
>>
>> I've one board connected to a LCD monitor via a DVI chip using GS's
>> Tobi board as reference and another via 4.3" LG LCD Touchscreen using
>> GS's Chestnut board as reference.
>>
>> Many thanks in adv
>>
>> --
>> Regards,
>> James
>
> I did a native compilation on my overo and the result is as below.
>
> root@omap3-multi:~/omap3-isp-live# ln -s
> /usr/src/linux-sakoman-pm-3.0-r102/include/ /usr/src/linux/usr/include
> root@omap3-multi:~/omap3-isp-live# make KDIR=/usr/src/linux
> CROSS_COMPILE=arm-angstrom-linux-gnueabi-
> make -C isp CROSS_COMPILE=arm-angstrom-linux-gnueabi- KDIR=/usr/src/linux
> make[1]: Entering directory `/home/root/omap3-isp-live/isp'
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -fPIC -c -o controls.o controls.c
> In file included from /usr/src/linux/usr/include/linux/omap3isp.h:30:0,
>                 from controls.c:25:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -fPIC -c -o media.o media.c
> In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
>                 from media.c:34:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -fPIC -c -o omap3isp.o omap3isp.c
> In file included from /usr/src/linux/usr/include/linux/v4l2-mediabus.h:14:0,
>                 from omap3isp-priv.h:26,
>                 from omap3isp.c:31:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> omap3isp.c:271:13: warning: 'omap3_isp_pool_free_buffers' defined but not used
> omap3isp.c: In function 'omap3_isp_pipeline_build':
> omap3isp.c:329:15: warning: 'nbufs' may be used uninitialized in this function
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -fPIC -c -o subdev.o subdev.c
> In file included from /usr/src/linux/usr/include/linux/v4l2-subdev.h:27:0,
>                 from subdev.c:33:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> subdev.c:49:20: warning: 'pixelcode_to_string' defined but not used
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -fPIC -c -o v4l2.o v4l2.c
> In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
>                 from v4l2.c:36:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -fPIC -c -o v4l2-pool.o v4l2-pool.c
> In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
>                 from v4l2-pool.h:25,
>                 from v4l2-pool.c:26:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -o libomap3isp.so -shared controls.o
> media.o omap3isp.o subdev.o v4l2.o v4l2-pool.o
> make[1]: Leaving directory `/home/root/omap3-isp-live/isp'
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -c -o live.o live.c
> In file included from /usr/src/linux/usr/include/linux/fb.h:4:0,
>                 from live.c:44:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -c -o videoout.o videoout.c
> In file included from /usr/src/linux/usr/include/linux/videodev2.h:66:0,
>                 from videoout.c:23:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -Lisp -o live live.o videoout.o -lomap3isp -lrt
> arm-angstrom-linux-gnueabi-gcc -O2 -W -Wall
> -I/usr/src/linux/usr/include -c -o snapshot.o snapshot.c
> In file included from /usr/src/linux/usr/include/linux/spi/spidev.h:25:0,
>                 from snapshot.c:41:
> /usr/src/linux/usr/include/linux/types.h:13:2: warning: #warning
> "Attempt to use kernel headers from user space, see
> http://kernelnewbies.org/KernelHeaders"
> arm-angstrom-linux-gnueabi-gcc -Lisp -o snapshot snapshot.o -lomap3isp -lrt
> root@omap3-multi:~/omap3-isp-live# ls
> LICENSE   README  live    live.o    snapshot.c  videoout.c  videoout.o
> Makefile  isp     live.c  snapshot  snapshot.o  videoout.h
> root@omap3-multi:~/omap3-isp-live# live --help
> -sh: live: command not found
> root@omap3-multi:~/omap3-isp-live# ./live --help
> ./live: error while loading shared libraries: libomap3isp.so: cannot
> open shared object file: No such file or directory
> root@omap3-multi:~/omap3-isp-live# cd isp
> root@omap3-multi:~/omap3-isp-live/isp# ls
> LICENSE     libomap3isp.so  omap3isp-priv.h  subdev.h     v4l2-pool.o
> Makefile    list.h          omap3isp.c       subdev.o     v4l2.c
> controls.c  media.c         omap3isp.h       tools.h      v4l2.h
> controls.h  media.h         omap3isp.o       v4l2-pool.c  v4l2.o
> controls.o  media.o         subdev.c         v4l2-pool.h
> root@omap3-multi:~/omap3-isp-live/isp# cd ..
> root@omap3-multi:~/omap3-isp-live# ls /
> bin   dev  home  linuxrc     media  proc  sys  usr
> boot  etc  lib   lost+found  mnt    sbin  tmp  var
> root@omap3-multi:~/omap3-isp-live# ls /usr/
> arm-angstrom-linux-gnueabi  etc    include  libexec  share
> bin                         games  lib      sbin     src
> root@omap3-multi:~/omap3-isp-live#
>
> I ran ./live --help and there is an error
> ./live --help
> ./live: error while loading shared libraries: libomap3isp.so: cannot
> open shared object file: No such file or directory
>
> Please advise.
>
> Many thanks in adv.

After googling for the warning, I proceed with the following steps to
make the application on Steve's GNOME-R13 image from this site as it
has all the tools for native-compilation on the Tobi board.

1) Inside /usr/src/linux, run "make headers_install ARCH=arm" and my
/usr/include is now populated with lots of files.

2) Inside omap3-isp-live, I ran "make KDIR=/usr/src/linux
CROSS_COMPILE=arm-angstrom-linux-gnueabi-".

This gave me an error about not finding linux/omap3isp.h file.
Thus, I modified the 2 Makefile and replaced "-I$(KDIR)/usr/include"
with "-I$(KDIR)/include"

Ran "make KDIR=/usr/src/linux
CROSS_COMPILE=arm-angstrom-linux-gnueabi-" again and it compiled
nicely without warnings about using kernel headers from user space.

Only 3 warnings about

a) omap3isp.c:271:13: warning: 'omap3_isp_pool_free_buffers' defined
but not used
b) omap3isp.c:329:15: warning: 'nbufs' may be used uninitialized in
this function
c) subdev.c:49:20: warning: 'pixelcode_to_string' defined but not used

Hope I got it right compiling it this time!! (^^)"

3) Copied isp/libomap3isp.so to /usr/lib/ directory when this message
appeared when I ran ./live -h

"./live: error while loading shared libraries: libomap3isp.so: cannot
open shared object file: No such file or directory"

4) Ran ./live again and got this error message "unable to find video
output device"

overo: setting xclk to 25000000 hz
Device /dev/videovero: setting xclk to 0 hz
o6 opened: OMAP3 ISP resizer output (media).
viewfinder configured for 2011 1024x768
error: unable to find video output device

The output of the DVI goes 'blue' and nothing shown.
What is missing?

lsmod shows the list of modules loaded.

Module                  Size  Used by
fuse                   59943  3
bufferclass_ti          4976  0
omaplfb                 8025  0
pvrsrvkm              146868  2 bufferclass_ti,omaplfb
mt9v032                 5958  1
omap3_isp             104303  0
v4l2_common             8543  2 mt9v032,omap3_isp
videodev               78271  3 mt9v032,omap3_isp,v4l2_common
libertas_sdio          14871  0
media                  11885  3 mt9v032,omap3_isp,videodev
libertas               92472  1 libertas_sdio
cfg80211              157222  1 libertas
lib80211                5291  1 libertas
firmware_class          6269  2 libertas_sdio,libertas
ads7846                10331  0
ipv6                  226224  18

5) Ran ./snapshot and it continues till Ctrl+C.
Does it has any output others then those messages?

Many thanks in adv.

-- 
Regards,
James

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-04  7:07   ` James
  2012-01-05  9:55     ` James
@ 2012-01-06 12:34     ` Laurent Pinchart
  1 sibling, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2012-01-06 12:34 UTC (permalink / raw)
  To: James; +Cc: linux-media

Hi James,

On Wednesday 04 January 2012 08:07:23 James wrote:
> On Tue, Jan 3, 2012 at 7:17 PM, Laurent Pinchart wrote:
> > On Tuesday 03 January 2012 10:40:10 James wrote:
> >> Hi Laurent,
> >> 
> >> Happy New Year!!
> > 
> > Thank you. Happy New Year to you as well. May 2012 bring you a workable
> > OMAP3 ISP solution ;-)
> 
> Yeah! that's on #1 of my 2012 wishlist!! (^^)
> 
> But, it start off with a disappointment on the quest to get
> "gst-launch v4l2src" to work..
> http://patches.openembedded.org/patch/8895/
> 
> Saw reported success in get v4l2src to work with MT9V032 by applying
> the hack but no luck with my Y12 monochrome sensor. (-.-)"
> 
> >> I saw that there is a simple viewfinder in your repo for OMAP3 and
> >> wish to know more about it.
> >> 
> >> http://git.ideasonboard.org/?p=omap3-isp-live.git;a=summary
> >> 
> >> I intend to test it with my 12-bit (Y12) monochrome camera sensor
> >> driver, running on top of Gumstix's (Steve v3.0) kernel.
> >> 
> >> Is it workable at the moment?
> > 
> > The application is usable but supports raw Bayer sensors only at the
> > moment. It requires a frame buffer and an omap_vout device (both should
> > be located automatically) and configures the OMAP3 ISP pipeline
> > automatically to produce the display resolution.
> 
> Will there be a need to patch for Y12 support or workable out-of-the-box?

It will work out of the box when someone implements support for Y12 :-)

> Likely your previous notes, I know that 12-bit Y12 to the screen is an
> overkill but will it be able to capture Y12 from CCDC output and then
> output to the screen?
> 
> Y12 sensor-> CCDC -> CCDC output -> screen

The omap_vout driver supports V4L2_PIX_FMT_RGB565, V4L2_PIX_FMT_RGB32, 
V4L2_PIX_FMT_RGB24, V4L2_PIX_FMT_YUYV and V4L2_PIX_FMT_UYVY only. To display 
Y12 data you will need to convert them to 10 bits in the CCDC (that's already 
implemented) and then to YUYV in the preview engine (that's not implemented 
yet).

> I've one board connected to a LCD monitor via a DVI chip using GS's
> Tobi board as reference and another via 4.3" LG LCD Touchscreen using
> GS's Chestnut board as reference.
> 
> Many thanks in adv

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-06  6:24       ` James
@ 2012-01-06 13:09         ` Laurent Pinchart
       [not found]           ` <CAOy7-nMBw8Mry9iL0fYKQ1_Bpjp9Pm5hUzPE-SFD9JwGfpv3FA@mail.gmail.com>
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2012-01-06 13:09 UTC (permalink / raw)
  To: James; +Cc: linux-media

Hi James,

On Friday 06 January 2012 07:24:54 James wrote:

[snip]

> After googling for the warning, I proceed with the following steps to
> make the application on Steve's GNOME-R13 image from this site as it
> has all the tools for native-compilation on the Tobi board.
> 
> 1) Inside /usr/src/linux, run "make headers_install ARCH=arm" and my
> /usr/include is now populated with lots of files.

omap3-isp-live requires recent kernel headers that are not shipped by 
distributions yet, so you need to install them to some location first. "make 
headers_install ARCH=arm" should install them to /usr/src/linux/usr/include, 
not /usr/include.

> 2) Inside omap3-isp-live, I ran "make KDIR=/usr/src/linux
> CROSS_COMPILE=arm-angstrom-linux-gnueabi-".
> 
> This gave me an error about not finding linux/omap3isp.h file.
> Thus, I modified the 2 Makefile and replaced "-I$(KDIR)/usr/include"
> with "-I$(KDIR)/include"

That's weird. The make headers_install step above should have installed the 
headers in /usr/src/linux/usr/include, so the makefile should be correct.

> Ran "make KDIR=/usr/src/linux
> CROSS_COMPILE=arm-angstrom-linux-gnueabi-" again and it compiled
> nicely without warnings about using kernel headers from user space.
> 
> Only 3 warnings about
> 
> a) omap3isp.c:271:13: warning: 'omap3_isp_pool_free_buffers' defined
> but not used

Fixed in the latest version.

> b) omap3isp.c:329:15: warning: 'nbufs' may be used uninitialized in
> this function

Fixed in the latest version as well.

> c) subdev.c:49:20: warning: 'pixelcode_to_string' defined but not used

I'll fix that, but it's harmless.

> Hope I got it right compiling it this time!! (^^)"
> 
> 3) Copied isp/libomap3isp.so to /usr/lib/ directory when this message
> appeared when I ran ./live -h
> 
> "./live: error while loading shared libraries: libomap3isp.so: cannot
> open shared object file: No such file or directory"
> 
> 4) Ran ./live again and got this error message "unable to find video
> output device"

That should be fixed in the latest version. Could you please upgrade ?

> overo: setting xclk to 25000000 hz
> Device /dev/videovero: setting xclk to 0 hz
> o6 opened: OMAP3 ISP resizer output (media).
> viewfinder configured for 2011 1024x768
> error: unable to find video output device
> 
> The output of the DVI goes 'blue' and nothing shown.
> What is missing?
> 
> lsmod shows the list of modules loaded.
> 
> Module                  Size  Used by
> fuse                   59943  3
> bufferclass_ti          4976  0
> omaplfb                 8025  0
> pvrsrvkm              146868  2 bufferclass_ti,omaplfb
> mt9v032                 5958  1
> omap3_isp             104303  0
> v4l2_common             8543  2 mt9v032,omap3_isp
> videodev               78271  3 mt9v032,omap3_isp,v4l2_common
> libertas_sdio          14871  0
> media                  11885  3 mt9v032,omap3_isp,videodev
> libertas               92472  1 libertas_sdio
> cfg80211              157222  1 libertas
> lib80211                5291  1 libertas
> firmware_class          6269  2 libertas_sdio,libertas
> ads7846                10331  0
> ipv6                  226224  18
> 
> 5) Ran ./snapshot and it continues till Ctrl+C.
> Does it has any output others then those messages?
> 
> Many thanks in adv.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]             ` <201201081230.42414.laurent.pinchart@ideasonboard.com>
@ 2012-01-11  4:24               ` James
  2012-01-11  9:41                 ` Laurent Pinchart
  0 siblings, 1 reply; 19+ messages in thread
From: James @ 2012-01-11  4:24 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

On Sun, Jan 8, 2012 at 7:30 PM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> Hi James,
>
> On Sunday 08 January 2012 02:14:55 James wrote:
>
> [snip]
>
>> BTW, can you send me the defconfig file you used for testing on overo as I
>> couldn‘t compile your branch with mine.
>
> Attached.
>
>> I forgot to mentioned that I'm trying out the application with the MT9V032
>> camera first on both Tobi & Chestnut board. Not with the new monochrome
>> sensor yet.
>
> --
> Regards,
>
> Laurent Pinchart

Thanks for the defconfig.

I'll proceed to try to build a fresh kernel based on your branch
"omap3isp-sensors-board".

I guess this is a better branch or should I try the YUV branch or others?

Test1 with MT9V032 and Test2 with monochrome sensor Y12.

Thanks.

-- 
Regards,
James

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-01-11  4:24               ` James
@ 2012-01-11  9:41                 ` Laurent Pinchart
       [not found]                   ` <CAOy7-nOrTESdfG+_njJgcVUAiLuks_21=GFMBK-2b5mK9UJwpg@mail.gmail.com>
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2012-01-11  9:41 UTC (permalink / raw)
  To: James; +Cc: linux-media

Hi James,

On Wednesday 11 January 2012 05:24:35 James wrote:
> On Sun, Jan 8, 2012 at 7:30 PM, Laurent Pinchart wrote:
> > On Sunday 08 January 2012 02:14:55 James wrote:
> > 
> > [snip]
> > 
> >> BTW, can you send me the defconfig file you used for testing on overo as
> >> I couldn‘t compile your branch with mine.
> > 
> > Attached.
> > 
> >> I forgot to mentioned that I'm trying out the application with the
> >> MT9V032 camera first on both Tobi & Chestnut board. Not with the new
> >> monochrome sensor yet.
> > 
> > --
> > Regards,
> > 
> > Laurent Pinchart
> 
> Thanks for the defconfig.
> 
> I'll proceed to try to build a fresh kernel based on your branch
> "omap3isp-sensors-board".
> 
> I guess this is a better branch or should I try the YUV branch or others?

That's the right branch. The YUV branch is just work in progress.

> Test1 with MT9V032 and Test2 with monochrome sensor Y12.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]                     ` <CAOy7-nOrTESdfG+_njJgcVUAiLuks_21=GFMBK-2b5mK9UJwpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-09  7:25                       ` Laurent Pinchart
  2012-02-10  8:26                         ` Ohad Ben-Cohen
  2012-02-10 15:10                         ` Joerg Roedel
  0 siblings, 2 replies; 19+ messages in thread
From: Laurent Pinchart @ 2012-02-09  7:25 UTC (permalink / raw)
  To: James; +Cc: Ohad Ben-Cohen, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Hi James,

(CC'ing Ohad, Joerg and the IOMMU mailing list)

On Wednesday 08 February 2012 16:29:14 James wrote:
>
> I baked a new kernel from your branch using OE & your defconfig but I got a
> "Kernel Panic" when booting it.
> 
> Attached is the console log from the Overo+Tobi board+Caspa setup.
> 
> Can you advise my next course of resolution?

Does the following patch fix the problem ?

diff --git a/drivers/Makefile b/drivers/Makefile
index 1b31421..2ec48f2 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -28,6 +28,7 @@ obj-$(CONFIG_XEN)		+= xen/
 
 # regulators early, since some subsystems rely on them to initialize
 obj-$(CONFIG_REGULATOR)		+= regulator/
+obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
 
 # tty/ comes before char/ so that the VT console is the boot-time
 # default.
@@ -125,7 +126,6 @@ obj-y				+= clk/
 
 obj-$(CONFIG_HWSPINLOCK)	+= hwspinlock/
 obj-$(CONFIG_NFC)		+= nfc/
-obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
 
 # Virtualization drivers
 obj-$(CONFIG_VIRT_DRIVERS)	+= virt/

Ohad, Joerg, would this be an acceptable fix ? If so I'll submit a patch.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-02-09  7:25                       ` Laurent Pinchart
@ 2012-02-10  8:26                         ` Ohad Ben-Cohen
  2012-02-10 15:10                         ` Joerg Roedel
  1 sibling, 0 replies; 19+ messages in thread
From: Ohad Ben-Cohen @ 2012-02-10  8:26 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: James, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Thu, Feb 9, 2012 at 9:25 AM, Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> wrote:
> Ohad, Joerg, would this be an acceptable fix ?

What does this fix ? care to attach the oops ?

Thanks,
Ohad.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-02-09  7:25                       ` Laurent Pinchart
  2012-02-10  8:26                         ` Ohad Ben-Cohen
@ 2012-02-10 15:10                         ` Joerg Roedel
       [not found]                           ` <CAOy7-nNgduFBqYMpLEaTPQ9VQwZ0Z29SzcAoGC6uRWGAPM3_JA@mail.gmail.com>
  1 sibling, 1 reply; 19+ messages in thread
From: Joerg Roedel @ 2012-02-10 15:10 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Ohad Ben-Cohen, James,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

On Thu, Feb 09, 2012 at 08:25:27AM +0100, Laurent Pinchart wrote:
> diff --git a/drivers/Makefile b/drivers/Makefile
> index 1b31421..2ec48f2 100644
> --- a/drivers/Makefile
> +++ b/drivers/Makefile
> @@ -28,6 +28,7 @@ obj-$(CONFIG_XEN)		+= xen/
>  
>  # regulators early, since some subsystems rely on them to initialize
>  obj-$(CONFIG_REGULATOR)		+= regulator/
> +obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
>  
>  # tty/ comes before char/ so that the VT console is the boot-time
>  # default.
> @@ -125,7 +126,6 @@ obj-y				+= clk/
>  
>  obj-$(CONFIG_HWSPINLOCK)	+= hwspinlock/
>  obj-$(CONFIG_NFC)		+= nfc/
> -obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
>  
>  # Virtualization drivers
>  obj-$(CONFIG_VIRT_DRIVERS)	+= virt/
> 
> Ohad, Joerg, would this be an acceptable fix ? If so I'll submit a patch.

I also want to understand the problem first. Can you provide some
context?


	Joerg


-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]                             ` <CAOy7-nNgduFBqYMpLEaTPQ9VQwZ0Z29SzcAoGC6uRWGAPM3_JA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-14 10:44                               ` Joerg Roedel
       [not found]                                 ` <20120214104436.GU22598-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Joerg Roedel @ 2012-02-14 10:44 UTC (permalink / raw)
  To: James
  Cc: Ohad Ben-Cohen, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Laurent Pinchart

On Mon, Feb 13, 2012 at 09:28:30AM +0800, James wrote:

> >> @@ -28,6 +28,7 @@ obj-$(CONFIG_XEN)           += xen/
> >>
> >>  # regulators early, since some subsystems rely on them to initialize
> >>  obj-$(CONFIG_REGULATOR)              += regulator/
> >> +obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/
> >>
> >>  # tty/ comes before char/ so that the VT console is the boot-time
> >>  # default.
> >> @@ -125,7 +126,6 @@ obj-y                             += clk/
> >>
> >>  obj-$(CONFIG_HWSPINLOCK)     += hwspinlock/
> >>  obj-$(CONFIG_NFC)            += nfc/
> >> -obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/
> >>
> >>  # Virtualization drivers
> >>  obj-$(CONFIG_VIRT_DRIVERS)   += virt/

I don't see how this patch solves a problem like below.

> [    3.663269] Unable to handle kernel NULL pointer dereference at virtual address 00000058
> [    3.671844] pgd = c0004000
> [    3.674682] [00000058] *pgd=00000000
> [    3.678527] Internal error: Oops: 5 [#1]
> [    3.682647] Modules linked in:
> [    3.685852] CPU: 0    Tainted: G        W     (3.2.0-rc2 #1)
> [    3.691802] PC is at klist_next+0x10/0xb4
> [    3.696014] LR is at next_device+0x8/0x14
> [    3.700225] pc : [<c03eeac4>]    lr : [<c024deb8>]    psr: 60000013
> [    3.700225] sp : de82de98  ip : 00000000  fp : c04300c0
> [    3.712249] r10: 000003ff  r9 : c05e2c48  r8 : 00000001
> [    3.717742] r7 : c078ed68  r6 : 00000000  r5 : de82deb8  r4 : de82deb8
> [    3.724578] r3 : c031ff60  r2 : 00000000  r1 : de82deb8  r0 : 00000024
> [    3.731414] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
> [    3.739074] Control: 10c5387d  Table: 80004019  DAC: 00000015
> [    3.745117] Process swapper (pid: 1, stack limit = 0xde82c2f0)
> [    3.751220] Stack: (0xde82de98 to 0xde82e000)
> [    3.755798] de80:                                                       c031ff60 c04f8ff4
> [    3.764373] dea0: de82deb8 c031ff60 c078ed68 c024deb8 c031ff60 c024df28 00000024 00000000
> [    3.772949] dec0: c04f8ff4 debe8000 00007990 c05e2c40 0000000e c02e9578 22222222 debd1660
> [    3.781524] dee0: 00000000 c011801c c05e2c48 c0056368 debe8580 00000003 de893e80 00000000
> [    3.790100] df00: c05e2c7c c05e2c48 c05e2c7c c078c144 c078c144 00000000 00000000 00000000
> [    3.798675] df20: 00000000 c024e800 c024e7ec c024d720 00000000 c05e2c48 c05e2c7c c078c144
> [    3.807281] df40: 00000000 c024d844 c078c144 de82df58 c024d7dc c024c9a0 de825060 de888898
> [    3.815856] df60: c078c144 c078c144 debd3ec0 c0781a10 00000000 c024d02c c04f8fef c05fc430
> [    3.824432] df80: de81b040 c078c144 c05d9168 c000dc9c c05c4068 00000000 00000000 c024dd88
> [    3.833007] dfa0: 00000000 c05d904c c05d9168 c000dc9c c05c4068 00000000 00000000 c00087cc
> [    3.841583] dfc0: c05c4068 de81b040 c0797fc0 00000000 c05d904c c05d9168 c000dc9c 00000013
> [    3.850158] dfe0: 00000000 c05a77c8 de81b040 00000000 c05a7750 c000dc9c 00000000 00002000
> [    3.858764] [<c03eeac4>] (klist_next+0x10/0xb4) from [<c024deb8>] (next_device+0x8/0x14)
> [    3.867248] [<c024deb8>] (next_device+0x8/0x14) from [<c024df28>] (driver_find_device+0x64/0x7c)
> [    3.876464] [<c024df28>] (driver_find_device+0x64/0x7c) from [<c02e9578>] (isp_probe+0x228/0xa34)
> [    3.885772] [<c02e9578>] (isp_probe+0x228/0xa34) from [<c024e800>] (platform_drv_probe+0x14/0x18)
> [    3.895111] [<c024e800>] (platform_drv_probe+0x14/0x18) from [<c024d720>] (driver_probe_device+0xc8/0x184)
> [    3.905212] [<c024d720>] (driver_probe_device+0xc8/0x184) from [<c024d844>] (__driver_attach+0x68/0x8c)
> [    3.915100] [<c024d844>] (__driver_attach+0x68/0x8c) from [<c024c9a0>] (bus_for_each_dev+0x4c/0x78)
> [    3.924591] [<c024c9a0>] (bus_for_each_dev+0x4c/0x78) from [<c024d02c>] (bus_add_driver+0x9c/0x220)
> [    3.934082] [<c024d02c>] (bus_add_driver+0x9c/0x220) from [<c024dd88>] (driver_register+0xa0/0x120)
> [    3.943572] [<c024dd88>] (driver_register+0xa0/0x120) from [<c00087cc>] (do_one_initcall+0x90/0x164)
> [    3.953155] [<c00087cc>] (do_one_initcall+0x90/0x164) from [<c05a77c8>] (kernel_init+0x78/0x11c)
> [    3.962402] [<c05a77c8>] (kernel_init+0x78/0x11c) from [<c000dc9c>] (kernel_thread_exit+0x0/0x8)
> [    3.971618] Code: e92d40f8 e1a04000 e5900000 e5946004 (e5907034) 
> [    3.978057] ---[ end trace 1b75b31a2719ed1e ]---
> [    3.983001] Kernel panic - not syncing: Attempted to kill init!

This looks more like data corruption or something. But this is definitly
not caused by some random order in the Makefile.
Please debug this issue down to the real cause. Bisecting may help here.


	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]                                 ` <20120214104436.GU22598-5C7GfCeVMHo@public.gmane.org>
@ 2012-02-16  6:46                                   ` Laurent Pinchart
  2012-02-23 16:38                                     ` Laurent Pinchart
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2012-02-16  6:46 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Ohad Ben-Cohen, James,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Hi Joerg,

On Tuesday 14 February 2012 11:44:37 Joerg Roedel wrote:
> On Mon, Feb 13, 2012 at 09:28:30AM +0800, James wrote:
> > >> @@ -28,6 +28,7 @@ obj-$(CONFIG_XEN)           += xen/
> > >> 
> > >>  # regulators early, since some subsystems rely on them to initialize
> > >>  obj-$(CONFIG_REGULATOR)              += regulator/
> > >> +obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/
> > >> 
> > >>  # tty/ comes before char/ so that the VT console is the boot-time
> > >>  # default.
> > >> @@ -125,7 +126,6 @@ obj-y                             += clk/
> > >> 
> > >>  obj-$(CONFIG_HWSPINLOCK)     += hwspinlock/
> > >>  obj-$(CONFIG_NFC)            += nfc/
> > >> -obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/
> > >> 
> > >>  # Virtualization drivers
> > >>  obj-$(CONFIG_VIRT_DRIVERS)   += virt/
> 
> I don't see how this patch solves a problem like below.
> 
> > [    3.663269] Unable to handle kernel NULL pointer dereference at virtual
> > address 00000058

[snip]

> > [<c03eeac4>] (klist_next+0x10/0xb4) from [<c024deb8>]
> > (next_device+0x8/0x14)
> > [<c024deb8>] (next_device+0x8/0x14) from [<c024df28>]
> > (driver_find_device+0x64/0x7c)
> > [<c024df28>] (driver_find_device+0x64/0x7c) from [<c02e9578>]
> > (isp_probe+0x228/0xa34)

[snip]

> This looks more like data corruption or something. But this is definitly
> not caused by some random order in the Makefile.
> Please debug this issue down to the real cause. Bisecting may help here.

There's actually a line missing from the backtrace for some reason.

isp_probe() calls iommu_attach_device(), which ends up calling 
omap_iommu_attach(). That function then calls driver_find_device(), passing it 
omap_iommu_driver.driver as its first argument. However, as the OMAP3 ISP 
driver is linked in the kernel before the OMAP3 IOMMU driver, 
omap_iommu_init() has not be called yet by this time. omap_iommu_driver.driver 
is thus uninitialized, and klist iteration oopses as the linked list head is 
NULL.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-02-16  6:46                                   ` Laurent Pinchart
@ 2012-02-23 16:38                                     ` Laurent Pinchart
  2012-02-23 16:59                                       ` Ohad Ben-Cohen
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2012-02-23 16:38 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: Ohad Ben-Cohen, James,
	iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

Hi Joerg and Ohad,

Ping ? I've discussed this with Ohad last week, and we agreed that there was 
indeed an issue with the IOMMU subsystem and/or the OMAP3 IOMMU driver. Could 
you please have a look at my explanation below ?

On Thursday 16 February 2012 07:46:58 Laurent Pinchart wrote:
> On Tuesday 14 February 2012 11:44:37 Joerg Roedel wrote:
> > On Mon, Feb 13, 2012 at 09:28:30AM +0800, James wrote:
> > > >> @@ -28,6 +28,7 @@ obj-$(CONFIG_XEN)           += xen/
> > > >> 
> > > >>  # regulators early, since some subsystems rely on them to initialize
> > > >>  obj-$(CONFIG_REGULATOR)              += regulator/
> > > >> 
> > > >> +obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/
> > > >> 
> > > >>  # tty/ comes before char/ so that the VT console is the boot-time
> > > >>  # default.
> > > >> 
> > > >> @@ -125,7 +126,6 @@ obj-y                             += clk/
> > > >> 
> > > >>  obj-$(CONFIG_HWSPINLOCK)     += hwspinlock/
> > > >>  obj-$(CONFIG_NFC)            += nfc/
> > > >> 
> > > >> -obj-$(CONFIG_IOMMU_SUPPORT)  += iommu/
> > > >> 
> > > >>  # Virtualization drivers
> > > >>  obj-$(CONFIG_VIRT_DRIVERS)   += virt/
> > 
> > I don't see how this patch solves a problem like below.
> > 
> > > [    3.663269] Unable to handle kernel NULL pointer dereference at
> > > virtual
> > > address 00000058
> 
> [snip]
> 
> > > [<c03eeac4>] (klist_next+0x10/0xb4) from [<c024deb8>]
> > > (next_device+0x8/0x14)
> > > [<c024deb8>] (next_device+0x8/0x14) from [<c024df28>]
> > > (driver_find_device+0x64/0x7c)
> > > [<c024df28>] (driver_find_device+0x64/0x7c) from [<c02e9578>]
> > > (isp_probe+0x228/0xa34)
> 
> [snip]
> 
> > This looks more like data corruption or something. But this is definitly
> > not caused by some random order in the Makefile.
> > Please debug this issue down to the real cause. Bisecting may help here.
> 
> There's actually a line missing from the backtrace for some reason.
> 
> isp_probe() calls iommu_attach_device(), which ends up calling
> omap_iommu_attach(). That function then calls driver_find_device(), passing
> it omap_iommu_driver.driver as its first argument. However, as the OMAP3
> ISP driver is linked in the kernel before the OMAP3 IOMMU driver,
> omap_iommu_init() has not be called yet by this time.
> omap_iommu_driver.driver is thus uninitialized, and klist iteration oopses
> as the linked list head is NULL.

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
  2012-02-23 16:38                                     ` Laurent Pinchart
@ 2012-02-23 16:59                                       ` Ohad Ben-Cohen
       [not found]                                         ` <CAK=Wgbbq_7fmtRxSN+ZSY6X0opPMfR3QLNkBmWxZdXf_91wk5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Ohad Ben-Cohen @ 2012-02-23 16:59 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, James

Hi Laurent,

On Thu, Feb 23, 2012 at 6:38 PM, Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org> wrote:
> Ping ? I've discussed this with Ohad last week, and we agreed that there was
> indeed an issue with the IOMMU subsystem and/or the OMAP3 IOMMU driver. Could
> you please have a look at my explanation below ?

Oops - for some reason I didn't realize I had an action item, my bad :)

Can you try the below and tell me if it helps ?

diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
index 609ea2d..f992395 100644
--- a/arch/arm/mach-omap2/mailbox.c
+++ b/arch/arm/mach-omap2/mailbox.c
@@ -412,7 +412,7 @@ static void __exit omap2_mbox_exit(void)
        platform_driver_unregister(&omap2_mbox_driver);
 }

-module_init(omap2_mbox_init);
+subsys_initcall(omap2_mbox_init);
 module_exit(omap2_mbox_exit);

 MODULE_LICENSE("GPL v2");


If it works for you I'd prefer something in those lines, because it
makes the problem (and its solution) more visible/explicit.

Anyway I'd only consider this as an interim solution until the
deferred probing mechanism (by Grant) is merged.

Thanks!
Ohad.

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]                                         ` <CAK=Wgbbq_7fmtRxSN+ZSY6X0opPMfR3QLNkBmWxZdXf_91wk5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-23 17:01                                           ` Ohad Ben-Cohen
       [not found]                                             ` <CAK=WgbY5V=ZxVf2xisWuQbVwFyth9rQ8WaXiMkpjUHnMyyCSvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Ohad Ben-Cohen @ 2012-02-23 17:01 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA, James

On Thu, Feb 23, 2012 at 6:59 PM, Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org> wrote:
> diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
> index 609ea2d..f992395 100644
> --- a/arch/arm/mach-omap2/mailbox.c
> +++ b/arch/arm/mach-omap2/mailbox.c
> @@ -412,7 +412,7 @@ static void __exit omap2_mbox_exit(void)
>        platform_driver_unregister(&omap2_mbox_driver);
>  }
>
> -module_init(omap2_mbox_init);
> +subsys_initcall(omap2_mbox_init);
>  module_exit(omap2_mbox_exit);
>
>  MODULE_LICENSE("GPL v2");

And this, too:

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 4e661f0..95adb7e 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1222,7 +1222,7 @@ static int __init omap_iommu_init(void)

        return platform_driver_register(&omap_iommu_driver);
 }
-module_init(omap_iommu_init);
+subsys_initcall(omap_iommu_init);

 static void __exit omap_iommu_exit(void)
 {

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]                                             ` <CAK=WgbY5V=ZxVf2xisWuQbVwFyth9rQ8WaXiMkpjUHnMyyCSvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2012-02-24 11:01                                               ` Joerg Roedel
       [not found]                                                 ` <20120224110137.GF2454-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Joerg Roedel @ 2012-02-24 11:01 UTC (permalink / raw)
  To: Ohad Ben-Cohen
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Laurent Pinchart

On Thu, Feb 23, 2012 at 07:01:05PM +0200, Ohad Ben-Cohen wrote:
> On Thu, Feb 23, 2012 at 6:59 PM, Ohad Ben-Cohen <ohad-Ix1uc/W3ht7QT0dZR+AlfA@public.gmane.org> wrote:
> > diff --git a/arch/arm/mach-omap2/mailbox.c b/arch/arm/mach-omap2/mailbox.c
> > index 609ea2d..f992395 100644
> > --- a/arch/arm/mach-omap2/mailbox.c
> > +++ b/arch/arm/mach-omap2/mailbox.c
> > @@ -412,7 +412,7 @@ static void __exit omap2_mbox_exit(void)
> >        platform_driver_unregister(&omap2_mbox_driver);
> >  }
> >
> > -module_init(omap2_mbox_init);
> > +subsys_initcall(omap2_mbox_init);
> >  module_exit(omap2_mbox_exit);
> >
> >  MODULE_LICENSE("GPL v2");
> 
> And this, too:
> 
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index 4e661f0..95adb7e 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -1222,7 +1222,7 @@ static int __init omap_iommu_init(void)
> 
>         return platform_driver_register(&omap_iommu_driver);
>  }
> -module_init(omap_iommu_init);
> +subsys_initcall(omap_iommu_init);
> 
>  static void __exit omap_iommu_exit(void)
>  {

These patches make a lot more sense to me than fixing this by relying on
some random linker behavior. Can you please send a fix like this with a
proper commit-msg?

Thanks,

	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: Using OMAP3 ISP live display and snapshot sample applications
       [not found]                                                 ` <20120224110137.GF2454-5C7GfCeVMHo@public.gmane.org>
@ 2012-02-26 10:20                                                   ` Ohad Ben-Cohen
  0 siblings, 0 replies; 19+ messages in thread
From: Ohad Ben-Cohen @ 2012-02-26 10:20 UTC (permalink / raw)
  To: Joerg Roedel
  Cc: iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	Laurent Pinchart

On Fri, Feb 24, 2012 at 1:01 PM, Joerg Roedel <joerg.roedel-5C7GfCeVMHo@public.gmane.org> wrote:
> These patches make a lot more sense to me than fixing this by relying on
> some random linker behavior. Can you please send a fix like this with a
> proper commit-msg?

Done, thanks.

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2012-02-26 10:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-03  9:40 Using OMAP3 ISP live display and snapshot sample applications James
2012-01-03 11:17 ` Laurent Pinchart
2012-01-04  7:07   ` James
2012-01-05  9:55     ` James
2012-01-06  6:24       ` James
2012-01-06 13:09         ` Laurent Pinchart
     [not found]           ` <CAOy7-nMBw8Mry9iL0fYKQ1_Bpjp9Pm5hUzPE-SFD9JwGfpv3FA@mail.gmail.com>
     [not found]             ` <201201081230.42414.laurent.pinchart@ideasonboard.com>
2012-01-11  4:24               ` James
2012-01-11  9:41                 ` Laurent Pinchart
     [not found]                   ` <CAOy7-nOrTESdfG+_njJgcVUAiLuks_21=GFMBK-2b5mK9UJwpg@mail.gmail.com>
     [not found]                     ` <CAOy7-nOrTESdfG+_njJgcVUAiLuks_21=GFMBK-2b5mK9UJwpg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-09  7:25                       ` Laurent Pinchart
2012-02-10  8:26                         ` Ohad Ben-Cohen
2012-02-10 15:10                         ` Joerg Roedel
     [not found]                           ` <CAOy7-nNgduFBqYMpLEaTPQ9VQwZ0Z29SzcAoGC6uRWGAPM3_JA@mail.gmail.com>
     [not found]                             ` <CAOy7-nNgduFBqYMpLEaTPQ9VQwZ0Z29SzcAoGC6uRWGAPM3_JA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-14 10:44                               ` Joerg Roedel
     [not found]                                 ` <20120214104436.GU22598-5C7GfCeVMHo@public.gmane.org>
2012-02-16  6:46                                   ` Laurent Pinchart
2012-02-23 16:38                                     ` Laurent Pinchart
2012-02-23 16:59                                       ` Ohad Ben-Cohen
     [not found]                                         ` <CAK=Wgbbq_7fmtRxSN+ZSY6X0opPMfR3QLNkBmWxZdXf_91wk5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-23 17:01                                           ` Ohad Ben-Cohen
     [not found]                                             ` <CAK=WgbY5V=ZxVf2xisWuQbVwFyth9rQ8WaXiMkpjUHnMyyCSvQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-02-24 11:01                                               ` Joerg Roedel
     [not found]                                                 ` <20120224110137.GF2454-5C7GfCeVMHo@public.gmane.org>
2012-02-26 10:20                                                   ` Ohad Ben-Cohen
2012-01-06 12:34     ` Laurent Pinchart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.