video: mb862xxfb: add support for L1 displaying
PATCH v2 5/5 video: mb862xxfb: add support for L1 displaying
Allow displaying L1 video data on top of the primary L0 layer. The L1 layer position and dimensions can be configured and the layer enabled/disabled by using the appropriate L1 controls added by this patch.
Signed-off-by Anatolij Gustschin <[email protected]>
---
v2:
- rebase to apply cleanly on top of previous 4/5 patch
drivers/video/mb862xx/mb862xx_reg.h | 31 +++++++++ drivers/video/mb862xx/mb862xxfb.h | 27 ++++++++ drivers/video/mb862xx/mb862xxfbdrv.c | 116 +++++++++++++++++++++++++++++++++- 3 files changed, 173 insertions(+), 1 deletions(-)
drivers/video/mb862xx/mb862xx_reg.h +31 -0
@@ -51,10 +51,16 @@#define GC_L0OA0 0x00000024#define GC_L0DA0 0x00000028#define GC_L0DY_L0DX 0x0000002c +#define GC_L1M 0x00000030 +#define GC_L1DA 0x00000034#define GC_DCM1 0x00000100#define GC_L0EM 0x00000110#define GC_L0WY_L0WX 0x00000114#define GC_L0WH_L0WW 0x00000118 +#define GC_L1EM 0x00000120 +#define GC_L1WY_L1WX 0x00000124 +#define GC_L1WH_L1WW 0x00000128 +#define GC_DLS 0x00000180#define GC_DCM2 0x00000104#define GC_DCM3 0x00000108#define GC_CPM_CUTC 0x000000a0
@@ -66,6 +72,11 @@#define GC_CPM_CEN0 0x00100000#define GC_CPM_CEN1 0x00200000 +#define GC_DCM1_DEN 0x80000000 +#define GC_DCM1_L1E 0x00020000 +#define GC_L1M_16 0x80000000 +#define GC_L1M_YC 0x40000000 +#define GC_L1M_CS 0x20000000#define GC_DCM01_ESY 0x00000004#define GC_DCM01_SC 0x00003f00
@@ -77,6 +88,7 @@#define GC_L0M_L0C_16 0x80000000#define GC_L0EM_L0EC_24 0x40000000#define GC_L0M_L0W_UNIT 64 +#define GC_L1EM_DM 0x02000000#define GC_DISP_REFCLK_400 400
@@ -101,6 +113,25 @@#define I2C_TRX 0x80#define I2C_LRB 0x10 +/* Capture registers and bits */ +#define GC_CAP_VCM 0x00000000 +#define GC_CAP_CSC 0x00000004 +#define GC_CAP_VCS 0x00000008 +#define GC_CAP_CBM 0x00000010 +#define GC_CAP_CBOA 0x00000014 +#define GC_CAP_CBLA 0x00000018 +#define GC_CAP_IMG_START 0x0000001C +#define GC_CAP_IMG_END 0x00000020 +#define GC_CAP_CMSS 0x00000048 +#define GC_CAP_CMDS 0x0000004C + +#define GC_VCM_VIE 0x80000000 +#define GC_VCM_CM 0x03000000 +#define GC_VCM_VS_PAL 0x00000002 +#define GC_CBM_OO 0x80000000 +#define GC_CBM_HRV 0x00000010 +#define GC_CBM_CBST 0x00000001 +/* Carmine specific */ #define MB86297_DRAW_BASE 0x00020000#define MB86297_DISP0_BASE 0x00100000
drivers/video/mb862xx/mb862xxfb.h +27 -0
@@ -1,6 +1,26 @@#ifndef __MB862XX_H__#define __MB862XX_H__ +struct mb862xx_l1_cfg { +unsigned short sx; +unsigned short sy; +unsigned short sw; +unsigned short sh; +unsigned short dx; +unsigned short dy; +unsigned short dw; +unsigned short dh; +int mirror; +}; + +#define MB862XX_BASE 'M' +#define MB862XX_L1_GET_CFG _IOR(MB862XX_BASE, 0, struct mb862xx_l1_cfg*) +#define MB862XX_L1_SET_CFG _IOW(MB862XX_BASE, 1, struct mb862xx_l1_cfg*) +#define MB862XX_L1_ENABLE _IOW(MB862XX_BASE, 2, int) +#define MB862XX_L1_CAP_CTL _IOW(MB862XX_BASE, 3, int) + +#ifdef __KERNEL__ +#define PCI_VENDOR_ID_FUJITSU_LIMITED 0x10cf#define PCI_DEVICE_ID_FUJITSU_CORALP 0x2019#define PCI_DEVICE_ID_FUJITSU_CORALPA 0x201e
@@ -38,6 +58,8 @@ struct mb862xxfb_par {void __iomem *mmio_base;/* remapped registers */ size_t mapped_vram;/* length of remapped vram */ size_t mmio_len;/* length of register region */ +unsigned long cap_buf;/* capture buffers offset */ +size_t cap_len;/* length of capture buffers */ void __iomem *host;/* relocatable reg. bases */ void __iomem *i2c;
@@ -60,6 +82,9 @@ struct mb862xxfb_par {struct i2c_adapter *adap;/* GDC I2C bus adapter */ int i2c_rs; +struct mb862xx_l1_cfg l1_cfg; +int l1_stride; +u32 pseudo_palette[16 ]; };
@@ -91,4 +116,6 @@ static inline void mb862xx_i2c_exit(struct mb862xxfb_par *par) { }#define pack (a, b) (((a) << 16) | (b)) +#endif /* __KERNEL__ */ +#endif
drivers/video/mb862xx/mb862xxfbdrv.c +115 -1
146 lines not on this page · raw message
Signature · 1 line
1.7.1