* Trouble using OMAP3530 previewer in oneshot mode
@ 2009-12-02 14:10 Felix Radensky
0 siblings, 0 replies; only message in thread
From: Felix Radensky @ 2009-12-02 14:10 UTC (permalink / raw)
To: linux-media, sakari.ailus
Hi,
I'm trying to run OMAP3 ISP previewer in oneshot mode, without much success.
My goal is to put a 6MB Bayer10 image (captured on the same OMAP3 EVM)
into RAM, run previewer and get its output in RAM. I use linux-2.6.29 kernel
with ISP driver from omap3camera git tree.
For testing purposes Bayer10 image is stored into a file. My driver
allocates
a 6MB buffer using iommu_vmalloc(), application maps this buffer using
driver's mmap() method, copies input file into a buffer and signals the
driver to
start a previewer. In PREV_DONE interrupt callback the driver wakes
application which stores previewer output from buffer into a file.
The following code runs previewer in oneshot mode (error checking
removed for simplicity)
int isppreview_set_image_size(int width, int height)
{
isp_obj.module.preview_input_height = height;
isp_obj.module.preview_input_width = width;
isp_obj.module.isp_pipeline = OMAP_ISP_PREVIEW;
isppreview_try_size(isp_obj.module.preview_input_width,
isp_obj.module.preview_input_height,
&isp_obj.module.preview_output_width,
&isp_obj.module.preview_output_height);
isppreview_config_inlineoffset(height * 2);
isppreview_config_size(isp_obj.module.preview_input_width,
isp_obj.module.preview_input_height,
isp_obj.module.preview_output_width,
isp_obj.module.preview_output_height);
}
int oneshot(int width, int height)
{
isppreview_request();
isp_set_callback(CBK_PREV_DONE, prev_done_cbk, NULL, NULL);
isppreview_config_datapath(PRV_RAW_MEM, PREVIEW_MEM);
isppreview_set_inaddr(prev_mem_mmu);
isppreview_set_outaddr(prev_mem_mmu);
isppreview_set_image_size(width, height);
isp_enable_interrupts(0);
isppreview_enable(1);
}
The PREV_DONE interrupt arrives, application saves resulting
image into a file, but it contains junk. The input file is known to
be good. The buffer mapping is good as well.
What am I doing wrong ?
Thanks a lot for your help.
Felix.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-12-02 15:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-02 14:10 Trouble using OMAP3530 previewer in oneshot mode Felix Radensky
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.