omap_vout: rotation issue on the first start
Commit Message
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:
>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -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;