/* Delay introduced by the HDMI in nb of pixel */ #define HDMI_DELAY (5)
/* Delay introduced by the DVO in nb of pixel */ #define DVO_DELAY (7)
/* delay introduced by the Arbitrary Waveform Generator in nb of pixels */ #define AWG_DELAY_HD (-9) #define AWG_DELAY_ED (-8) #define AWG_DELAY_SD (-7)
/* * STI VTG register offset structure * *@h_hd: stores the VTG_H_HD_x register offset *@top_v_vd: stores the VTG_TOP_V_VD_x register offset *@bot_v_vd: stores the VTG_BOT_V_VD_x register offset *@top_v_hd: stores the VTG_TOP_V_HD_x register offset *@bot_v_hd: stores the VTG_BOT_V_HD_x register offset
*/ struct sti_vtg_regs_offs {
u32 h_hd;
u32 top_v_vd;
u32 bot_v_vd;
u32 top_v_hd;
u32 bot_v_hd;
};
/* * STI VTG synchronisation parameters structure * *@hsync: sample number falling and rising edge *@vsync_line_top: vertical top field line number falling and rising edge *@vsync_line_bot: vertical bottom field line number falling and rising edge *@vsync_off_top: vertical top field sample number rising and falling edge *@vsync_off_bot: vertical bottom field sample number rising and falling edge
*/ struct sti_vtg_sync_params {
u32 hsync;
u32 vsync_line_top;
u32 vsync_line_bot;
u32 vsync_off_top;
u32 vsync_off_bot;
};
/* * STI VTG structure * * @regs: register mapping * @sync_params: synchronisation parameters used to generate timings * @irq: VTG irq * @irq_status: store the IRQ status value * @notifier_list: notifier callback * @crtc: the CRTC for vblank event
*/ struct sti_vtg { void __iomem *regs; struct sti_vtg_sync_params sync_params[VTG_MAX_SYNC_OUTPUT]; int irq;
u32 irq_status; struct raw_notifier_head notifier_list; struct drm_crtc *crtc;
};
/** * sti_vtg_get_line_number * * @mode: display mode to be used * @y: line * * Return the line number according to the display mode taking * into account the Sync and Back Porch information. * Video frame line numbers start at 1, y starts at 0. * In interlaced modes the start line is the field line number of the odd * field, but y is still defined as a progressive frame.
*/
u32 sti_vtg_get_line_number(struct drm_display_mode mode, int y)
{
u32 start_line = mode.vtotal - mode.vsync_start + 1;
if (mode.flags & DRM_MODE_FLAG_INTERLACE)
start_line *= 2;
return start_line + y;
}
/** * sti_vtg_get_pixel_number * * @mode: display mode to be used * @x: row * * Return the pixel number according to the display mode taking * into account the Sync and Back Porch information. * Pixels are counted from 0.
*/
u32 sti_vtg_get_pixel_number(struct drm_display_mode mode, int x)
{ return mode.htotal - mode.hsync_start + x;
}
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.