Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
venc.c File Reference
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/mutex.h>
#include <linux/completion.h>
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/seq_file.h>
#include <linux/platform_device.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
#include <video/omapdss.h>
#include "dss.h"
#include "dss_features.h"

Go to the source code of this file.

Data Structures

struct  venc_config
 

Macros

#define DSS_SUBSYS_NAME   "VENC"
 
#define VENC_REV_ID   0x00
 
#define VENC_STATUS   0x04
 
#define VENC_F_CONTROL   0x08
 
#define VENC_VIDOUT_CTRL   0x10
 
#define VENC_SYNC_CTRL   0x14
 
#define VENC_LLEN   0x1C
 
#define VENC_FLENS   0x20
 
#define VENC_HFLTR_CTRL   0x24
 
#define VENC_CC_CARR_WSS_CARR   0x28
 
#define VENC_C_PHASE   0x2C
 
#define VENC_GAIN_U   0x30
 
#define VENC_GAIN_V   0x34
 
#define VENC_GAIN_Y   0x38
 
#define VENC_BLACK_LEVEL   0x3C
 
#define VENC_BLANK_LEVEL   0x40
 
#define VENC_X_COLOR   0x44
 
#define VENC_M_CONTROL   0x48
 
#define VENC_BSTAMP_WSS_DATA   0x4C
 
#define VENC_S_CARR   0x50
 
#define VENC_LINE21   0x54
 
#define VENC_LN_SEL   0x58
 
#define VENC_L21__WC_CTL   0x5C
 
#define VENC_HTRIGGER_VTRIGGER   0x60
 
#define VENC_SAVID__EAVID   0x64
 
#define VENC_FLEN__FAL   0x68
 
#define VENC_LAL__PHASE_RESET   0x6C
 
#define VENC_HS_INT_START_STOP_X   0x70
 
#define VENC_HS_EXT_START_STOP_X   0x74
 
#define VENC_VS_INT_START_X   0x78
 
#define VENC_VS_INT_STOP_X__VS_INT_START_Y   0x7C
 
#define VENC_VS_INT_STOP_Y__VS_EXT_START_X   0x80
 
#define VENC_VS_EXT_STOP_X__VS_EXT_START_Y   0x84
 
#define VENC_VS_EXT_STOP_Y   0x88
 
#define VENC_AVID_START_STOP_X   0x90
 
#define VENC_AVID_START_STOP_Y   0x94
 
#define VENC_FID_INT_START_X__FID_INT_START_Y   0xA0
 
#define VENC_FID_INT_OFFSET_Y__FID_EXT_START_X   0xA4
 
#define VENC_FID_EXT_START_Y__FID_EXT_OFFSET_Y   0xA8
 
#define VENC_TVDETGP_INT_START_STOP_X   0xB0
 
#define VENC_TVDETGP_INT_START_STOP_Y   0xB4
 
#define VENC_GEN_CTRL   0xB8
 
#define VENC_OUTPUT_CONTROL   0xC4
 
#define VENC_OUTPUT_TEST   0xC8
 
#define VENC_DAC_B__DAC_C   0xC8
 
#define DUMPREG(r)   seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
 

Functions

 EXPORT_SYMBOL (omap_dss_pal_timings)
 
 EXPORT_SYMBOL (omap_dss_ntsc_timings)
 
unsigned long venc_get_pixel_clock (void)
 
int omapdss_venc_display_enable (struct omap_dss_device *dssdev)
 
void omapdss_venc_display_disable (struct omap_dss_device *dssdev)
 
void omapdss_venc_set_timings (struct omap_dss_device *dssdev, struct omap_video_timings *timings)
 
int omapdss_venc_check_timings (struct omap_dss_device *dssdev, struct omap_video_timings *timings)
 
u32 omapdss_venc_get_wss (struct omap_dss_device *dssdev)
 
int omapdss_venc_set_wss (struct omap_dss_device *dssdev, u32 wss)
 
void omapdss_venc_set_type (struct omap_dss_device *dssdev, enum omap_dss_venc_type type)
 
void omapdss_venc_invert_vid_out_polarity (struct omap_dss_device *dssdev, bool invert_polarity)
 
int __init venc_init_platform_driver (void)
 
void __exit venc_uninit_platform_driver (void)
 

Variables

struct omap_video_timings omap_dss_pal_timings
 
struct omap_video_timings omap_dss_ntsc_timings
 

Macro Definition Documentation

#define DSS_SUBSYS_NAME   "VENC"

Definition at line 22 of file venc.c.

#define DUMPREG (   r)    seq_printf(s, "%-35s %08x\n", #r, venc_read_reg(r))
#define VENC_AVID_START_STOP_X   0x90

Definition at line 77 of file venc.c.

#define VENC_AVID_START_STOP_Y   0x94

Definition at line 78 of file venc.c.

#define VENC_BLACK_LEVEL   0x3C

Definition at line 57 of file venc.c.

#define VENC_BLANK_LEVEL   0x40

Definition at line 58 of file venc.c.

#define VENC_BSTAMP_WSS_DATA   0x4C

Definition at line 61 of file venc.c.

#define VENC_C_PHASE   0x2C

Definition at line 53 of file venc.c.

#define VENC_CC_CARR_WSS_CARR   0x28

Definition at line 52 of file venc.c.

#define VENC_DAC_B__DAC_C   0xC8

Definition at line 87 of file venc.c.

#define VENC_F_CONTROL   0x08

Definition at line 46 of file venc.c.

#define VENC_FID_EXT_START_Y__FID_EXT_OFFSET_Y   0xA8

Definition at line 81 of file venc.c.

#define VENC_FID_INT_OFFSET_Y__FID_EXT_START_X   0xA4

Definition at line 80 of file venc.c.

#define VENC_FID_INT_START_X__FID_INT_START_Y   0xA0

Definition at line 79 of file venc.c.

#define VENC_FLEN__FAL   0x68

Definition at line 68 of file venc.c.

#define VENC_FLENS   0x20

Definition at line 50 of file venc.c.

#define VENC_GAIN_U   0x30

Definition at line 54 of file venc.c.

#define VENC_GAIN_V   0x34

Definition at line 55 of file venc.c.

#define VENC_GAIN_Y   0x38

Definition at line 56 of file venc.c.

#define VENC_GEN_CTRL   0xB8

Definition at line 84 of file venc.c.

#define VENC_HFLTR_CTRL   0x24

Definition at line 51 of file venc.c.

#define VENC_HS_EXT_START_STOP_X   0x74

Definition at line 71 of file venc.c.

#define VENC_HS_INT_START_STOP_X   0x70

Definition at line 70 of file venc.c.

#define VENC_HTRIGGER_VTRIGGER   0x60

Definition at line 66 of file venc.c.

#define VENC_L21__WC_CTL   0x5C

Definition at line 65 of file venc.c.

#define VENC_LAL__PHASE_RESET   0x6C

Definition at line 69 of file venc.c.

#define VENC_LINE21   0x54

Definition at line 63 of file venc.c.

#define VENC_LLEN   0x1C

Definition at line 49 of file venc.c.

#define VENC_LN_SEL   0x58

Definition at line 64 of file venc.c.

#define VENC_M_CONTROL   0x48

Definition at line 60 of file venc.c.

#define VENC_OUTPUT_CONTROL   0xC4

Definition at line 85 of file venc.c.

#define VENC_OUTPUT_TEST   0xC8

Definition at line 86 of file venc.c.

#define VENC_REV_ID   0x00

Definition at line 44 of file venc.c.

#define VENC_S_CARR   0x50

Definition at line 62 of file venc.c.

#define VENC_SAVID__EAVID   0x64

Definition at line 67 of file venc.c.

#define VENC_STATUS   0x04

Definition at line 45 of file venc.c.

#define VENC_SYNC_CTRL   0x14

Definition at line 48 of file venc.c.

#define VENC_TVDETGP_INT_START_STOP_X   0xB0

Definition at line 82 of file venc.c.

#define VENC_TVDETGP_INT_START_STOP_Y   0xB4

Definition at line 83 of file venc.c.

#define VENC_VIDOUT_CTRL   0x10

Definition at line 47 of file venc.c.

#define VENC_VS_EXT_STOP_X__VS_EXT_START_Y   0x84

Definition at line 75 of file venc.c.

#define VENC_VS_EXT_STOP_Y   0x88

Definition at line 76 of file venc.c.

#define VENC_VS_INT_START_X   0x78

Definition at line 72 of file venc.c.

#define VENC_VS_INT_STOP_X__VS_INT_START_Y   0x7C

Definition at line 73 of file venc.c.

#define VENC_VS_INT_STOP_Y__VS_EXT_START_X   0x80

Definition at line 74 of file venc.c.

#define VENC_X_COLOR   0x44

Definition at line 59 of file venc.c.

Function Documentation

EXPORT_SYMBOL ( omap_dss_pal_timings  )
EXPORT_SYMBOL ( omap_dss_ntsc_timings  )
int omapdss_venc_check_timings ( struct omap_dss_device dssdev,
struct omap_video_timings timings 
)

Definition at line 576 of file venc.c.

void omapdss_venc_display_disable ( struct omap_dss_device dssdev)

Definition at line 544 of file venc.c.

int omapdss_venc_display_enable ( struct omap_dss_device dssdev)

Definition at line 501 of file venc.c.

u32 omapdss_venc_get_wss ( struct omap_dss_device dssdev)

Definition at line 590 of file venc.c.

void omapdss_venc_invert_vid_out_polarity ( struct omap_dss_device dssdev,
bool  invert_polarity 
)

Definition at line 635 of file venc.c.

void omapdss_venc_set_timings ( struct omap_dss_device dssdev,
struct omap_video_timings timings 
)

Definition at line 560 of file venc.c.

void omapdss_venc_set_type ( struct omap_dss_device dssdev,
enum omap_dss_venc_type  type 
)

Definition at line 625 of file venc.c.

int omapdss_venc_set_wss ( struct omap_dss_device dssdev,
u32  wss 
)

Definition at line 596 of file venc.c.

unsigned long venc_get_pixel_clock ( void  )

Definition at line 495 of file venc.c.

int __init venc_init_platform_driver ( void  )

Definition at line 941 of file venc.c.

void __exit venc_uninit_platform_driver ( void  )

Definition at line 946 of file venc.c.

Variable Documentation

void __iomem* base

Definition at line 296 of file venc.c.

bool invert_polarity

Definition at line 305 of file venc.c.

struct omap_video_timings omap_dss_ntsc_timings
Initial value:
= {
.x_res = 720,
.y_res = 482,
.pixel_clock = 13500,
.hsw = 64,
.hfp = 16,
.hbp = 58,
.vsw = 6,
.vfp = 6,
.vbp = 31,
.interlace = true,
}

Definition at line 279 of file venc.c.

struct omap_video_timings omap_dss_pal_timings
Initial value:
= {
.x_res = 720,
.y_res = 574,
.pixel_clock = 13500,
.hsw = 64,
.hfp = 12,
.hbp = 68,
.vsw = 5,
.vfp = 5,
.vbp = 41,
.interlace = true,
}

Definition at line 264 of file venc.c.

Definition at line 307 of file venc.c.

Definition at line 295 of file venc.c.

Definition at line 303 of file venc.c.

struct clk* tv_dac_clk

Definition at line 301 of file venc.c.

Definition at line 304 of file venc.c.

struct regulator* vdda_dac_reg

Definition at line 299 of file venc.c.

struct mutex venc_lock

Definition at line 297 of file venc.c.

u32 wss_data

Definition at line 298 of file venc.c.