public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* davinci vpif_capture
@ 2013-08-30 16:39 Darryl
  2013-08-31 11:15 ` Prabhakar Lad
  0 siblings, 1 reply; 5+ messages in thread
From: Darryl @ 2013-08-30 16:39 UTC (permalink / raw)
  To: linux-media, davinci-linux-open-source

I am working on an application involving the davinci using the vpif.  My 
board file has the inputs configured to use VPIF_IF_RAW_BAYER if_type.
When my application starts up, I have it enumerate the formats 
(VIDIOC_ENUM_FMT) and it indicates that the only available format is 
"YCbCr4:2:2 YC Planar" (from vpif_enum_fmt_vid_cap).  It looks to me 
that the culprit is vpif_open().

struct channel_obj.vpifparams.iface is initialized at vpif_probe() time 
in the function vpif_set_input.  Open the device file (/dev/video0) 
overwrites this.  I suspect that it is __not__ supposed to do this, 
since I don't see any method for restoring the iface.

I'm using linux-3.10.4, but the problem appears in 3.10.9, 3.11.rc7 and 
a version I checked out at 
https://git.kernel.org/cgit/linux/kernel/git/nsekhar/linux-davinci.git. 
I have supplied a patch for 3.10.9.


diff -pubwr 
linux-3.10.9-pristine/drivers/media/platform/davinci/vpif_capture.c 
linux-3.10.9/drivers/media/platform/davinci/vpif_capture.c
--- linux-3.10.9-pristine/drivers/media/platform/davinci/vpif_capture.c 
  2013-08-20 17:40:47.000000000 -0500
+++ linux-3.10.9/drivers/media/platform/davinci/vpif_capture.c 
  2013-08-30 11:18:29.000000000 -0500
@@ -914,9 +914,11 @@ static int vpif_open(struct file *filep)
      fh->initialized = 0;
      /* If decoder is not initialized. initialize it */
      if (!ch->initialized) {
+        struct vpif_interface iface = ch->vpifparams.iface;
          fh->initialized = 1;
          ch->initialized = 1;
          memset(&(ch->vpifparams), 0, sizeof(struct vpif_params));
+        ch->vpifparams.iface = iface;
      }
      /* Increment channel usrs counter */
      ch->usrs++;





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

end of thread, other threads:[~2013-09-04 14:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-30 16:39 davinci vpif_capture Darryl
2013-08-31 11:15 ` Prabhakar Lad
2013-09-03 11:31   ` Darryl
2013-09-04  2:46     ` Prabhakar Lad
2013-09-04 14:08       ` Darryl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox