/* * omap_voutdef.h * * Copyright (C) 2010 Texas Instruments. * * This file is licensed under the terms of the GNU General Public License * version 2. This program is licensed "as is" without any warranty of any * kind, whether express or implied.
*/
/* Enum for Rotation * DSS understands rotation in 0, 1, 2, 3 context * while V4L2 driver understands it as 0, 90, 180, 270
*/ enum dss_rotation {
dss_rotation_0_degree = 0,
dss_rotation_90_degree = 1,
dss_rotation_180_degree = 2,
dss_rotation_270_degree = 3,
};
/* Enum for choosing rotation type for vout * DSS2 doesn't understand no rotation as an * option while V4L2 driver doesn't support * rotation in the case where VRFB is not built in * the kernel
*/ enum vout_rotaion_type {
VOUT_ROT_NONE = 0,
VOUT_ROT_VRFB = 1,
};
/* * This structure is used to store the DMA transfer parameters * for VRFB hidden buffer
*/ struct vid_vrfb_dma { struct dma_chan *chan; struct dma_interleaved_template *xt;
int req_status; int tx_status;
wait_queue_head_t wait;
};
struct omapvideo_info { int id; int num_overlays; struct omap_overlay *overlays[MAX_OVLS]; enum vout_rotaion_type rotation_type;
};
int num_displays; struct omap_dss_device *displays[MAX_DISPLAYS]; int num_overlays; struct omap_overlay *overlays[MAX_OVLS]; int num_managers; struct omap_overlay_manager *managers[MAX_MANAGERS];
};
/* buffer for one video frame */ struct omap_vout_buffer { /* common v4l buffer stuff -- must be first */ struct vb2_v4l2_buffer vbuf; struct list_head queue;
};
/* * Return true if rotation is 90 or 270
*/ staticinlineint is_rotation_90_or_270(conststruct omap_vout_device *vout)
{ return (vout->rotation == dss_rotation_90_degree ||
vout->rotation == dss_rotation_270_degree);
}
/* * Return true if rotation is enabled
*/ staticinlineint is_rotation_enabled(conststruct omap_vout_device *vout)
{ return vout->rotation || vout->mirror;
}
/* * Reverse the rotation degree if mirroring is enabled
*/ staticinlineint calc_rotation(conststruct omap_vout_device *vout)
{ if (!vout->mirror) return vout->rotation;
switch (vout->rotation) { case dss_rotation_90_degree: return dss_rotation_270_degree; case dss_rotation_270_degree: return dss_rotation_90_degree; case dss_rotation_180_degree: return dss_rotation_0_degree; default: return dss_rotation_180_degree;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.