Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
ipu-common.c File Reference
#include <linux/module.h>
#include <linux/export.h>
#include <linux/types.h>
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/err.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/clk.h>
#include <linux/list.h>
#include <linux/irq.h>
#include <linux/of_device.h>
#include <asm/mach/irq.h>
#include "imx-ipu-v3.h"
#include "ipu-prv.h"

Go to the source code of this file.

Data Structures

struct  ipu_devtype
 
struct  ipu_platform_reg
 

Macros

#define Y_OFFSET(pix, x, y)   ((x) + pix->width * (y))
 
#define U_OFFSET(pix, x, y)
 
#define V_OFFSET(pix, x, y)
 
#define idma_mask(ch)   (1 << (ch & 0x1f))
 

Functions

void ipu_srm_dp_sync_update (struct ipu_soc *ipu)
 
 EXPORT_SYMBOL_GPL (ipu_srm_dp_sync_update)
 
struct ipu_ch_param __iomemipu_get_cpmem (struct ipuv3_channel *channel)
 
 EXPORT_SYMBOL_GPL (ipu_get_cpmem)
 
void ipu_cpmem_set_high_priority (struct ipuv3_channel *channel)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_high_priority)
 
void ipu_ch_param_write_field (struct ipu_ch_param __iomem *base, u32 wbs, u32 v)
 
 EXPORT_SYMBOL_GPL (ipu_ch_param_write_field)
 
u32 ipu_ch_param_read_field (struct ipu_ch_param __iomem *base, u32 wbs)
 
 EXPORT_SYMBOL_GPL (ipu_ch_param_read_field)
 
int ipu_cpmem_set_format_rgb (struct ipu_ch_param __iomem *p, struct ipu_rgb *rgb)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_format_rgb)
 
int ipu_cpmem_set_format_passthrough (struct ipu_ch_param __iomem *p, int width)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_format_passthrough)
 
void ipu_cpmem_set_yuv_planar_full (struct ipu_ch_param __iomem *p, u32 pixel_format, int stride, int u_offset, int v_offset)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_yuv_planar_full)
 
void ipu_cpmem_set_yuv_planar (struct ipu_ch_param __iomem *p, u32 pixel_format, int stride, int height)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_yuv_planar)
 
int ipu_cpmem_set_fmt (struct ipu_ch_param __iomem *cpmem, u32 pixelformat)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_fmt)
 
int ipu_cpmem_set_image (struct ipu_ch_param __iomem *cpmem, struct ipu_image *image)
 
 EXPORT_SYMBOL_GPL (ipu_cpmem_set_image)
 
enum ipu_color_space ipu_pixelformat_to_colorspace (u32 pixelformat)
 
 EXPORT_SYMBOL_GPL (ipu_pixelformat_to_colorspace)
 
struct ipuv3_channelipu_idmac_get (struct ipu_soc *ipu, unsigned num)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_get)
 
void ipu_idmac_put (struct ipuv3_channel *channel)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_put)
 
void ipu_idmac_set_double_buffer (struct ipuv3_channel *channel, bool doublebuffer)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_set_double_buffer)
 
int ipu_module_enable (struct ipu_soc *ipu, u32 mask)
 
 EXPORT_SYMBOL_GPL (ipu_module_enable)
 
int ipu_module_disable (struct ipu_soc *ipu, u32 mask)
 
 EXPORT_SYMBOL_GPL (ipu_module_disable)
 
void ipu_idmac_select_buffer (struct ipuv3_channel *channel, u32 buf_num)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_select_buffer)
 
int ipu_idmac_enable_channel (struct ipuv3_channel *channel)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_enable_channel)
 
int ipu_idmac_disable_channel (struct ipuv3_channel *channel)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_disable_channel)
 
 MODULE_DEVICE_TABLE (of, imx_ipu_dt_ids)
 
int ipu_idmac_channel_irq (struct ipu_soc *ipu, struct ipuv3_channel *channel, enum ipu_channel_irq irq_type)
 
 EXPORT_SYMBOL_GPL (ipu_idmac_channel_irq)
 
 module_platform_driver (imx_ipu_driver)
 
 MODULE_DESCRIPTION ("i.MX IPU v3 driver")
 
 MODULE_AUTHOR ("Sascha Hauer <[email protected]>")
 
 MODULE_LICENSE ("GPL")
 

Macro Definition Documentation

#define idma_mask (   ch)    (1 << (ch & 0x1f))

Definition at line 473 of file ipu-common.c.

#define U_OFFSET (   pix,
  x,
  y 
)
Value:
((pix->width * pix->height) + \
(pix->width * (y) / 4) + (x) / 2)

Definition at line 300 of file ipu-common.c.

#define V_OFFSET (   pix,
  x,
  y 
)
Value:
((pix->width * pix->height) + \
(pix->width * pix->height / 4) + \
(pix->width * (y) / 4) + (x) / 2)

Definition at line 302 of file ipu-common.c.

#define Y_OFFSET (   pix,
  x,
  y 
)    ((x) + pix->width * (y))

Definition at line 299 of file ipu-common.c.

Function Documentation

EXPORT_SYMBOL_GPL ( ipu_srm_dp_sync_update  )
EXPORT_SYMBOL_GPL ( ipu_get_cpmem  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_high_priority  )
EXPORT_SYMBOL_GPL ( ipu_ch_param_write_field  )
EXPORT_SYMBOL_GPL ( ipu_ch_param_read_field  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_format_rgb  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_format_passthrough  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_yuv_planar_full  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_yuv_planar  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_fmt  )
EXPORT_SYMBOL_GPL ( ipu_cpmem_set_image  )
EXPORT_SYMBOL_GPL ( ipu_pixelformat_to_colorspace  )
EXPORT_SYMBOL_GPL ( ipu_idmac_get  )
EXPORT_SYMBOL_GPL ( ipu_idmac_put  )
EXPORT_SYMBOL_GPL ( ipu_idmac_set_double_buffer  )
EXPORT_SYMBOL_GPL ( ipu_module_enable  )
EXPORT_SYMBOL_GPL ( ipu_module_disable  )
EXPORT_SYMBOL_GPL ( ipu_idmac_select_buffer  )
EXPORT_SYMBOL_GPL ( ipu_idmac_enable_channel  )
EXPORT_SYMBOL_GPL ( ipu_idmac_disable_channel  )
EXPORT_SYMBOL_GPL ( ipu_idmac_channel_irq  )
u32 ipu_ch_param_read_field ( struct ipu_ch_param __iomem base,
u32  wbs 
)

Definition at line 114 of file ipu-common.c.

void ipu_ch_param_write_field ( struct ipu_ch_param __iomem base,
u32  wbs,
u32  v 
)

Definition at line 88 of file ipu-common.c.

int ipu_cpmem_set_fmt ( struct ipu_ch_param __iomem cpmem,
u32  pixelformat 
)

Definition at line 306 of file ipu-common.c.

int ipu_cpmem_set_format_passthrough ( struct ipu_ch_param __iomem p,
int  width 
)

Definition at line 194 of file ipu-common.c.

int ipu_cpmem_set_format_rgb ( struct ipu_ch_param __iomem p,
struct ipu_rgb rgb 
)

Definition at line 139 of file ipu-common.c.

void ipu_cpmem_set_high_priority ( struct ipuv3_channel channel)

Definition at line 73 of file ipu-common.c.

int ipu_cpmem_set_image ( struct ipu_ch_param __iomem cpmem,
struct ipu_image image 
)

Definition at line 354 of file ipu-common.c.

void ipu_cpmem_set_yuv_planar ( struct ipu_ch_param __iomem p,
u32  pixel_format,
int  stride,
int  height 
)

Definition at line 241 of file ipu-common.c.

void ipu_cpmem_set_yuv_planar_full ( struct ipu_ch_param __iomem p,
u32  pixel_format,
int  stride,
int  u_offset,
int  v_offset 
)

Definition at line 228 of file ipu-common.c.

struct ipu_ch_param __iomem* ipu_get_cpmem ( struct ipuv3_channel channel)
read

Definition at line 65 of file ipu-common.c.

int ipu_idmac_channel_irq ( struct ipu_soc ipu,
struct ipuv3_channel channel,
enum ipu_channel_irq  irq_type 
)

Definition at line 861 of file ipu-common.c.

int ipu_idmac_disable_channel ( struct ipuv3_channel channel)

Definition at line 583 of file ipu-common.c.

int ipu_idmac_enable_channel ( struct ipuv3_channel channel)

Definition at line 565 of file ipu-common.c.

struct ipuv3_channel* ipu_idmac_get ( struct ipu_soc ipu,
unsigned  num 
)
read

Definition at line 431 of file ipu-common.c.

void ipu_idmac_put ( struct ipuv3_channel channel)

Definition at line 459 of file ipu-common.c.

void ipu_idmac_select_buffer ( struct ipuv3_channel channel,
u32  buf_num 
)

Definition at line 547 of file ipu-common.c.

void ipu_idmac_set_double_buffer ( struct ipuv3_channel channel,
bool  doublebuffer 
)

Definition at line 475 of file ipu-common.c.

int ipu_module_disable ( struct ipu_soc ipu,
u32  mask 
)

Definition at line 521 of file ipu-common.c.

int ipu_module_enable ( struct ipu_soc ipu,
u32  mask 
)

Definition at line 495 of file ipu-common.c.

enum ipu_color_space ipu_pixelformat_to_colorspace ( u32  pixelformat)

Definition at line 412 of file ipu-common.c.

void ipu_srm_dp_sync_update ( struct ipu_soc ipu)

Definition at line 55 of file ipu-common.c.

MODULE_AUTHOR ( "Sascha Hauer <[email protected]>"  )
MODULE_DESCRIPTION ( "i.MX IPU v3 driver )
MODULE_DEVICE_TABLE ( of  ,
imx_ipu_dt_ids   
)
MODULE_LICENSE ( "GPL"  )
module_platform_driver ( imx_ipu_driver  )