Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
fsl-diu-fb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/fb.h>
#include <linux/init.h>
#include <linux/dma-mapping.h>
#include <linux/platform_device.h>
#include <linux/interrupt.h>
#include <linux/clk.h>
#include <linux/uaccess.h>
#include <linux/vmalloc.h>
#include <linux/spinlock.h>
#include <sysdev/fsl_soc.h>
#include <linux/fsl-diu-fb.h>
#include "edid.h"

Go to the source code of this file.

Data Structures

struct  mfb_info
 
struct  fsl_diu_data
 

Macros

#define NUM_AOIS   5 /* 1 for plane 0, 2 for planes 1 & 2 each */
 
#define MAX_CURS   32
 
#define INT_VSYNC   0x01 /* Vsync interrupt */
 
#define INT_VSYNC_WB   0x02 /* Vsync interrupt for write back operation */
 
#define INT_UNDRUN   0x04 /* Under run exception interrupt */
 
#define INT_PARERR   0x08 /* Display parameters error interrupt */
 
#define INT_LS_BF_VS   0x10 /* Lines before vsync. interrupt */
 
#define DMA_ADDR(p, f)   ((p)->dma_addr + offsetof(struct fsl_diu_data, f))
 
#define PF_BYTE_F   0x10000000
 
#define PF_ALPHA_C_MASK   0x0E000000
 
#define PF_ALPHA_C_SHIFT   25
 
#define PF_BLUE_C_MASK   0x01800000
 
#define PF_BLUE_C_SHIFT   23
 
#define PF_GREEN_C_MASK   0x00600000
 
#define PF_GREEN_C_SHIFT   21
 
#define PF_RED_C_MASK   0x00180000
 
#define PF_RED_C_SHIFT   19
 
#define PF_PALETTE   0x00040000
 
#define PF_PIXEL_S_MASK   0x00030000
 
#define PF_PIXEL_S_SHIFT   16
 
#define PF_COMP_3_MASK   0x0000F000
 
#define PF_COMP_3_SHIFT   12
 
#define PF_COMP_2_MASK   0x00000F00
 
#define PF_COMP_2_SHIFT   8
 
#define PF_COMP_1_MASK   0x000000F0
 
#define PF_COMP_1_SHIFT   4
 
#define PF_COMP_0_MASK   0x0000000F
 
#define PF_COMP_0_SHIFT   0
 
#define MAKE_PF(alpha, red, blue, green, size, c0, c1, c2, c3)
 
#define fsl_diu_suspend   NULL
 
#define fsl_diu_resume   NULL
 

Enumerations

enum  mfb_index {
  PLANE0 = 0, PLANE1_AOI0, PLANE1_AOI1, PLANE2_AOI0,
  PLANE2_AOI1
}
 

Functions

struct fsl_diu_data __aligned (32)
 
struct diu_ad dummy_ad __aligned (8)
 
void wr_reg_wa (u32 *reg, u32 val)
 
 MODULE_DEVICE_TABLE (of, fsl_diu_match)
 
 module_init (fsl_diu_init)
 
 module_exit (fsl_diu_exit)
 
 MODULE_AUTHOR ("York Sun <[email protected]>")
 
 MODULE_DESCRIPTION ("Freescale DIU framebuffer driver")
 
 MODULE_LICENSE ("GPL")
 
 module_param_named (mode, fb_mode, charp, 0)
 
 MODULE_PARM_DESC (mode,"Specify resolution as \"<xres>x<yres>[-<bpp>][@<refresh>]\" ")
 
 module_param_named (bpp, default_bpp, ulong, 0)
 
 MODULE_PARM_DESC (bpp,"Specify bit-per-pixel if not specified in 'mode'")
 
 module_param_named (monitor, monitor_string, charp, 0)
 
 MODULE_PARM_DESC (monitor,"Specify the monitor port ""(\"dvi\", \"lvds\", or \"dlvds\") if supported by the platform")
 

Variables

dma_addr_t dma_addr
 
struct fb_info fsl_diu_info [NUM_AOIS]
 
struct mfb_info mfb [NUM_AOIS]
 
struct device_attribute dev_attr
 
unsigned int irq
 
struct diu __iomemdiu_reg
 
spinlock_t reg_lock
 
u8 dummy_aoi [4 *4 *4]
 

Macro Definition Documentation

#define DMA_ADDR (   p,
  f 
)    ((p)->dma_addr + offsetof(struct fsl_diu_data, f))

Definition at line 384 of file fsl-diu-fb.c.

#define fsl_diu_resume   NULL

Definition at line 1451 of file fsl-diu-fb.c.

#define fsl_diu_suspend   NULL

Definition at line 1450 of file fsl-diu-fb.c.

#define INT_LS_BF_VS   0x10 /* Lines before vsync. interrupt */

Definition at line 49 of file fsl-diu-fb.c.

#define INT_PARERR   0x08 /* Display parameters error interrupt */

Definition at line 48 of file fsl-diu-fb.c.

#define INT_UNDRUN   0x04 /* Under run exception interrupt */

Definition at line 47 of file fsl-diu-fb.c.

#define INT_VSYNC   0x01 /* Vsync interrupt */

Definition at line 45 of file fsl-diu-fb.c.

#define INT_VSYNC_WB   0x02 /* Vsync interrupt for write back operation */

Definition at line 46 of file fsl-diu-fb.c.

#define MAKE_PF (   alpha,
  red,
  blue,
  green,
  size,
  c0,
  c1,
  c2,
  c3 
)
Value:
cpu_to_le32(PF_BYTE_F | (alpha << PF_ALPHA_C_SHIFT) | \
(blue << PF_BLUE_C_SHIFT) | (green << PF_GREEN_C_SHIFT) | \
(red << PF_RED_C_SHIFT) | (c3 << PF_COMP_3_SHIFT) | \
(c2 << PF_COMP_2_SHIFT) | (c1 << PF_COMP_1_SHIFT) | \
(c0 << PF_COMP_0_SHIFT) | (size << PF_PIXEL_S_SHIFT))
#define MAX_CURS   32

Definition at line 42 of file fsl-diu-fb.c.

#define NUM_AOIS   5 /* 1 for plane 0, 2 for planes 1 & 2 each */

Definition at line 39 of file fsl-diu-fb.c.

#define PF_ALPHA_C_MASK   0x0E000000
#define PF_ALPHA_C_SHIFT   25
#define PF_BLUE_C_MASK   0x01800000
#define PF_BLUE_C_SHIFT   23
#define PF_BYTE_F   0x10000000
#define PF_COMP_0_MASK   0x0000000F
#define PF_COMP_0_SHIFT   0
#define PF_COMP_1_MASK   0x000000F0
#define PF_COMP_1_SHIFT   4
#define PF_COMP_2_MASK   0x00000F00
#define PF_COMP_2_SHIFT   8
#define PF_COMP_3_MASK   0x0000F000
#define PF_COMP_3_SHIFT   12
#define PF_GREEN_C_MASK   0x00600000
#define PF_GREEN_C_SHIFT   21
#define PF_PALETTE   0x00040000
#define PF_PIXEL_S_MASK   0x00030000
#define PF_PIXEL_S_SHIFT   16
#define PF_RED_C_MASK   0x00180000
#define PF_RED_C_SHIFT   19

Enumeration Type Documentation

enum mfb_index
Enumerator:
PLANE0 
PLANE1_AOI0 
PLANE1_AOI1 
PLANE2_AOI0 
PLANE2_AOI1 

Definition at line 326 of file fsl-diu-fb.c.

Function Documentation

struct fsl_diu_data __aligned ( 32  )
struct diu_ad dummy_ad __aligned::__aligned ( )
read
MODULE_AUTHOR ( "York Sun <[email protected]>"  )
MODULE_DESCRIPTION ( "Freescale DIU framebuffer driver )
MODULE_DEVICE_TABLE ( of  ,
fsl_diu_match   
)
module_exit ( fsl_diu_exit  )
module_init ( fsl_diu_init  )
MODULE_LICENSE ( "GPL"  )
module_param_named ( mode  ,
fb_mode  ,
charp  ,
 
)
module_param_named ( bpp  ,
default_bpp  ,
ulong  ,
 
)
module_param_named ( monitor  ,
monitor_string  ,
charp  ,
 
)
MODULE_PARM_DESC ( mode  ,
"Specify resolution as \"<xres>x<yres>\" "  [-< bpp >][@< refresh >] 
)
MODULE_PARM_DESC ( bpp  ,
"Specify bit-per-pixel if not specified in 'mode'"   
)
MODULE_PARM_DESC ( monitor  ,
"Specify the monitor port ""(\"dvi\", \"lvds\", or \"dlvds\") if supported by the platform"   
)
void wr_reg_wa ( u32 reg,
u32  val 
)

Definition at line 468 of file fsl-diu-fb.c.

Variable Documentation

Definition at line 385 of file fsl-diu-fb.c.

struct diu __iomem* diu_reg

Definition at line 388 of file fsl-diu-fb.c.

dma_addr_t dma_addr

Definition at line 382 of file fsl-diu-fb.c.

u8 dummy_aoi[4 *4 *4]

Definition at line 390 of file fsl-diu-fb.c.

struct fb_info fsl_diu_info[NUM_AOIS]

Definition at line 383 of file fsl-diu-fb.c.

unsigned int irq

Definition at line 386 of file fsl-diu-fb.c.

Definition at line 384 of file fsl-diu-fb.c.

spinlock_t reg_lock

Definition at line 389 of file fsl-diu-fb.c.