All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Radensky <felix@embedded-sol.com>
To: linux-media@vger.kernel.org, sakari.ailus@maxwell.research.nokia.com
Subject: Trouble using OMAP3530 previewer in oneshot mode
Date: Wed, 02 Dec 2009 16:10:01 +0200	[thread overview]
Message-ID: <4B167539.2060109@embedded-sol.com> (raw)

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.
 

                 reply	other threads:[~2009-12-02 15:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B167539.2060109@embedded-sol.com \
    --to=felix@embedded-sol.com \
    --cc=linux-media@vger.kernel.org \
    --cc=sakari.ailus@maxwell.research.nokia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.