All of lore.kernel.org
 help / color / mirror / Atom feed
* omap_vout: rotation issue on the first start
@ 2013-07-09 14:25 Florian Neuhaus
  0 siblings, 0 replies; only message in thread
From: Florian Neuhaus @ 2013-07-09 14:25 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: linux-media

Hi Laurent,

Sorry to insist on this, but for you it's probably peanuts to see a possible error.
Any hints/workarounds are welcome...

>From the mail with subject
AW: AW: mt9p031 shows purple coloured capture
Florian Neuhaus wrote on 2013-06-24:

>> Have you tested the unmodified omap3-is-live ?
> I did today and indeed, with the unmodified app there is no green taint on
> the first start. I have now tracked down the issue to my implemented
> rotation on the video-out:
> 
diff --git a/videoout.c b/videoout.c
index 51bed8b..6fd8a16 100644
--- a/videoout.c
+++ b/videoout.c
@@ -60,6 +60,7 @@ struct videoout *vo_init(const char *devname,
 	struct v4l2_format fmt;
 	struct videoout *vo;
 	int ret;
+	int rotation = 90; /* rotate for testing purposes */
 
 	/* Allocate the video output object. */
 	vo = malloc(sizeof *vo);
@@ -76,6 +77,14 @@ struct videoout *vo_init(const char *devname,
 		goto error;
 	}
 
+	/* setup the rotation here, we have to do it BEFORE
+	 * setting the format. */
+	ret = v4l2_set_control(vo->dev, V4L2_CID_ROTATE, &rotation);
+	if (ret < 0){
+		perror("Failed to setup rotation\n");
+		goto error;
+	}
+
 	pixfmt.pixelformat = format->pixelformat;
 	pixfmt.width = format->width;
 	pixfmt.height = format->height;

It would be very nice if you could test the above patch with one of
your omap-devices.

> I do a rotation by 90 or 270 degrees. So there seems to be an issue with the
> vrfb-rotation in omap_vout?
> I am already rotating the omapfb - is this a problem?
> omapfb.rotate=1 omapfb.vrfb=y
> Another possibility to rotate the captured stream?

I noticed, that it happens only with 90 or 270 degree rotation
and not with 0 and 180 degree. Also only on the first start of
the stream. All following streamings are correct.

I have a 480x800 Portrait display. I try to rotate the output to
800x480 landscape.

Regards,
Florian



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-07-09 14:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-09 14:25 omap_vout: rotation issue on the first start Florian Neuhaus

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.