Texas Instruments OMAP35 Series User Manual page 103

Evm linux psp
Hide thumbs Also See for OMAP35 Series:
Table of Contents

Advertisement

change the rotation angle. Rotation angle cannot be changed while streaming
is on. Following code shows how to set rotation angle to 90 degree.
struct v4l2_control control;
int degree = 90;
control.id = V4L2_CID_ROTATION;
control.value = degree;
ret = ioctl(fd, VIDIOC_S_CTRL, &control);
/* Rotation angle is now set to 90 degree. Application can now do
FBDEV Driver
FBDEV driver supports rotation by using rotation engine in the VRFB module.
For using this feature of the driver, rotation has to be enabled. Application
can enable rotation by enabling/setting rotation angle in boot time argument
of the kernel for FBDEV driver. One of the fields in the fb_var_screeninfo
structure has been used for 'rotate' field. Applications can thus use the
FBIOPUT_VSCREENINFO ioctl to set the rotation angle. Applications have to
set this 'rotate' field in the fb_var_screeninfo structure equal to the angle of
rotation (0, 90, 180 or 270) and call this ioctl. Frame buffer driver also supports
the rotation through sysfs entry. Any one of the two method can be used to
configure rotation. Due to VRFB memory limitation, line offset/pitch is always
set to 2048xpixel size when rotation is enabled. In rotation enabled mode, the
height of the physical buffer allocated is limited to one screen height. Hence
double/triple buffering (using the panning ioctl) cannot be used when rotation
support is enabled.
While doing rotation x-resolution virtual should be equal to x-resolution and y-
resolution virtual should be equal to y-resolution. Also please note that vrfb
supports 32-byte alignment only. So x-resolution and y-resolution should be
32-byte aligned while rotation is enabled.
Version 02.01.01.08
Important
Rotation value must be set using VIDIOC_S_CTRL before setting any format
using VIDIOC_S_FMT as VIDIOC_S_FMT uses rotation value for calculating
buffer formats. Also VIDIOC_S_FMT ioctl must be called after changing the
rotation angle to change parameters as per the new rotation angle
if (ret < 0) {
perror("VIDIOC_S_CTRL\n");
close(fd);
exit(0);
}
streaming to see rotated image*/
Important
FBDEV driver internally reverses/manages the xres and yres for the 90 and
270 degree rotation, so user must give original values for rotation.
Platform Support Products
Display Driver
Usage
81

Advertisement

Table of Contents
loading

This manual is also suitable for:

Omap3515Omap3525Omap3530

Table of Contents