+++ /dev/null
-choice
- depends on FB_RK29
- prompt "LCD Panel Select for rk2918 platform"
-
-config LCD_RK29_NULL
- bool "NULL"
-config LCD_RK29_LG_LP097X02
- bool "RGB LCD_LG_LP097X02 1024X768"
-
-config LCD_RK29_HSD100PXN
- bool "RGB Hannstar HSD100PXN(1024X768)"
-
-config LCD_RK29_LS035Y8DX02A
- bool "RGB LS035Y8DX02A(480X800)"
-
-config LCD_RK29_LS035Y8DX04A
- bool "RGB LS035Y8DX04A(480X800)"
-
-config LCD_RK29_NT35510
- bool "RGB lcd_nt35510"
-
-config DEFAULT_OUT_HDMI
- bool "HDMI for default panel"
- depends on HDMI
- ---help---
- if you want set HDMI for default panel, android UI size is HDMI default resolution.
-
-config LCD_RK29_A050VL01
- bool "RGB A050VL01"
-
-endchoice
-
-
+++ /dev/null
-obj-$(CONFIG_LCD_RK29_NULL) += lcd_null.o
-
-obj-$(CONFIG_LCD_RK29_LG_LP097X02)+= lcd_LG_LP097X02.o
-
-obj-$(CONFIG_LCD_RK29_LS035Y8DX02A) += lcd_ls035y8dx02a.o
-obj-$(CONFIG_LCD_RK29_LS035Y8DX04A) += lcd_ls035y8dx04a.o
-obj-$(CONFIG_LCD_RK29_HSD100PXN) += lcd_hsd100pxn.o
-obj-$(CONFIG_LCD_RK29_NT35510) += lcd_nt35510.o
-obj-$(CONFIG_LCD_RK29_A050VL01) += lcd_A050VL01.o
-
-
-
+++ /dev/null
-/* This Lcd Driver is HSD070IDW1 write by cst 2009.10.27 */
-#include <linux/fb.h>
-#include <linux/delay.h>
-#include "../../rk29_fb.h"
-#include <mach/gpio.h>
-#include <mach/iomux.h>
-#include <mach/board.h>
-#include "screen.h"
-
-
-/* Base */
-#define OUT_TYPE SCREEN_RGB
-#define OUT_FACE OUT_P888
-#define OUT_CLK 23500000
-#define LCDC_ACLK 150000000 //29 lcdc axi DMA ƵÂÊ
-
-/* Timing */
-#define H_PW 2
-#define H_BP 2
-#define H_VD 480
-#define H_FP 2
-
-#define V_PW 2
-#define V_BP 2
-#define V_VD 800
-#define V_FP 2
-
-/* Other */
-#define DCLK_POL 1
-#define SWAP_RB 0
-
-#define LCD_WIDTH 480 //need modify
-#define LCD_HEIGHT 800
-
-#if 1
-#define RXD_PORT RK29_PIN2_PC7
-#define TXD_PORT gLcd_info->txd_pin
-#define CLK_PORT gLcd_info->clk_pin
-#define CS_PORT gLcd_info->cs_pin
-#define RESET_PORT RK29_PIN6_PC6
-
-#define CS_OUT() gpio_direction_output(CS_PORT, 1)
-#define CS_SET() gpio_set_value(CS_PORT, GPIO_HIGH)
-#define CS_CLR() gpio_set_value(CS_PORT, GPIO_LOW)
-#define CLK_OUT() gpio_direction_output(CLK_PORT, 0)
-#define CLK_SET() gpio_set_value(CLK_PORT, GPIO_HIGH)
-#define CLK_CLR() gpio_set_value(CLK_PORT, GPIO_LOW)
-#define TXD_OUT() gpio_direction_output(TXD_PORT, 1)
-#define TXD_SET() gpio_set_value(TXD_PORT, GPIO_HIGH)
-#define TXD_CLR() gpio_set_value(TXD_PORT, GPIO_LOW)
-#define RXD_IN() gpio_direction_input(RXD_PORT)
-#define RXD_GET() gpio_get_value(RXD_PORT)
-#endif
-
-static struct rk29lcd_info *gLcd_info = NULL;
-
-#define DRVDelayUs(i) udelay(i*4)
-
-int init(void);
-int standby(u8 enable);
-
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
-{
- /* screen type & face */
- screen->type = OUT_TYPE;
- screen->face = OUT_FACE;
-
- /* Screen size */
- screen->x_res = H_VD;
- screen->y_res = V_VD;
-
- screen->width = LCD_WIDTH;
- screen->height = LCD_HEIGHT;
-
- /* Timing */
- screen->lcdc_aclk = LCDC_ACLK;
- screen->pixclock = OUT_CLK;
- screen->left_margin = H_BP;
- screen->right_margin = H_FP;
- screen->hsync_len = H_PW;
- screen->upper_margin = V_BP;
- screen->lower_margin = V_FP;
- screen->vsync_len = V_PW;
-
- /* Pin polarity */
- screen->pin_hsync = 0;
- screen->pin_vsync = 0;
- screen->pin_den = 0;
- screen->pin_dclk = DCLK_POL;
-
- /* Swap rule */
- screen->swap_rb = SWAP_RB;
- screen->swap_rg = 0;
- screen->swap_gb = 0;
- screen->swap_delta = 0;
- screen->swap_dumy = 0;
-
- /* Operation function*/
- screen->init = init;
- /*screen->init = NULL;*/
- screen->standby = standby;
- if(lcd_info)
- gLcd_info = lcd_info;
-}
-//cannot need init,so set screen->init = null at rk29_fb.c file
-
-#if 1
-void spi_screenreg_command(u16 command)
-{
- u8 i,buff;
-
- TXD_OUT();
- CLK_OUT();
- CS_OUT();
- DRVDelayUs(2);
- DRVDelayUs(2);
-
- CS_SET();
- TXD_SET();
- CLK_SET();
- DRVDelayUs(2);
-
- buff = 0x20;
- CS_CLR();
- for(i = 0; i < 8; i++)
- {
- if(buff & (1<<(7-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
-
- for(i = 0; i < 8; i++) //reg hight
- {
- if(command &(1<<(15-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(2);
-
- buff = 0x00;
- CS_CLR();
- for(i = 0; i < 8; i++)
- {
- if(buff & (1<<(7-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
-
- for(i = 8; i < 16; i++) //reg low
- {
- if(command &(1<<(15-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(2);
-}
-void spi_screenreg_command_data(u16 Addr, u16 Data)
-{
- u8 i,buff;
-
- TXD_OUT();
- CLK_OUT();
- CS_OUT();
- DRVDelayUs(2);
- DRVDelayUs(2);
-
- CS_SET();
- TXD_SET();
- CLK_SET();
- DRVDelayUs(2);
-
- buff = 0x20;
- CS_CLR();
- for(i = 0; i < 8; i++)
- {
- if(buff & (1<<(7-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
-
- for(i = 0; i < 8; i++) //reg hight
- {
- if(Addr &(1<<(15-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(2);
-
- buff = 0x00;
- CS_CLR();
- for(i = 0; i < 8; i++)
- {
- if(buff & (1<<(7-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
-
- for(i = 8; i < 16; i++) //reg low
- {
- if(Addr &(1<<(15-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(2);
-
- buff = 0x40;
- CS_CLR();
- for(i = 0; i < 8; i++)
- {
- if(buff & (1<<(7-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
-
- for(i = 0; i < 8; i++) //data
- {
- if(Data &(1<<(7-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_CLR();
- DRVDelayUs(2);
- CLK_SET();
- DRVDelayUs(2);
- }
-
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(2);
-
-}
-
-int init(void)
-{
- if(gLcd_info)
- gLcd_info->io_init();
-
-#ifdef RESET_PORT
- gpio_request(RESET_PORT, NULL);
- gpio_direction_output(RESET_PORT, 0);
- mdelay(2);
- gpio_set_value(RESET_PORT, 1);
- mdelay(10);
- gpio_free(RESET_PORT);
-#endif
-
- spi_screenreg_command(0x1100);
- spi_screenreg_command_data(0xC000,0x8a);
- spi_screenreg_command_data(0xC002,0x8a);
- spi_screenreg_command_data(0xC200,0x02);
- spi_screenreg_command_data(0xC202,0x32);
- spi_screenreg_command_data(0xC100,0x40);
- spi_screenreg_command_data(0xC700,0x8b);
- mdelay(200);
- spi_screenreg_command(0x2900);
- spi_screenreg_command(0x2C00);
-
- if(gLcd_info)
- gLcd_info->io_deinit();
- return 0;
-}
-#endif
-
-extern void rk29_lcd_spim_spin_lock(void);
-extern void rk29_lcd_spim_spin_unlock(void);
-int standby(u8 enable)
-{
- rk29_lcd_spim_spin_lock();
- if(gLcd_info)
- gLcd_info->io_init();
- if(enable) {
-#ifdef RESET_PORT
- gpio_request(RESET_PORT, NULL);
- gpio_direction_output(RESET_PORT, 0);
- mdelay(2);
- gpio_set_value(RESET_PORT, 1);
- mdelay(10);
- gpio_free(RESET_PORT);
-#endif
- spi_screenreg_command(0x2800);
- spi_screenreg_command(0x1000);
- } else {
- init();
- }
- if(gLcd_info)
- gLcd_info->io_deinit();
- rk29_lcd_spim_spin_unlock();
- return 0;
-}
-
+++ /dev/null
-#include <linux/fb.h>\r
-#include <linux/delay.h>\r
-#include "../../rk29_fb.h"\r
-#include <mach/gpio.h>\r
-#include <mach/iomux.h>\r
-#include <mach/board.h>\r
-#include "screen.h"\r
-\r
-/* Base */\r
-#define OUT_TYPE SCREEN_RGB\r
-#define OUT_FACE OUT_D888_P666\r
-#define OUT_CLK 100000000\r
-#define LCDC_ACLK 500000000\r
-/* Timing */\r
-#define H_PW 320\r
-#define H_BP 480\r
-#define H_VD 1024\r
-#define H_FP 260\r
-\r
-#define V_PW 10\r
-#define V_BP 6\r
-#define V_VD 768\r
-#define V_FP 16\r
-\r
-#define LCD_WIDTH 196// 142 // 202\r
-#define LCD_HEIGHT 147 //106// 152\r
-/* Other */\r
-#define DCLK_POL 1 // \r
-#define SWAP_RB 0\r
-\r
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )\r
-{\r
- /* screen type & face */\r
- screen->type = OUT_TYPE;\r
- screen->face = OUT_FACE;\r
-\r
- /* Screen size */\r
- screen->x_res = H_VD;\r
- screen->y_res = V_VD;\r
-\r
- screen->width = LCD_WIDTH;\r
- screen->height = LCD_HEIGHT;\r
-\r
- /* Timing */\r
- screen->lcdc_aclk = LCDC_ACLK;\r
- screen->pixclock = OUT_CLK;\r
- screen->left_margin = H_BP;\r
- screen->right_margin = H_FP;\r
- screen->hsync_len = H_PW;\r
- screen->upper_margin = V_BP;\r
- screen->lower_margin = V_FP;\r
- screen->vsync_len = V_PW;\r
-\r
- /* Pin polarity */\r
- screen->pin_hsync = 0;\r
- screen->pin_vsync = 0;\r
- screen->pin_den = 0;\r
- screen->pin_dclk = DCLK_POL;\r
-\r
- /* Swap rule */\r
- screen->swap_rb = SWAP_RB;\r
- screen->swap_rg = 0;\r
- screen->swap_gb = 0;\r
- screen->swap_delta = 0;\r
- screen->swap_dumy = 0;\r
-\r
- /* Operation function*/\r
- screen->init = NULL;\r
- screen->standby = NULL;\r
-}\r
-\r
-\r
+++ /dev/null
-#include <linux/rk_fb.h>
-#include <linux/delay.h>
-#include <mach/gpio.h>
-#include <mach/iomux.h>
-#include <mach/board.h>
-#include "../../rockchip/hdmi/rk_hdmi.h"
-
-
-/* Base */
-#define OUT_TYPE SCREEN_LVDS
-#define LVDS_FORMAT LVDS_8BIT_2
-#define OUT_FACE OUT_D888_P666
-#define OUT_CLK 65000000
-#define LCDC_ACLK 300000000//312000000 //29 lcdc axi DMA ƵÂÊ
-
-/* Timing */
-#define H_PW 10
-#define H_BP 100
-#define H_VD 1024
-#define H_FP 210
-
-#define V_PW 10
-#define V_BP 10
-#define V_VD 768
-#define V_FP 18
-
-#define LCD_WIDTH 202
-#define LCD_HEIGHT 152
-/* Other */
-#define DCLK_POL 1
-#define DEN_POL 0
-#define VSYNC_POL 0
-#define HSYNC_POL 0
-
-#define SWAP_RB 0
-#define SWAP_RG 0
-#define SWAP_GB 0
-
-
-#ifdef CONFIG_ONE_LCDC_DUAL_OUTPUT_INF
-/* scaler Timing */
-//1920*1080*60
-
-#define S_OUT_CLK 64512000
-#define S_H_PW 114
-#define S_H_BP 210
-#define S_H_VD 1024
-#define S_H_FP 0
-
-#define S_V_PW 4
-#define S_V_BP 10
-#define S_V_VD 768
-#define S_V_FP 0
-
-#define S_H_ST 0
-#define S_V_ST 23
-
-//1920*1080*50
-#define S1_OUT_CLK 53760000
-#define S1_H_PW 114
-#define S1_H_BP 210
-#define S1_H_VD 1024
-#define S1_H_FP 0
-
-#define S1_V_PW 4
-#define S1_V_BP 10
-#define S1_V_VD 768
-#define S1_V_FP 0
-
-#define S1_H_ST 0
-#define S1_V_ST 23
-//1280*720*60
-#define S2_OUT_CLK 64512000
-#define S2_H_PW 114
-#define S2_H_BP 210
-#define S2_H_VD 1024
-#define S2_H_FP 0
-
-#define S2_V_PW 4
-#define S2_V_BP 10
-#define S2_V_VD 768
-#define S2_V_FP 0
-
-#define S2_H_ST 0
-#define S2_V_ST 23
-//1280*720*50
-
-#define S3_OUT_CLK 53760000
-#define S3_H_PW 114
-#define S3_H_BP 210
-#define S3_H_VD 1024
-#define S3_H_FP 0
-
-#define S3_V_PW 4
-#define S3_V_BP 10
-#define S3_V_VD 768
-#define S3_V_FP 0
-
-#define S3_H_ST 0
-#define S3_V_ST 23
-
-//720*576*50
-#define S4_OUT_CLK 30000000
-#define S4_H_PW 1
-#define S4_H_BP 88
-#define S4_H_VD 800
-#define S4_H_FP 263
-
-#define S4_V_PW 3
-#define S4_V_BP 9
-#define S4_V_VD 480
-#define S4_V_FP 28
-
-#define S4_H_ST 0
-#define S4_V_ST 33
-//720*480*60
-#define S5_OUT_CLK 30000000
-#define S5_H_PW 1
-#define S5_H_BP 88
-#define S5_H_VD 800
-#define S5_H_FP 112
-
-#define S5_V_PW 3
-#define S5_V_BP 9
-#define S5_V_VD 480
-#define S5_V_FP 28
-
-#define S5_H_ST 0
-#define S5_V_ST 29
-
-#define S_DCLK_POL 1
-
-
-static int set_scaler_info(struct rk29fb_screen *screen, u8 hdmi_resolution)
-{
- screen->s_clk_inv = S_DCLK_POL;
- screen->s_den_inv = 0;
- screen->s_hv_sync_inv = 0;
-
- printk("%s>>>>>>>>mode:%d\n",__func__,hdmi_resolution);
- switch(hdmi_resolution){
- case HDMI_1920x1080p_60Hz:
- /* Scaler Timing */
- screen->hdmi_resolution = hdmi_resolution;
- screen->s_pixclock = S_OUT_CLK;
- screen->s_hsync_len = S_H_PW;
- screen->s_left_margin = S_H_BP;
- screen->s_right_margin = S_H_FP;
- screen->s_hsync_len = S_H_PW;
- screen->s_upper_margin = S_V_BP;
- screen->s_lower_margin = S_V_FP;
- screen->s_vsync_len = S_V_PW;
- screen->s_hsync_st = S_H_ST;
- screen->s_vsync_st = S_V_ST;
- break;
- case HDMI_1920x1080p_50Hz:
- /* Scaler Timing */
- screen->s_pixclock = S1_OUT_CLK;
- screen->s_hsync_len = S1_H_PW;
- screen->s_left_margin = S1_H_BP;
- screen->s_right_margin = S1_H_FP;
- screen->s_hsync_len = S1_H_PW;
- screen->s_upper_margin = S1_V_BP;
- screen->s_lower_margin = S1_V_FP;
- screen->s_vsync_len = S1_V_PW;
- screen->s_hsync_st = S1_H_ST;
- screen->s_vsync_st = S1_V_ST;
- break;
- case HDMI_1280x720p_60Hz:
- /* Scaler Timing */
- screen->hdmi_resolution = hdmi_resolution;
- screen->s_pixclock = S2_OUT_CLK;
- screen->s_hsync_len = S2_H_PW;
- screen->s_left_margin = S2_H_BP;
- screen->s_right_margin = S2_H_FP;
- screen->s_hsync_len = S2_H_PW;
- screen->s_upper_margin = S2_V_BP;
- screen->s_lower_margin = S2_V_FP;
- screen->s_vsync_len = S2_V_PW;
- screen->s_hsync_st = S2_H_ST;
- screen->s_vsync_st = S2_V_ST;
- break;
- case HDMI_1280x720p_50Hz:
- /* Scaler Timing */
- screen->hdmi_resolution = hdmi_resolution;
- screen->s_pixclock = S3_OUT_CLK;
- screen->s_hsync_len = S3_H_PW;
- screen->s_left_margin = S3_H_BP;
- screen->s_right_margin = S3_H_FP;
- screen->s_hsync_len = S3_H_PW;
- screen->s_upper_margin = S3_V_BP;
- screen->s_lower_margin = S3_V_FP;
- screen->s_vsync_len = S3_V_PW;
- screen->s_hsync_st = S3_H_ST;
- screen->s_vsync_st = S3_V_ST;
- break;
- case HDMI_720x576p_50Hz_4_3:
- case HDMI_720x576p_50Hz_16_9:
- /* Scaler Timing */
- screen->hdmi_resolution = hdmi_resolution;
- screen->s_pixclock = S4_OUT_CLK;
- screen->s_hsync_len = S4_H_PW;
- screen->s_left_margin = S4_H_BP;
- screen->s_right_margin = S4_H_FP;
- screen->s_hsync_len = S4_H_PW;
- screen->s_upper_margin = S4_V_BP;
- screen->s_lower_margin = S4_V_FP;
- screen->s_vsync_len = S4_V_PW;
- screen->s_hsync_st = S4_H_ST;
- screen->s_vsync_st = S4_V_ST;
- break;
- case HDMI_720x480p_60Hz_16_9:
- case HDMI_720x480p_60Hz_4_3:
- /* Scaler Timing */
- screen->hdmi_resolution = hdmi_resolution;
- screen->s_pixclock = S5_OUT_CLK;
- screen->s_hsync_len = S5_H_PW;
- screen->s_left_margin = S5_H_BP;
- screen->s_right_margin = S5_H_FP;
- screen->s_hsync_len = S5_H_PW;
- screen->s_upper_margin = S5_V_BP;
- screen->s_lower_margin = S5_V_FP;
- screen->s_vsync_len = S5_V_PW;
- screen->s_hsync_st = S5_H_ST;
- screen->s_vsync_st = S5_V_ST;
- break;
- default :
- printk("%s lcd not support dual display at this hdmi resolution %d \n",__func__,hdmi_resolution);
- return -1;
- break;
- }
-
- return 0;
-}
-#else
-#define set_scaler_info NULL
-#endif
-
-
-
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
-{
- /* screen type & face */
- screen->type = OUT_TYPE;
- screen->face = OUT_FACE;
- screen->hw_format = LVDS_FORMAT;
-
- /* Screen size */
- screen->x_res = H_VD;
- screen->y_res = V_VD;
-
- screen->width = LCD_WIDTH;
- screen->height = LCD_HEIGHT;
-
- /* Timing */
- screen->lcdc_aclk = LCDC_ACLK;
- screen->pixclock = OUT_CLK;
- screen->left_margin = H_BP;
- screen->right_margin = H_FP;
- screen->hsync_len = H_PW;
- screen->upper_margin = V_BP;
- screen->lower_margin = V_FP;
- screen->vsync_len = V_PW;
-
- /* Pin polarity */
- screen->pin_hsync = HSYNC_POL;
- screen->pin_vsync = VSYNC_POL;
- screen->pin_den = DEN_POL;
- screen->pin_dclk = DCLK_POL;
-
- /* Swap rule */
- screen->swap_rb = SWAP_RB;
- screen->swap_rg = SWAP_RG;
- screen->swap_gb = SWAP_RG;
- screen->swap_delta = 0;
- screen->swap_dumy = 0;
-
- /* Operation function*/
- screen->init = NULL;
- screen->standby = NULL;
-
-#if defined(CONFIG_ONE_LCDC_DUAL_OUTPUT_INF)
- screen->sscreen_get = set_scaler_info;
- screen->s_pixclock = OUT_CLK;
- screen->s_hsync_len = H_PW;
- screen->s_left_margin = H_BP;
- screen->s_right_margin = H_FP;
- screen->s_hsync_len = H_PW;
- screen->s_upper_margin = V_BP;
- screen->s_lower_margin = V_FP;
- screen->s_vsync_len = V_PW;
- screen->s_hsync_st = 0;
- screen->s_vsync_st = 0;
-#endif
-}
-
-
-size_t get_fb_size(void)
-{
- size_t size = 0;
- #if defined(CONFIG_THREE_FB_BUFFER)
- size = ((H_VD)*(V_VD)<<2)* 3; //three buffer
- #else
- size = ((H_VD)*(V_VD)<<2)<<1; //two buffer
- #endif
- return ALIGN(size,SZ_1M);
-}
-
+++ /dev/null
-/*
- * Copyright (C) 2011 ROCKCHIP, Inc.
- *
- * author: hhb@rock-chips.com
- * creat date: 2011-03-22
- * route:drivers/video/display/screen/lcd_ls035y8dx02a.c - driver for rk29 phone sdk
- * declaration: This program driver have been tested in rk29_phonesdk hardware platform at 2011.03.31.
- * about migration: you need just 3 interface functions,such as lcd_init(void),lcd_standby(u8 enable),
- * set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-
-#include <linux/fb.h>
-#include <linux/delay.h>
-#include "../../rk29_fb.h"
-#include <mach/gpio.h>
-#include <mach/iomux.h>
-#include <mach/board.h>
-#include "screen.h"
-
-/* Base */
-#define OUT_TYPE SCREEN_RGB
-#define OUT_FACE OUT_P888
-#define OUT_CLK (26*1000000) //***27 uint Hz
-#define LCDC_ACLK 300000000 //29 lcdc axi DMA Ƶ��
-
-/* Timing */
-#define H_PW 8 //16
-#define H_BP 6//24
-#define H_VD 480//320
-#define H_FP 60//16
-
-#define V_PW 2
-#define V_BP 2
-#define V_VD 800//480
-#define V_FP 4
-
-#define LCD_WIDTH 480 //need modify
-#define LCD_HEIGHT 800
-
-/* Other */
-#define DCLK_POL 1 //0
-#define SWAP_RB 0
-
-static struct rk29lcd_info *gLcd_info = NULL;
-int lcd_init(void);
-int lcd_standby(u8 enable);
-
-#define RXD_PORT RK29_PIN2_PC7
-#define TXD_PORT gLcd_info->txd_pin
-#define CLK_PORT gLcd_info->clk_pin
-#define CS_PORT gLcd_info->cs_pin
-#define RESET_PORT RK29_PIN6_PC6
-
-#define CS_OUT() gpio_direction_output(CS_PORT, 1)
-#define CS_SET() gpio_set_value(CS_PORT, GPIO_HIGH)
-#define CS_CLR() gpio_set_value(CS_PORT, GPIO_LOW)
-#define CLK_OUT() gpio_direction_output(CLK_PORT, 0)
-#define CLK_SET() gpio_set_value(CLK_PORT, GPIO_HIGH)
-#define CLK_CLR() gpio_set_value(CLK_PORT, GPIO_LOW)
-#define TXD_OUT() gpio_direction_output(TXD_PORT, 1)
-#define TXD_SET() gpio_set_value(TXD_PORT, GPIO_HIGH)
-#define TXD_CLR() gpio_set_value(TXD_PORT, GPIO_LOW)
-#define RXD_IN() gpio_direction_input(RXD_PORT)
-#define RXD_GET() gpio_get_value(RXD_PORT)
-
-#define DRVDelayUs(i) udelay(i*4)
-
-u32 spi_screenreg_get(u32 Addr)
-{
- u32 i, data = 0;
- u32 control_bit;
-
- TXD_OUT();
- CLK_OUT();
- CS_OUT();
- DRVDelayUs(2);
- DRVDelayUs(2);
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(30);
-
- CS_CLR();
- control_bit = 0x0000;
- Addr = (control_bit | Addr);
- printk("addr is 0x%x \n", Addr);
- for(i = 0; i < 9; i++) //reg
- {
- if(Addr &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
-
- // \u6a21\u62dfCLK
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(10);
-
- CS_CLR();
- for(i = 0; i < 9; i++)
- {
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- if(RXD_GET())
- {
- data |= 1<<(8-i);
- }
- else
- {
- data &= ~(1<<(8-i));
- }
- DRVDelayUs(2);
- }
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(30);
-
- return data;
-}
-
-void spi_screenreg_set(u32 Addr, u32 Data0, u32 Data1)
-{
-
-
- u32 i;
- u32 control_bit;
-
- TXD_OUT();
- CLK_OUT();
- CS_OUT();
- DRVDelayUs(2);
- DRVDelayUs(2);
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(30);
-
- CS_CLR();
- control_bit = 0x0000;
- Addr = (control_bit | Addr);
- //printk("addr is 0x%x \n", Addr);
- for(i = 0; i < 9; i++) //reg
- {
- if(Addr &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(10);
-
- if(0xffff == Data0){
- return;
- }
-
- CS_CLR();
-
- control_bit = 0x0100;
- Data0 = (control_bit | Data0);
- //printk("data0 is 0x%x \n", Data);
- for(i = 0; i < 9; i++) //data
- {
- if(Data0 &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(10);
-
- if(0xffff == Data1)
- return;
-
- CS_CLR();
-
- control_bit = 0x0100;
- Data1 = (control_bit | Data1);
- //printk("data1 is 0x%x \n", Data);
- for(i = 0; i < 9; i++) //data
- {
- if(Data1 &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(30);
-}
-
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
-{
- /* screen type & face */
- screen->type = OUT_TYPE;
- screen->face = OUT_FACE;
-
- /* Screen size */
- screen->x_res = H_VD;
- screen->y_res = V_VD;
- screen->width = LCD_WIDTH;
- screen->height = LCD_HEIGHT;
-
- /* Timing */
- screen->lcdc_aclk = LCDC_ACLK;
- screen->pixclock = OUT_CLK;
- screen->left_margin = H_BP; /*>2*/
- screen->right_margin = H_FP; /*>2*/
- screen->hsync_len = H_PW; /*>2*/ //***all > 326, 4<PW+BP<15,
- screen->upper_margin = V_BP; /*>2*/
- screen->lower_margin = V_FP; /*>2*/
- screen->vsync_len = V_PW; /*>6*/
-
- /* Pin polarity */
- screen->pin_hsync = 0;
- screen->pin_vsync = 0;
- screen->pin_den = 0;
- screen->pin_dclk = DCLK_POL;
-
- /* Swap rule */
- screen->swap_rb = SWAP_RB;
- screen->swap_rg = 0;
- screen->swap_gb = 0;
- screen->swap_delta = 0;
- screen->swap_dumy = 0;
-
- /* Operation function*/
- screen->init = lcd_init;
- screen->standby = lcd_standby;
- if(lcd_info)
- gLcd_info = lcd_info;
-}
-
-int lcd_init(void)
-{
- volatile u32 data;
- if(gLcd_info){
- gLcd_info->io_init();
- }
-
- /* reset lcd to start init lcd by software if there is no hardware reset circuit for the lcd */
-#ifdef RESET_PORT
- gpio_request(RESET_PORT, NULL);
- gpio_direction_output(RESET_PORT, 0);
- mdelay(2);
- gpio_set_value(RESET_PORT, 1);
- mdelay(10);
- gpio_free(RESET_PORT);
-#endif
-
- printk("lcd init...\n");
- spi_screenreg_set(0x29, 0xffff, 0xffff); //display on
- spi_screenreg_set(0x11, 0xffff, 0xffff); //sleep out
- mdelay(150);
- spi_screenreg_set(0x36, 0x0000, 0xffff); //set address mode
-
- while(0) //this code is not used here
- {
- data = spi_screenreg_get(0x0a);
- printk("------------liuylcd init reg 0x0a=0x%x \n", spi_screenreg_get(0x0a));
- data = spi_screenreg_get(0x0b);
- printk("------------liuylcd init reg 0x0b=0x%x \n", spi_screenreg_get(0x0b));
- data = spi_screenreg_get(0x0c);
- printk("------------liuylcd init reg 0x0c=0x%x \n", spi_screenreg_get(0x0c));
- data = spi_screenreg_get(0x0d);
- printk("------------liuylcd init reg 0x0d=0x%x \n", spi_screenreg_get(0x0d));
- data = spi_screenreg_get(0x0f);
- printk("------------liuylcd init reg 0x0f=0x%x \n", spi_screenreg_get(0x0f));
- }
-
- spi_screenreg_set(0x3a, 0x0070, 0xffff); //set pixel format
- spi_screenreg_set(0xb0, 0x0000, 0xffff); //enable command acess
- spi_screenreg_set(0xb8, 0x0001, 0xffff); //BLC setting
- spi_screenreg_set(0xb9, 0x0001, 0x00ff); //LED PWM
- spi_screenreg_set(0xb0, 0x0003, 0xffff); //disable command acess
-
- if(gLcd_info)
- gLcd_info->io_deinit();
-
- return 0;
-}
-
-extern void rk29_lcd_spim_spin_lock(void);
-extern void rk29_lcd_spim_spin_unlock(void);
-int lcd_standby(u8 enable) //***enable =1 means suspend, 0 means resume
-{
- rk29_lcd_spim_spin_lock();
- if(gLcd_info)
- gLcd_info->io_init();
-
- if(enable) {
- //printk("lcd suspend\n");
- spi_screenreg_set(0x10, 0xffff, 0xffff);
- mdelay(120);
- spi_screenreg_set(0x28, 0xffff, 0xffff);
- } else {
- //printk("lcd resume\n");
- spi_screenreg_set(0x29, 0xffff, 0xffff);
- spi_screenreg_set(0x11, 0xffff, 0xffff);
- mdelay(130);
- spi_screenreg_set(0x36, 0x0000, 0xffff); //set address mode
- spi_screenreg_set(0x3a, 0x0070, 0xffff); //set pixel format
- spi_screenreg_set(0xb0, 0x0000, 0xffff); //enable command acess
- spi_screenreg_set(0xb8, 0x0001, 0xffff); //BLC setting
- spi_screenreg_set(0xb9, 0x0001, 0x00ff); //LED PWM
- spi_screenreg_set(0xb0, 0x0003, 0xffff); //disable command acess
- }
-
- if(gLcd_info)
- gLcd_info->io_deinit();
- rk29_lcd_spim_spin_unlock();
- return 0;
-}
-
+++ /dev/null
-/*
- * Copyright (C) 2011 ROCKCHIP, Inc.
- *
- * author: hhb@rock-chips.com
- * creat date: 2011-03-22
- * route:drivers/video/display/screen/lcd_ls035y8dx02a.c - driver for rk29 phone sdk
- * declaration: This program driver have been tested in rk29_phonesdk hardware platform at 2011.03.31.
- * about migration: you need just 3 interface functions,such as lcd_init(void),lcd_standby(u8 enable),
- * set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-
-#include <linux/fb.h>
-#include <linux/delay.h>
-#include "../../rk29_fb.h"
-#include <mach/gpio.h>
-#include <mach/iomux.h>
-#include <mach/board.h>
-#include "screen.h"
-
-/* Base */
-#define OUT_TYPE SCREEN_RGB
-#define OUT_FACE OUT_P888
-#define OUT_CLK (26*1000000) //***27 uint Hz
-#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ��
-
-/* Timing */
-#define H_PW 8 //16
-#define H_BP 6//24
-#define H_VD 480//320
-#define H_FP 60//16
-
-#define V_PW 2
-#define V_BP 2
-#define V_VD 800//480
-#define V_FP 4
-
-#define LCD_WIDTH 46 //need modify
-#define LCD_HEIGHT 76
-
-/* Other */
-#define DCLK_POL 1 //0
-#define SWAP_RB 0
-
-static struct rk29lcd_info *gLcd_info = NULL;
-int lcd_init(void);
-int lcd_standby(u8 enable);
-
-#define RXD_PORT RK29_PIN2_PC7
-#define TXD_PORT gLcd_info->txd_pin
-#define CLK_PORT gLcd_info->clk_pin
-#define CS_PORT gLcd_info->cs_pin
-#define RESET_PORT RK29_PIN6_PC6
-
-#define CS_OUT() gpio_direction_output(CS_PORT, 1)
-#define CS_SET() gpio_set_value(CS_PORT, GPIO_HIGH)
-#define CS_CLR() gpio_set_value(CS_PORT, GPIO_LOW)
-#define CLK_OUT() gpio_direction_output(CLK_PORT, 0)
-#define CLK_SET() gpio_set_value(CLK_PORT, GPIO_HIGH)
-#define CLK_CLR() gpio_set_value(CLK_PORT, GPIO_LOW)
-#define TXD_OUT() gpio_direction_output(TXD_PORT, 1)
-#define TXD_SET() gpio_set_value(TXD_PORT, GPIO_HIGH)
-#define TXD_CLR() gpio_set_value(TXD_PORT, GPIO_LOW)
-#define RXD_IN() gpio_direction_input(RXD_PORT)
-#define RXD_GET() gpio_get_value(RXD_PORT)
-
-#define DRVDelayUs(i) udelay(i*4)
-
-u32 spi_screenreg_get(u32 Addr)
-{
- u32 i, data = 0;
- u32 control_bit;
-
- TXD_OUT();
- CLK_OUT();
- CS_OUT();
- DRVDelayUs(2);
- DRVDelayUs(2);
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(30);
-
- CS_CLR();
- control_bit = 0x0000;
- Addr = (control_bit | Addr);
- printk("addr is 0x%x \n", Addr);
- for(i = 0; i < 9; i++) //reg
- {
- if(Addr &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
-
- // \u6a21\u62dfCLK
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(10);
-
- CS_CLR();
- for(i = 0; i < 9; i++)
- {
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- if(RXD_GET())
- {
- data |= 1<<(8-i);
- }
- else
- {
- data &= ~(1<<(8-i));
- }
- DRVDelayUs(2);
- }
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(30);
-
- return data;
-}
-
-void spi_screenreg_set(u32 Addr, u32 Data0, u32 Data1)
-{
-
-
- u32 i;
- u32 control_bit;
-
- TXD_OUT();
- CLK_OUT();
- CS_OUT();
- DRVDelayUs(2);
- DRVDelayUs(2);
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(30);
-
- CS_CLR();
- control_bit = 0x0000;
- Addr = (control_bit | Addr);
- //printk("addr is 0x%x \n", Addr);
- for(i = 0; i < 9; i++) //reg
- {
- if(Addr &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- TXD_SET();
- CLK_CLR();
- DRVDelayUs(10);
-
- if(0xffff == Data0){
- return;
- }
-
- CS_CLR();
-
- control_bit = 0x0100;
- Data0 = (control_bit | Data0);
- //printk("data0 is 0x%x \n", Data);
- for(i = 0; i < 9; i++) //data
- {
- if(Data0 &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(10);
-
- if(0xffff == Data1)
- return;
-
- CS_CLR();
-
- control_bit = 0x0100;
- Data1 = (control_bit | Data1);
- //printk("data1 is 0x%x \n", Data);
- for(i = 0; i < 9; i++) //data
- {
- if(Data1 &(1<<(8-i)))
- TXD_SET();
- else
- TXD_CLR();
- CLK_SET();
- DRVDelayUs(2);
- CLK_CLR();
- DRVDelayUs(2);
- }
-
- CS_SET();
- CLK_CLR();
- TXD_CLR();
- DRVDelayUs(30);
-}
-
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
-{
- /* screen type & face */
- screen->type = OUT_TYPE;
- screen->face = OUT_FACE;
-
- /* Screen size */
- screen->x_res = H_VD;
- screen->y_res = V_VD;
- screen->width = LCD_WIDTH;
- screen->height = LCD_HEIGHT;
-
- /* Timing */
- screen->lcdc_aclk = LCDC_ACLK;
- screen->pixclock = OUT_CLK;
- screen->left_margin = H_BP; /*>2*/
- screen->right_margin = H_FP; /*>2*/
- screen->hsync_len = H_PW; /*>2*/ //***all > 326, 4<PW+BP<15,
- screen->upper_margin = V_BP; /*>2*/
- screen->lower_margin = V_FP; /*>2*/
- screen->vsync_len = V_PW; /*>6*/
-
- /* Pin polarity */
- screen->pin_hsync = 0;
- screen->pin_vsync = 0;
- screen->pin_den = 0;
- screen->pin_dclk = DCLK_POL;
-
- /* Swap rule */
- screen->swap_rb = SWAP_RB;
- screen->swap_rg = 0;
- screen->swap_gb = 0;
- screen->swap_delta = 0;
- screen->swap_dumy = 0;
-
- /* Operation function*/
- screen->init = lcd_init;
- screen->standby = lcd_standby;
- if(lcd_info)
- gLcd_info = lcd_info;
-}
-
-int lcd_init(void)
-{
- volatile u32 data;
- if(gLcd_info){
- gLcd_info->io_init();
- }
-
- /* reset lcd to start init lcd by software if there is no hardware reset circuit for the lcd */
-#ifdef RESET_PORT
- gpio_request(RESET_PORT, NULL);
- gpio_direction_output(RESET_PORT, 0);
- mdelay(2);
- gpio_set_value(RESET_PORT, 1);
- mdelay(10);
- gpio_free(RESET_PORT);
-#endif
-
- printk("lcd init...\n");
- spi_screenreg_set(0x29, 0xffff, 0xffff); //display on
- spi_screenreg_set(0x11, 0xffff, 0xffff); //sleep out
- mdelay(150);
- spi_screenreg_set(0x36, 0x0000, 0xffff); //set address mode
-
- while(0) //this code is not used here
- {
- data = spi_screenreg_get(0x0a);
- printk("------------liuylcd init reg 0x0a=0x%x \n", spi_screenreg_get(0x0a));
- data = spi_screenreg_get(0x0b);
- printk("------------liuylcd init reg 0x0b=0x%x \n", spi_screenreg_get(0x0b));
- data = spi_screenreg_get(0x0c);
- printk("------------liuylcd init reg 0x0c=0x%x \n", spi_screenreg_get(0x0c));
- data = spi_screenreg_get(0x0d);
- printk("------------liuylcd init reg 0x0d=0x%x \n", spi_screenreg_get(0x0d));
- data = spi_screenreg_get(0x0f);
- printk("------------liuylcd init reg 0x0f=0x%x \n", spi_screenreg_get(0x0f));
- }
-
- spi_screenreg_set(0x3a, 0x0070, 0xffff); //set pixel format
- spi_screenreg_set(0xb0, 0x0000, 0xffff); //enable command acess
- spi_screenreg_set(0xb8, 0x0000, 0xffff); //BLC setting
- spi_screenreg_set(0xb9, 0x0001, 0x00ff); //LED PWM
- //spi_screenreg_set(0xb0, 0x0003, 0xffff); //disable command acess
-
- if(gLcd_info)
- gLcd_info->io_deinit();
-
- return 0;
-}
-
-extern void rk29_lcd_spim_spin_lock(void);
-extern void rk29_lcd_spim_spin_unlock(void);
-int lcd_standby(u8 enable) //***enable =1 means suspend, 0 means resume
-{
- rk29_lcd_spim_spin_lock();
- if(gLcd_info)
- gLcd_info->io_init();
- printk("lcd standby\n");
- if(enable) {
- printk("lcd standby...enable =1 means suspend\n");
- spi_screenreg_set(0x10, 0xffff, 0xffff);
- mdelay(120);
- spi_screenreg_set(0x28, 0xffff, 0xffff);
- } else {
- printk("lcd standby...0 means resume\n");
- spi_screenreg_set(0x29, 0xffff, 0xffff);
- spi_screenreg_set(0x11, 0xffff, 0xffff);
- //mdelay(150);
- }
-
- if(gLcd_info)
- gLcd_info->io_deinit();
- rk29_lcd_spim_spin_unlock();
- return 0;
-}
-
+++ /dev/null
-#include <linux/fb.h>\r
-#include <linux/delay.h>\r
-#include <linux/earlysuspend.h>\r
-#include "../../rk29_fb.h"\r
-#include <mach/gpio.h>\r
-#include <mach/iomux.h>\r
-#include <mach/board.h>\r
-#include "screen.h"\r
-\r
-/* Base */\r
-#define OUT_TYPE SCREEN_RGB\r
-#define OUT_FACE OUT_P888\r
-#define OUT_CLK 26*1000*1000 //***27\r
-#define LCDC_ACLK 300000000 //29 lcdc axi DMA Ƶ�� //rk29\r
-\r
-/* Timing */\r
-#define H_PW 4 //8Ç°ÏûÓ°\r
-#define H_BP 8//6\r
-#define H_VD 480//320 //***800 \r
-#define H_FP 8//60\r
-\r
-#define V_PW 4//12\r
-#define V_BP 8// 4\r
-#define V_VD 800//480 //***480\r
-#define V_FP 8//40\r
-\r
-#define LCD_WIDTH 57 //lcd size *mm\r
-#define LCD_HEIGHT 94\r
-\r
-/* Other */\r
-#define DCLK_POL 1//0 \r
-#define SWAP_RB 0\r
-\r
-static struct rk29lcd_info *gLcd_info = NULL;\r
-\r
-int init(void);\r
-int standby(u8 enable);\r
-\r
-#define TXD_PORT gLcd_info->txd_pin\r
-#define CLK_PORT gLcd_info->clk_pin\r
-#define CS_PORT gLcd_info->cs_pin\r
-\r
-#define CS_OUT() gpio_direction_output(CS_PORT, 1)\r
-#define CS_SET() gpio_set_value(CS_PORT, GPIO_HIGH)\r
-#define CS_CLR() gpio_set_value(CS_PORT, GPIO_LOW)\r
-#define CLK_OUT() gpio_direction_output(CLK_PORT, 0) \r
-#define CLK_SET() gpio_set_value(CLK_PORT, GPIO_HIGH)\r
-#define CLK_CLR() gpio_set_value(CLK_PORT, GPIO_LOW)\r
-#define TXD_OUT() gpio_direction_output(TXD_PORT, 1) \r
-#define TXD_SET() gpio_set_value(TXD_PORT, GPIO_HIGH)\r
-#define TXD_CLR() gpio_set_value(TXD_PORT, GPIO_LOW)\r
-\r
-\r
-#define DRVDelayUs(i) udelay(i*4)\r
-#if 0\r
-void spi_screenreg_cmd(u8 Addr)\r
-{\r
- u32 i;\r
- u32 control_bit;\r
-\r
- TXD_OUT();\r
- CLK_OUT();\r
- CS_OUT();\r
- DRVDelayUs(2);\r
- DRVDelayUs(2);\r
-\r
- CS_SET();\r
- TXD_SET();\r
- CLK_CLR();\r
- DRVDelayUs(30);\r
-\r
- CS_CLR();\r
- control_bit = 0x0000;\r
- Addr = (control_bit | Addr);//spi_screenreg_set(0x36, 0x0000, 0xffff); \r
- //printk("addr is 0x%x \n", Addr); \r
- for(i = 0; i < 9; i++) //reg\r
- {\r
- if(Addr &(1<<(8-i)))\r
- TXD_SET();\r
- else\r
- TXD_CLR();\r
-\r
- // \u6a21\u62dfCLK\r
- CLK_SET();\r
- DRVDelayUs(2);\r
- CLK_CLR();\r
- DRVDelayUs(2);\r
- }\r
-\r
- CS_SET();\r
- TXD_SET();\r
- CLK_CLR(); \r
- DRVDelayUs(10);\r
-}\r
-\r
-\r
-void spi_screenreg_param(u8 Param)\r
-{\r
-\r
- u32 i;\r
- u32 control_bit;\r
-\r
- CS_CLR();\r
- \r
- control_bit = 0x0100;\r
- Param = (control_bit | Param);\r
- //printk("data0 is 0x%x \n", Data); \r
- for(i = 0; i < 9; i++) //data\r
- {\r
- if(Param &(1<<(8-i)))\r
- TXD_SET();\r
- else\r
- TXD_CLR();\r
-\r
- // \u6a21\u62dfCLK\r
- CLK_SET();\r
- DRVDelayUs(2);\r
- CLK_CLR();\r
- DRVDelayUs(2);\r
- }\r
-\r
- CS_SET();\r
- CLK_CLR();\r
- TXD_CLR();\r
- DRVDelayUs(10);\r
-}\r
-#endif\r
-\r
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )\r
-{\r
- //printk("lcd_hx8357 set_lcd_info \n"); \r
- /* screen type & face */\r
- screen->type = OUT_TYPE;\r
- screen->face = OUT_FACE;\r
-\r
- /* Screen size */\r
- screen->x_res = H_VD;\r
- screen->y_res = V_VD;\r
- screen->width = LCD_WIDTH; //rk29\r
- screen->height = LCD_HEIGHT; //rk29\r
-\r
- /* Timing */\r
- screen->lcdc_aclk = LCDC_ACLK; //rk29\r
- screen->pixclock = OUT_CLK;\r
- screen->left_margin = H_BP; /*>2*/ \r
- screen->right_margin = H_FP; /*>2*/ \r
- screen->hsync_len = H_PW; /*>2*/ //***all > 326, 4<PW+BP<15, \r
- screen->upper_margin = V_BP; /*>2*/ \r
- screen->lower_margin = V_FP; /*>2*/ \r
- screen->vsync_len = V_PW; /*>6*/ \r
-\r
- /* Pin polarity */\r
- screen->pin_hsync = 0; \r
- screen->pin_vsync = 0; \r
- screen->pin_den = 0;\r
- screen->pin_dclk = DCLK_POL;\r
-\r
- /* Swap rule */\r
- screen->swap_rb = 0;\r
- screen->swap_rg = 0;\r
- screen->swap_gb = 0;\r
- screen->swap_delta = 0;\r
- screen->swap_dumy = 0;\r
-\r
- /* Operation function*/\r
- screen->init = init;\r
- screen->standby = standby;\r
- if(lcd_info)\r
- gLcd_info = lcd_info;\r
-}\r
-\r
-\r
-void WriteCommand( int Command)\r
-{\r
- unsigned char i,count1, count2,count3,count4;\r
- count1= Command>>8;\r
- count2= Command;\r
- count3=0x20;//00100000 //дÃüÁî¸ßλ\r
- count4=0x00;//00000000 //дÃüÁîµÍλ======¾ßÌåÇë¿´ICµÄDatasheet\r
- CS_CLR();\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count3 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count3<<=1;\r
- }\r
-\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count1 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count1<<=1;\r
- }\r
-\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count4 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count4<<=1;\r
- }\r
- \r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count2 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count2<<=1;\r
- }\r
-\r
- CS_SET();\r
-\r
-}\r
-\r
-\r
-\r
-void WriteParameter(char DH)\r
-{\r
- unsigned char i, count1, count2,count3,count4;\r
- count1=DH>>8;\r
- count2=DH;\r
- count3=0x60;//дÊý¾Ý¸ßλ\r
- count4=0x40;//дÊý¾ÝµÍλ\r
-\r
- CS_CLR();\r
- /*\r
- TXD_CLR(); CLK_CLR(); CLK_SET(); //WRITE\r
- TXD_SET(); CLK_CLR(); CLK_SET(); //DATA\r
- TXD_SET(); CLK_CLR(); CLK_SET(); //HIGH BYTE\r
- TXD_CLR(); CLK_CLR(); CLK_SET();\r
- TXD_CLR(); CLK_CLR(); CLK_SET();\r
- TXD_CLR(); CLK_CLR(); CLK_SET();\r
- TXD_CLR(); CLK_CLR(); CLK_SET();\r
- TXD_CLR(); CLK_CLR(); CLK_SET();\r
- */\r
- /*\r
- //ÒòΪÊý¾ÝµÄ¸ßλ»ù±¾ÊDz»Óõģ¬¿ÉÒÔ²»´«¸ßλ£¬Ö±½Ó´«µÍλ\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count3 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count3<<=1;\r
- }\r
-\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count1 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count1<<=1;\r
- }\r
- */\r
-\r
-\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count4 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count4<<=1;\r
- }\r
-\r
- for(i=0;i<8;i++)\r
- {\r
- CLK_CLR();\r
- if (count2 & 0x80) TXD_SET();\r
- else TXD_CLR();\r
- CLK_SET();\r
- count2<<=1;\r
- }\r
-\r
- CS_SET();\r
-\r
-}\r
-\r
-\r
-void init_nt35510(void)\r
-{\r
- WriteCommand(0X1100); \r
- usleep_range(10*1000, 10*1000);\r
-\r
- WriteCommand(0X1300); \r
-\r
- WriteCommand(0XF000); \r
- WriteParameter(0x55);\r
-\r
- WriteCommand(0XF001); \r
- WriteParameter(0xAA);\r
-\r
- WriteCommand(0XF002); \r
- WriteParameter(0x52);\r
-\r
- WriteCommand(0XF003); \r
- WriteParameter(0x08);\r
-\r
- WriteCommand(0XF004); \r
- WriteParameter(0x01);\r
-\r
- //Gamma setting Red\r
- WriteCommand(0XD100);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD101);\r
- WriteParameter(0x20);\r
-\r
- WriteCommand(0XD102);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD103);\r
- WriteParameter(0x2B);\r
-\r
- WriteCommand(0XD104);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD105);\r
- WriteParameter(0x3C);\r
-\r
- WriteCommand(0XD106);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD107);\r
- WriteParameter(0x56);\r
-\r
- WriteCommand(0XD108);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD109);\r
- WriteParameter(0x68);\r
-\r
- WriteCommand(0XD10a);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD10b);\r
- WriteParameter(0x87);\r
-\r
- WriteCommand(0XD10c);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD10d);\r
- WriteParameter(0x9E);\r
-\r
- WriteCommand(0XD10e);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD10f);\r
- WriteParameter(0xC6);\r
-\r
- WriteCommand(0XD110);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD111);\r
- WriteParameter(0xE4);\r
-\r
- WriteCommand(0XD112);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD113);\r
- WriteParameter(0x12);\r
-\r
- WriteCommand(0XD114);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD115);\r
- WriteParameter(0x37);\r
-\r
- WriteCommand(0XD116);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD117);\r
- WriteParameter(0x75);\r
-\r
- WriteCommand(0XD118);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD119);\r
- WriteParameter(0xA5);\r
-\r
- WriteCommand(0XD11a);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD11b);\r
- WriteParameter(0xA6);\r
-\r
- WriteCommand(0XD11c);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD11d);\r
- WriteParameter(0xD0);\r
-\r
- WriteCommand(0XD11e);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD11f);\r
- WriteParameter(0xF5);\r
-\r
- WriteCommand(0XD120);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD121);\r
- WriteParameter(0x0A);\r
-\r
- WriteCommand(0XD122);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD123);\r
- WriteParameter(0x26);\r
-\r
- WriteCommand(0XD124);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD125);\r
- WriteParameter(0x3B);\r
-\r
- WriteCommand(0XD126);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD127);\r
- WriteParameter(0x6B);\r
-\r
- WriteCommand(0XD128);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD129);\r
- WriteParameter(0x99);\r
-\r
- WriteCommand(0XD12a);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD12b);\r
- WriteParameter(0xDD);\r
-\r
- WriteCommand(0XD12C);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD12D);\r
- WriteParameter(0x10);\r
-\r
- WriteCommand(0XD12E);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD12F);\r
- WriteParameter(0x26);\r
-\r
- WriteCommand(0XD130);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD131);\r
- WriteParameter(0x32);\r
-\r
- WriteCommand(0XD132);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD133);\r
- WriteParameter(0x9A);\r
-\r
- //Gamma setting Green\r
- WriteCommand(0XD200);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD201);\r
- WriteParameter(0xa0);\r
-\r
- WriteCommand(0XD202);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD203);\r
- WriteParameter(0xa9);\r
-\r
- WriteCommand(0XD204);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD205);\r
- WriteParameter(0xb5);\r
-\r
- WriteCommand(0XD206);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD207);\r
- WriteParameter(0xbf);\r
-\r
- WriteCommand(0XD208);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD209);\r
- WriteParameter(0xc9);\r
-\r
- WriteCommand(0XD20a);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD20b);\r
- WriteParameter(0xdc);\r
-\r
- WriteCommand(0XD20c);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD20d);\r
- WriteParameter(0xEE);\r
-\r
- WriteCommand(0XD20e);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD20f);\r
- WriteParameter(0x0A);\r
-\r
- WriteCommand(0XD210);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD211);\r
- WriteParameter(0x21);\r
-\r
- WriteCommand(0XD212);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD213);\r
- WriteParameter(0x48);\r
-\r
- WriteCommand(0XD214);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD215);\r
- WriteParameter(0x67);\r
-\r
- WriteCommand(0XD216);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD217);\r
- WriteParameter(0x97);\r
-\r
- WriteCommand(0XD218);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD219);\r
- WriteParameter(0xBE);\r
-\r
- WriteCommand(0XD21a);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD21b);\r
- WriteParameter(0xC0);\r
-\r
- WriteCommand(0XD21c);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD21d);\r
- WriteParameter(0xE1);\r
-\r
- WriteCommand(0XD21e);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD21f);\r
- WriteParameter(0x04);\r
-\r
- WriteCommand(0XD220);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD221);\r
- WriteParameter(0x17);\r
-\r
- WriteCommand(0XD222);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD223);\r
- WriteParameter(0x36);\r
-\r
- WriteCommand(0XD224);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD225);\r
- WriteParameter(0x50);\r
-\r
- WriteCommand(0XD226);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD227);\r
- WriteParameter(0x7E);\r
-\r
- WriteCommand(0XD228);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD229);\r
- WriteParameter(0xAC);\r
-\r
- WriteCommand(0XD22a);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD22b);\r
- WriteParameter(0xF1);\r
-\r
- WriteCommand(0XD22C);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD22D);\r
- WriteParameter(0x20);\r
-\r
- WriteCommand(0XD22E);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD22F);\r
- WriteParameter(0x38);\r
-\r
- WriteCommand(0XD230);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD231);\r
- WriteParameter(0x43);\r
-\r
- WriteCommand(0XD232);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD233);\r
- WriteParameter(0x9A);\r
-\r
-\r
- //Gamma setting Blue\r
- WriteCommand(0XD300);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD301);\r
- WriteParameter(0x50);\r
-\r
- WriteCommand(0XD302);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD303);\r
- WriteParameter(0x53);\r
-\r
- WriteCommand(0XD304);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD305);\r
- WriteParameter(0x73);\r
-\r
- WriteCommand(0XD306);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD307);\r
- WriteParameter(0x89);\r
-\r
- WriteCommand(0XD308);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD309);\r
- WriteParameter(0x9f);\r
-\r
- WriteCommand(0XD30a);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD30b);\r
- WriteParameter(0xc1);\r
-\r
- WriteCommand(0XD30c);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD30d);\r
- WriteParameter(0xda);\r
-\r
- WriteCommand(0XD30e);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD30f);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD310);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD311);\r
- WriteParameter(0x23);\r
-\r
- WriteCommand(0XD312);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD313);\r
- WriteParameter(0x50);\r
-\r
- WriteCommand(0XD314);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD315);\r
- WriteParameter(0x6f);\r
-\r
- WriteCommand(0XD316);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD317);\r
- WriteParameter(0x9f);\r
-\r
- WriteCommand(0XD318);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD319);\r
- WriteParameter(0xc5);\r
-\r
- WriteCommand(0XD31a);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD31b);\r
- WriteParameter(0xC6);\r
-\r
- WriteCommand(0XD31c);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD31d);\r
- WriteParameter(0xE3);\r
-\r
- WriteCommand(0XD31e);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD31f);\r
- WriteParameter(0x08);\r
-\r
- WriteCommand(0XD320);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD321);\r
- WriteParameter(0x16);\r
-\r
- WriteCommand(0XD322);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD323);\r
- WriteParameter(0x2b);\r
-\r
- WriteCommand(0XD324);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD325);\r
- WriteParameter(0x4d);\r
-\r
- WriteCommand(0XD326);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD327);\r
- WriteParameter(0x6f);\r
-\r
- WriteCommand(0XD328);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD329);\r
- WriteParameter(0x8C);\r
-\r
- WriteCommand(0XD32a);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD32b);\r
- WriteParameter(0xd6);\r
-\r
- WriteCommand(0XD32C);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD32D);\r
- WriteParameter(0x12);\r
-\r
- WriteCommand(0XD32E);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD32F);\r
- WriteParameter(0x28);\r
-\r
- WriteCommand(0XD330);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD331);\r
- WriteParameter(0x3e);\r
-\r
- WriteCommand(0XD332);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD333);\r
- WriteParameter(0x9A);\r
-\r
- //Gamma setting Red\r
- WriteCommand(0XD400);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD401);\r
- WriteParameter(0x20);\r
-\r
- WriteCommand(0XD402);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD403);\r
- WriteParameter(0x2b);\r
-\r
- WriteCommand(0XD404);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD405);\r
- WriteParameter(0x3c);\r
-\r
- WriteCommand(0XD406);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD407);\r
- WriteParameter(0x56);\r
-\r
- WriteCommand(0XD408);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD409);\r
- WriteParameter(0x68);\r
-\r
- WriteCommand(0XD40a);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD40b);\r
- WriteParameter(0x87);\r
-\r
- WriteCommand(0XD40c);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD40d);\r
- WriteParameter(0x9e);\r
-\r
- WriteCommand(0XD40e);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD40f);\r
- WriteParameter(0xc6);\r
-\r
- WriteCommand(0XD410);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD411);\r
- WriteParameter(0xe4);\r
-\r
- WriteCommand(0XD412);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD413);\r
- WriteParameter(0x12);\r
-\r
- WriteCommand(0XD414);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD415);\r
- WriteParameter(0x37);\r
-\r
- WriteCommand(0XD416);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD417);\r
- WriteParameter(0x75);\r
-\r
- WriteCommand(0XD418);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD419);\r
- WriteParameter(0xa5);\r
-\r
- WriteCommand(0XD41a);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD41b);\r
- WriteParameter(0xa6);\r
-\r
- WriteCommand(0XD41c);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD41d);\r
- WriteParameter(0xd0);\r
-\r
- WriteCommand(0XD41e);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD41f);\r
- WriteParameter(0xf5);\r
-\r
- WriteCommand(0XD420);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD421);\r
- WriteParameter(0x0a);\r
-\r
- WriteCommand(0XD422);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD423);\r
- WriteParameter(0x26);\r
-\r
- WriteCommand(0XD424);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD425);\r
- WriteParameter(0x3b);\r
-\r
- WriteCommand(0XD426);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD427);\r
- WriteParameter(0x6b);\r
-\r
- WriteCommand(0XD428);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD429);\r
- WriteParameter(0x99);\r
-\r
- WriteCommand(0XD42a);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD42b);\r
- WriteParameter(0xdd);\r
-\r
- WriteCommand(0XD42C);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD42D);\r
- WriteParameter(0x10);\r
-\r
- WriteCommand(0XD42E);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD42F);\r
- WriteParameter(0x26);\r
-\r
- WriteCommand(0XD430);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD431);\r
- WriteParameter(0x32);\r
-\r
- WriteCommand(0XD432);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD433);\r
- WriteParameter(0x9A);\r
-\r
- //Gamma setting Green\r
- WriteCommand(0XD500);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD501);\r
- WriteParameter(0xa0);\r
-\r
- WriteCommand(0XD502);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD503);\r
- WriteParameter(0xa9);\r
-\r
- WriteCommand(0XD504);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD505);\r
- WriteParameter(0xb5);\r
-\r
- WriteCommand(0XD506);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD507);\r
- WriteParameter(0xbf);\r
-\r
- WriteCommand(0XD508);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD509);\r
- WriteParameter(0xc9);\r
-\r
- WriteCommand(0XD50a);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD50b);\r
- WriteParameter(0xdc);\r
-\r
- WriteCommand(0XD50c);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD50d);\r
- WriteParameter(0xee);\r
-\r
- WriteCommand(0XD50e);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD50f);\r
- WriteParameter(0x0a);\r
-\r
- WriteCommand(0XD510);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD511);\r
- WriteParameter(0x21);\r
-\r
- WriteCommand(0XD512);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD513);\r
- WriteParameter(0x48);\r
-\r
- WriteCommand(0XD514);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD515);\r
- WriteParameter(0x67);\r
-\r
- WriteCommand(0XD516);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD517);\r
- WriteParameter(0x97);\r
-\r
- WriteCommand(0XD518);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD519);\r
- WriteParameter(0xbe);\r
-\r
- WriteCommand(0XD51a);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD51b);\r
- WriteParameter(0xc0);\r
-\r
- WriteCommand(0XD51c);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD51d);\r
- WriteParameter(0xe1);\r
-\r
- WriteCommand(0XD51e);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD51f);\r
- WriteParameter(0x04);\r
-\r
- WriteCommand(0XD520);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD521);\r
- WriteParameter(0x17);\r
-\r
- WriteCommand(0XD522);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD523);\r
- WriteParameter(0x36);\r
-\r
- WriteCommand(0XD524);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD525);\r
- WriteParameter(0x50);\r
-\r
- WriteCommand(0XD526);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD527);\r
- WriteParameter(0x7e);\r
-\r
- WriteCommand(0XD528);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD529);\r
- WriteParameter(0xac);\r
-\r
- WriteCommand(0XD52a);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD52b);\r
- WriteParameter(0xf1);\r
-\r
- WriteCommand(0XD52C);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD52D);\r
- WriteParameter(0x20);\r
-\r
- WriteCommand(0XD52E);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD52F);\r
- WriteParameter(0x38);\r
-\r
- WriteCommand(0XD530);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD531);\r
- WriteParameter(0x43);\r
-\r
- WriteCommand(0XD532);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD533);\r
- WriteParameter(0x9A);\r
-\r
- //Gamma setting Blue\r
- WriteCommand(0XD600);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD601);\r
- WriteParameter(0x50);\r
-\r
- WriteCommand(0XD602);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD603);\r
- WriteParameter(0x53);\r
-\r
- WriteCommand(0XD604);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD605);\r
- WriteParameter(0x73);\r
-\r
- WriteCommand(0XD606);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD607);\r
- WriteParameter(0x89);\r
-\r
- WriteCommand(0XD608);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD609);\r
- WriteParameter(0x9f);\r
-\r
- WriteCommand(0XD60a);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD60b);\r
- WriteParameter(0xc1);\r
-\r
- WriteCommand(0XD60c);\r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XD60d);\r
- WriteParameter(0xda);\r
-\r
- WriteCommand(0XD60e);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD60f);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD610);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD611);\r
- WriteParameter(0x23);\r
-\r
- WriteCommand(0XD612);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD613);\r
- WriteParameter(0x50);\r
-\r
- WriteCommand(0XD614);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD615);\r
- WriteParameter(0x6f);\r
-\r
- WriteCommand(0XD616);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD617);\r
- WriteParameter(0x9f);\r
-\r
- WriteCommand(0XD618);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD619);\r
- WriteParameter(0xc5);\r
-\r
- WriteCommand(0XD61a);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD61b);\r
- WriteParameter(0xc6);\r
-\r
- WriteCommand(0XD61c);\r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XD61d);\r
- WriteParameter(0xe3);\r
-\r
- WriteCommand(0XD61e);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD61f);\r
- WriteParameter(0x08);\r
-\r
- WriteCommand(0XD620);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD621);\r
- WriteParameter(0x16);\r
-\r
- WriteCommand(0XD622);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD623);\r
- WriteParameter(0x2b);\r
-\r
- WriteCommand(0XD624);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD625);\r
- WriteParameter(0x4d);\r
-\r
- WriteCommand(0XD626);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD627);\r
- WriteParameter(0x6f);\r
-\r
- WriteCommand(0XD628);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD629);\r
- WriteParameter(0x8c);\r
-\r
- WriteCommand(0XD62a);\r
- WriteParameter(0x02);\r
-\r
- WriteCommand(0XD62b);\r
- WriteParameter(0xd6);\r
-\r
- WriteCommand(0XD62C);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD62D);\r
- WriteParameter(0x12);\r
-\r
- WriteCommand(0XD62E);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD62F);\r
- WriteParameter(0x28);\r
-\r
- WriteCommand(0XD630);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD631);\r
- WriteParameter(0x3e);\r
-\r
- WriteCommand(0XD632);\r
- WriteParameter(0x03);\r
-\r
- WriteCommand(0XD633);\r
- WriteParameter(0x9A);\r
-\r
- WriteCommand(0XBA00); \r
- WriteParameter(0x14);\r
-\r
- WriteCommand(0XBA01); \r
- WriteParameter(0x14);\r
-\r
- WriteCommand(0XBA02); \r
- WriteParameter(0x14);\r
-\r
- WriteCommand(0XBF00); \r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XB300); \r
- WriteParameter(0x07);\r
-\r
- WriteCommand(0XB301); \r
- WriteParameter(0x07);\r
-\r
- WriteCommand(0XB302); \r
- WriteParameter(0x07);\r
-\r
- WriteCommand(0XB900); \r
- WriteParameter(0x25);\r
-\r
- WriteCommand(0XB901); \r
- WriteParameter(0x25);\r
-\r
- WriteCommand(0XB902); \r
- WriteParameter(0x25);\r
-\r
-\r
-\r
- WriteCommand(0XBC01); \r
- WriteParameter(0xA0);\r
-\r
- WriteCommand(0XBC02); \r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XBD01); \r
- WriteParameter(0xA0);\r
-\r
- WriteCommand(0XBD02); \r
- WriteParameter(0x00);\r
-\r
-\r
- WriteCommand(0XF000); \r
- WriteParameter(0x55);\r
-\r
- WriteCommand(0XF001); \r
- WriteParameter(0xAA);\r
-\r
- WriteCommand(0XF002); \r
- WriteParameter(0x52);\r
-\r
- WriteCommand(0XF003); \r
- WriteParameter(0x08);\r
-\r
- WriteCommand(0XF004); \r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XB100); \r
- WriteParameter(0xCC);\r
-\r
- WriteCommand(0XBC00); \r
- WriteParameter(0x05);\r
-\r
- WriteCommand(0XBC01); \r
- WriteParameter(0x05);\r
-\r
- WriteCommand(0XBC02); \r
- WriteParameter(0x05);\r
-\r
-\r
- WriteCommand(0XBD02); \r
- WriteParameter(0x07);\r
- WriteCommand(0XBD03); \r
- WriteParameter(0x31);\r
-\r
- WriteCommand(0XBE02); \r
- WriteParameter(0x07);\r
- WriteCommand(0XBE03); \r
- WriteParameter(0x31);\r
-\r
- WriteCommand(0XBF02); \r
- WriteParameter(0x07);\r
- WriteCommand(0XBF03); \r
- WriteParameter(0x31);\r
-/*\r
- WriteCommand(0XFF00); \r
- WriteParameter(0xAA);\r
- WriteCommand(0XFF01); \r
- WriteParameter(0x55);\r
- WriteCommand(0XFF02); \r
- WriteParameter(0x25);\r
- WriteCommand(0XFF03); \r
- WriteParameter(0x01);\r
-*/\r
-/*****************************************************************/\r
- WriteCommand(0XF000);WriteParameter(0x55);//ENABLE High Mode\r
- WriteCommand(0XF001);WriteParameter(0xAA);\r
- WriteCommand(0XF002);WriteParameter(0x52);\r
- WriteCommand(0XF003);WriteParameter(0x08);\r
- WriteCommand(0XF004);WriteParameter(0x00);\r
- \r
- WriteCommand(0XB400);WriteParameter(0x10);\r
- \r
- WriteCommand(0XFF00);WriteParameter(0xAA);//ENABLE LV3 \r
- WriteCommand(0XFF01);WriteParameter(0x55);\r
- WriteCommand(0XFF02);WriteParameter(0x25);\r
- WriteCommand(0XFF03);WriteParameter(0x01);\r
-\r
- WriteCommand(0XF900);WriteParameter(0x14);//ÖеÈÔöÑÞÏÔʾЧ¹û\r
- WriteCommand(0XF901);WriteParameter(0x00);\r
- WriteCommand(0XF902);WriteParameter(0x0A);\r
- WriteCommand(0XF903);WriteParameter(0x11);\r
- WriteCommand(0XF904);WriteParameter(0x17);\r
- WriteCommand(0XF905);WriteParameter(0x1D);\r
- WriteCommand(0XF906);WriteParameter(0x24);\r
- WriteCommand(0XF907);WriteParameter(0x2A);\r
- WriteCommand(0XF908);WriteParameter(0x31);\r
- WriteCommand(0XF909);WriteParameter(0x37);\r
- WriteCommand(0XF90A);WriteParameter(0x3D);\r
-/*\r
- WriteCommand(0XF900);WriteParameter(0x14);//¸ßµÈÔöÑÞÏÔʾЧ¹û\r
- WriteCommand(0XF901);WriteParameter(0x00);\r
- WriteCommand(0XF902);WriteParameter(0x0D);\r
- WriteCommand(0XF903);WriteParameter(0x1A);\r
- WriteCommand(0XF904);WriteParameter(0x26);\r
- WriteCommand(0XF905);WriteParameter(0x33);\r
- WriteCommand(0XF906);WriteParameter(0x40);\r
- WriteCommand(0XF907);WriteParameter(0x4D);\r
- WriteCommand(0XF908);WriteParameter(0x5A);\r
- WriteCommand(0XF909);WriteParameter(0x66);\r
- WriteCommand(0XF90A);WriteParameter(0x73);\r
-*/\r
-/******************************************************************/\r
- WriteCommand(0X3500); \r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0X3a00); \r
- \r
-if(OUT_FACE == OUT_P888)\r
- WriteParameter(0x70); //24bit\r
-else if(OUT_FACE == OUT_P666)\r
- WriteParameter(0x60);//18bit\r
-\r
- WriteCommand(0X3600); \r
- WriteParameter(0x00);//R<->B\r
-\r
- WriteCommand(0X2000); //\r
-\r
- WriteCommand(0X1100); \r
- usleep_range(120*1000, 120*1000);\r
-\r
- WriteCommand(0X2900); \r
-\r
- usleep_range(100*1000, 100*1000);\r
- WriteCommand(0X2C00); \r
-}\r
-\r
-\r
-void resume_nt35510(void)\r
-{\r
- WriteCommand(0X1100); \r
- msleep(120);\r
-\r
- WriteCommand(0X1300); \r
-\r
- WriteCommand(0XF000); \r
- WriteParameter(0x55);\r
-\r
- WriteCommand(0XF001); \r
- WriteParameter(0xAA);\r
-\r
- WriteCommand(0XF002); \r
- WriteParameter(0x52);\r
-\r
- WriteCommand(0XF003); \r
- WriteParameter(0x08);\r
-\r
- WriteCommand(0XF004); \r
- WriteParameter(0x01);\r
-\r
-\r
- /**************/\r
- WriteCommand(0XBA00); \r
- WriteParameter(0x14);\r
-\r
- WriteCommand(0XBA01); \r
- WriteParameter(0x14);\r
-\r
- WriteCommand(0XBA02); \r
- WriteParameter(0x14);\r
-\r
- WriteCommand(0XBF00); \r
- WriteParameter(0x01);\r
-\r
- WriteCommand(0XB300); \r
- WriteParameter(0x07);\r
-\r
- WriteCommand(0XB301); \r
- WriteParameter(0x07);\r
-\r
- WriteCommand(0XB302); \r
- WriteParameter(0x07);\r
-\r
- WriteCommand(0XB900); \r
- WriteParameter(0x25);\r
-\r
- WriteCommand(0XB901); \r
- WriteParameter(0x25);\r
-\r
- WriteCommand(0XB902); \r
- WriteParameter(0x25);\r
-\r
-\r
-\r
- WriteCommand(0XBC01); \r
- WriteParameter(0xA0);\r
-\r
- WriteCommand(0XBC02); \r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XBD01); \r
- WriteParameter(0xA0);\r
-\r
- WriteCommand(0XBD02); \r
- WriteParameter(0x00);\r
-\r
-\r
- WriteCommand(0XF000); \r
- WriteParameter(0x55);\r
-\r
- WriteCommand(0XF001); \r
- WriteParameter(0xAA);\r
-\r
- WriteCommand(0XF002); \r
- WriteParameter(0x52);\r
-\r
- WriteCommand(0XF003); \r
- WriteParameter(0x08);\r
-\r
- WriteCommand(0XF004); \r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0XB100); \r
- WriteParameter(0xCC);\r
-\r
- WriteCommand(0XBC00); \r
- WriteParameter(0x05);\r
-\r
- WriteCommand(0XBC01); \r
- WriteParameter(0x05);\r
-\r
- WriteCommand(0XBC02); \r
- WriteParameter(0x05);\r
-\r
-\r
- WriteCommand(0XBD02); \r
- WriteParameter(0x07);\r
- WriteCommand(0XBD03); \r
- WriteParameter(0x31);\r
-\r
- WriteCommand(0XBE02); \r
- WriteParameter(0x07);\r
- WriteCommand(0XBE03); \r
- WriteParameter(0x31);\r
-\r
- WriteCommand(0XBF02); \r
- WriteParameter(0x07);\r
- WriteCommand(0XBF03); \r
- WriteParameter(0x31);\r
-\r
- WriteCommand(0XFF00); \r
- WriteParameter(0xAA);\r
- WriteCommand(0XFF01); \r
- WriteParameter(0x55);\r
- WriteCommand(0XFF02); \r
- WriteParameter(0x25);\r
- WriteCommand(0XFF03); \r
- WriteParameter(0x01);\r
-\r
-\r
- WriteCommand(0X3500); \r
- WriteParameter(0x00);\r
-\r
- WriteCommand(0X3a00); \r
- \r
-if(OUT_FACE == OUT_P888)\r
- WriteParameter(0x70); //24bit\r
-else if(OUT_FACE == OUT_P666)\r
- WriteParameter(0x60);//18bit\r
-\r
- WriteCommand(0X3600); \r
- WriteParameter(0x00);//R<->B\r
-\r
- WriteCommand(0X2000); //\r
-\r
- WriteCommand(0X1100); \r
- msleep(120);\r
-\r
- WriteCommand(0X2900); \r
-\r
- msleep(100);\r
- WriteCommand(0X2C00); \r
-}\r
-\r
-static DEFINE_MUTEX(lcd_mutex);\r
-extern void rk29_lcd_spim_spin_lock(void);\r
-extern void rk29_lcd_spim_spin_unlock(void);\r
-\r
-static void lcd_resume(struct work_struct *work)\r
-{\r
- mutex_lock(&lcd_mutex);\r
- rk29_lcd_spim_spin_lock();\r
- if(gLcd_info)\r
- gLcd_info->io_init();\r
- init_nt35510();\r
- //resume_nt35510();//may be fail to wake up LCD some time,so change to init lcd again\r
- printk(KERN_DEBUG "%s\n",__FUNCTION__);\r
-\r
- if(gLcd_info)\r
- gLcd_info->io_deinit();\r
-\r
- rk29_lcd_spim_spin_unlock();\r
- mutex_unlock(&lcd_mutex);\r
-}\r
-\r
-static DECLARE_WORK(lcd_resume_work, lcd_resume);\r
-static struct workqueue_struct *lcd_resume_wq;\r
-\r
-static void lcd_late_resume(struct early_suspend *h)\r
-{\r
- queue_work(lcd_resume_wq, &lcd_resume_work);\r
-}\r
-\r
-static struct early_suspend lcd_early_suspend_desc = {\r
- .level = EARLY_SUSPEND_LEVEL_DISABLE_FB + 1, // before fb resume\r
- .resume = lcd_late_resume,\r
-};\r
-\r
-int init(void)\r
-{ \r
- volatile u32 data;\r
- printk("lcd init...\n");\r
- if(gLcd_info)\r
- gLcd_info->io_init();\r
- init_nt35510();\r
-\r
- if(gLcd_info)\r
- gLcd_info->io_deinit();\r
-\r
- lcd_resume_wq = create_singlethread_workqueue("lcd");\r
- register_early_suspend(&lcd_early_suspend_desc);\r
- return 0;\r
-}\r
-\r
-int standby(u8 enable) //***enable =1 means suspend, 0 means resume \r
-{\r
- if (enable) {\r
- mutex_lock(&lcd_mutex);\r
- rk29_lcd_spim_spin_lock();\r
- if(gLcd_info)\r
- gLcd_info->io_init();\r
-\r
- WriteCommand(0X2800); \r
- WriteCommand(0X1100); \r
- msleep(5);\r
- WriteCommand(0X4f00); \r
- WriteParameter(0x01);\r
- if(gLcd_info)\r
- gLcd_info->io_deinit();\r
-\r
- rk29_lcd_spim_spin_unlock();\r
- mutex_unlock(&lcd_mutex);\r
- } else {\r
- flush_workqueue(lcd_resume_wq);\r
- }\r
- return 0;\r
-}\r
-\r
-\r
+++ /dev/null
-
-#include <linux/fb.h>
-#include <linux/delay.h>
-#include "../../rk29_fb.h"
-#include <mach/gpio.h>
-#include <mach/iomux.h>
-#include <linux/rk_screen.h>
-
-void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info)
-{
- memset(screen, 0, sizeof(struct rk29fb_screen));
- screen->face = OUT_P666;
-}
+++ /dev/null
-/* empty */
+++ /dev/null
-begin 644 fb.o
-M?T5,1@$!`0````````````$`*``!``````````````#X<0``````!30`````
-M`"@`>`!U`!!`+>F?+Y#A`2!"XI(?@.$``#'C^O__&@``4N,0@+T8(#*0Y50P
-MD^4``%/C$("]"#/_+^$0@+WH(#"1Y0$`4^,!`*"3'O\OD3`PD.4\()#E`@!3
-MX0H``!HD$)#E`0!3X0<``!HL$)#E.,"0Y0P`4>$#```:(,"0Y0P`4>$#`*`!
-M'O\O`200D.4#,(+@`0"#X![_+^$P0"WI#$"=Y0<``.H,4-+G#%#`YP'`C.(#
-M`%SA^O__.@,@@N`!`(#@`4!$X@``5.,P@+T(`,"@X_;__^KP3RWI%-!-XO^O
-M`.,#4(#@/,"=Y0&P@^(X@)WE`V""X!JLH.$#D*#A>J#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@!)")X`1PA^`-@.`3"```&M`@QN$$4(7@!""2X,0_H^#P
-M(,;A``!8XPD0H.$+`*#AX/__&@``6.,+`*#A!8"@`?[__^L```#J$H#@XP@`
-MH.'XC[WH``````$`H.$`$)_E_O__Z@`````00"WI`""1Y20PG^4",8/@%""3
-MY0``4N,#```*Q#""XA`0G^4$()+E_O__ZP``H.,0@+WH`````%T```#X3RWI
-M`:"@X0"`H.'^___K`&!0X@H```K$,)_EG#"3Y0``4^,&```*"`"@X;00G^4$
-M(*#C_O__ZP``4.(!`*`3````Z@``H.,!<'#B`'"@,P``5N,`<*`#``!7XQT`
-M``H`0*#C@)"?Y01PH.$!L(;B!%"9YP@`H.$&(*#A!$"$X@`05>((```*`##5
-MY0``4^,%```*_O__ZP``4.,"```:!C#5YSH`4^,+<(4`@`!4X^[__QH``%?C
-M!P"@`04```H'`*#A)!"?Y0,@H./^___K`0!PX@``H#,``%KC`'"*%?B/O>@`
-M````Q@```*````#+````<T`MZ010D.4?`%7C,0``BL@@G^4%(8+@%$"2Y0``
-M5.$L```:_O__ZP``4.,2`.`#*0``"@@0C>(.`*#C"$`AY0T0H.'^___K`&"@
-MX0P`A.+^___K``!6XQX``!JD`93E``!0XP,```J\,93E`0`3XP````K^___K
-MA0^$X@!@H./^___K5#"?Y00`H.$%$8/@("&3Y11@@>4!($+B("&#Y?[__^LX
-M,)_E'1:%XP``D^7^___K"!"-X@8`H.,(0"'E#1"@X?[__^L$`*#A&/S_ZP8`
-MH.$```#J%0#@XWR`O>@``````````'!`+>DD0)_E`%"@X00`H.'^___K!0"@
-MX;[__^L`4*#A!`"@X?[__^L%`*#A<("]Z`````#P3RWI`$"@XX"1G^4\T$WB
-M`+"@X03`H.$L$(WE,""-Y00PF><``%/C3P``"@@@D^4"!Q+C3```"DA2D^4`
-M`%7C``!;$P"@H!,!H*`#!!"@$2B@C14I```:+0``Z@@@E.4'8(7@##"@X20!
-MG^4T((WE!$"6Z02@E.4`X(WE-."=Y03`C>4,P(WE%,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E5!"=Y08`H.$,<)WE_O__Z_@1G^67``K@"@"@X?[__^OH
-M$9_E`("@X0H`H.'^___K`0"@X?H?H./^___K%,"=Y0<PH.'_$*#CS"&?Y4`0
-MC>@`H*#A!0"@X?[__^MD,)WE``!3XP!@H.'_<&#B!@``"@``A>`'$*#A"#"@
-MX9PAG^4`H(WE_O__ZS```.H``%CC!@``"@<0H.$(,*#A``"%X'PAG^7^___K
-M`&"&X`=P8.`*,*#A!@"%X`<0H.%D(9_E_O__ZU@PG>4``%/C!F"`X`=P8.`&
-M`(4`!Q"@`4@AGP41```*`P!3XP8`A0`'$*`!."&?!0P```H!`%/C!`!3$P``
-MH!,!`*`#!@"%``<0H`$<(9\%!```"@(`4^,#```:$"&?Y08`A>`'$*#A_O__
-MZV`PG>4!`!/C!```"@9@@.`'$&#@\""?Y08`A>#^___KZ`"?Y040H.'^___K
-M!0"@X?[__^L8,)WE^A^@XQP`G>4$,(3E_O__ZP`0H.%X`)_E_O__ZV`PG>4\
-M<)WE.&"=Y0$@$^)(4)WE1,"=Y300G>5`@)WE+#"4Y1APA.4#,,/C%("$Y2PP
-MA.4!,(,3`C"#`R1@A.4<4(3E(,"$Y2@0A.4L,(05+#"$!1``A.4``*`3`@"@
-M`6S0C>+PC[WHAP(``*L"``#4`@``#@,```#*FCMP#@``X`0'`'!D"`"`.`$`
-M0$(/`)#0`P``````-P,``%0#``"#`P``A@,``(T#``"/`P``D0,``),#``"5
-M`P``F`,``!-`+>D`0*#C?#"?Y000H.$$(*#A=`"?Y0!`C>7^___K;,"?Y000
-MH.$=`*#C`2R@XU@PG^4`P(WE_O__ZP0`4.$"```*3`"?Y1T0H./^___K1$"?
-MY0``H.-`$)_E!""@X?[__^L!"G#C`!"@X0``A.4#``":*`"?Y?[__^L`,*#C
-M`#"$Y0``H.,<@+WH$````&0```!X````9P````````"+````E````!!`+>D`
-M0%#B&```"@`PU.4``%/C%0``"G@0G^4&(*#C_O__ZP``4.,2```::#"?Y0$@
-MH..<((/E#```ZEPPG^4`0(/E"0``Z@,!D><#(:#A`3"#X@``4.,\,)\%`C"#
-M`*!`@P4!```*(`!3X_7__QH!`*#C$("]Z#H0H.,$`*#A_O__ZP``4.,`,*`3
-M$!"?%>S__QKH___JOP``````````````H```````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M`````````````````````````````````````(#`X/#X_/[_`````0,`````
-M```"````+`$``#`!```T`0`````````````$````.`$``$`!``!(`0``````
-M```````0````@`$``*`!``#``0`````````````(````4`$``&`!``!P`0``
-M``````````!&````@`(``)`!```IFP``*````!@````G````"0```&`````"
-M`````````````````````````#P```"``@``X`$``"F;```H````&````"``
-M```+````8`````(`````````````````````````.````"`#``!8`@``@6P`
-M`(`````8````%@````$```!(`````@````````````````````````!7````
-M``0````#``#_5@``.````!@````A````"````*`````(``````````$`````
-M`````````%4```"``@``D`$```)\``!@````(````"D````!````0`````,`
-M```"````````````````````2````(`"``#@`0```GP``)`````H````'@``
-M``@````H`````P````````````````````````!+````@`(``.`!```"?```
-M>````!`````0`````0```$`````#`````````````````````````#P````@
-M`P``6`(``*AA``!8````*````!<````!````@`````0````#````````````
-M````````50```(`"``#@`0``@6P``%`````X````&0````$````X`````P``
-M``````````````````````!9````@`0``&`#```8/```8````!````!N````
-M`0```-@````*``````````$``````````````$@````@`P``6`(``"!.``!`
-M````.````!<````E````>`````8````#````````````````````/``````$
-M`````P``&#P``*@````(````'0````,```"0````!@``````````````````
-M``````!D````@`(``.`!``!*50``8````"`````D````"````&`````&````
-M`````````````````````#P```"`!```8`,``',K``#0````0````!`````$
-M``````$```@`````````````````````````50```"`#``!8`@``3$```*``
-M``!`````)````!````!`````!0````````````````````````!&``````0`
-M```#```5-```D````!@````=`````P```(@````&````````````````````
-M`````%<`````!0````0``-0P```X````$````(`````!````V`````P`````
-M`````0``````````````9````"`#``!8`@``%3@``*````!`````'@````0`
-M``!`````!@````````````````````````!,``````0````#``#T+0``T```
-M``@````D````$````'@````#`````````````````````````$8```"`!```
-M8`,``'4J``!J````.````!0````!````H`````H`````````````````````
-M````/0`````%````!```@B,``,@````P````&@````$```"X`````P``````
-M```````````````````\````>`4``!H$```K)```B````"@````-`````0``
-M`'`````#`````````````````````````$L```!X!0``&@0``!8<``!X````
-M.````!<````*````<`````T````#````````````````````/````'@%```:
-M!```*R0``(`````H````#`````````!P`````P````,`````````````````
-M``!5``````0````#``!_)P``P````"`````B````#@```*`````&````````
-M`````````````````$X```"`!```8`,``((C``#D````6````"``````````
-M5`````P`````````````````````````1@`````%````!```X1X``.`````@
-M````'`````@```"@````"``````````````````````````\````0`8``+`$
-M```<&```,`$``$`````N`````0```,`````#`````P``````````````````
-M`%0```"`!```8`,``.\<``"X````.`$``"``````````@`````P`````````
-M````````````````2@`````%````!```[QP````!```@````(@````,```"0
-M`````P````````````````````````!D``````0````#``#2(0``P````"``
-M```5`````P```,`````*`````````````````````````$P`````!0````0`
-M`.\<``#X````(````"(````#````:`````,`````````````````````````
-M1@```$`&``"P!```JQ0``#`!``!`````+@````$```#``````P``````````
-M``````````````!D````@`0``&`#``!@'```X````"`````1`````@```(``
-M```3`````````````````````````%4`````!0````0``,T8``#@````0```
-M`"P````!````H`````,````#````````````````````2P```$`&``"P!```
-M2A,``#`!``!`````+@````$```#``````P````,````````````````````\
-M````D`8``!H$``#`&@``&`$``&@````>`````P```+`````&`````P``````
-M`````````````%4```!`!@``L`0``,$1```0`0``$````"4````$````P```
-M``,````#````````````````````9``````%````!```?A4````!```@````
-M&@````<```"`````#P````````````````````````!`````"`<``*`%``#[
-M$```,`$``&`````N`````0```,`````#`````P```````````````````$8`
-M```(!P``H`4``*`/```P`0``8````"X````!````P`````,````#````````
-M````````````3@`````"``"``0``P\$``#`````0````$`````$```!`````
-M`P````````````````````````!5``````(``(`!``".L0``,````!`````0
-M`````0```$`````#`````````````````````````$8```!``0``R````%`V
-M`0`0````$````!0````$````,`````$``````````@``````````````/```
-M`$`!``#P````4#8!`!`````0````$`````4````P`````0`````````"````
-M``````````!(````0`$``/`````$^```$````!`````0````!````#`````"
-M``````````(``````````````#@```"0`0``+`$```/9``!`````$`````H`
-M```!````(`````$``````````@``````````````/````)`!```L`0``4,,`
-M`#`````0````"P````$```!``````@`````````"``````````````!(````
-MD`$``"P!``!`G```(````!@````+````$P```$`````#``````````(`````
-M`````````#@```#@`0``+`$``&"T``!0````$`````H````!````*`````$`
-M`````````@``````````````/````.`!```L`0``@J,``#@````0````"P``
-M``$```!0`````@`````````"```````````````_````X`$``"P!``!`G```
-M.````!`````+`````0```%`````"``````````(``````````````$@```#@
-M`0``+`$``&J"```H````&`````L````3````4`````,``````````@``````
-M````````/````(`'``"P!```.10``(````!0`0```0```"8```#0`````P``
-M``,````````````````````\````@`0````#``#?-@``G@```!H````=````
-M`P```(@````&`````P```````````````````#P```!6!0````,``.XU``!X
-M````"@````X````#````(`````4`````````````````````````/``````%
-M```@`P``$"\``,@```!`````&`````$```"(`````P``````````````````
-M```````R````T`(``$`"``!:(0$`0````!`````G````!0```$`````%````
-M``````$``````````````#(````@`P``"`(``,?E``"0````0````$@````<
-M````4`````4``````````0``````````````/````&`#``#@`0``@6P```$`
-M```!`````0````$```````````````````````````````0%!@<'"`D*````
-M`*@#L8"H````L+"H@`````#8`````````!,!````````8P`````````S````
-M`````%8`````````KP```'9I9&5O/0```````'$```!F8B5D`"TM+2TM+2TM
-M+2TM+2TM+2TM+2TM+2TM+2TM+2TM+5)+,CDP-B!N;W0@<W5P;W)T('1H:7,@
-M<F5S;VQU=&EO;BTM+2TM+2TM+2TM+2TM+2TM+2TM+2TM"@`E9"`E<PH`9F(`
-M=6YA8FQE('1O(&=E="!M86IO<B`E9"!F;W(@9F(@9&5V<PH`9W)A<&AI8W,`
-M/#0^56YA8FQE('1O(&-R96%T92!F8B!C;&%S<SL@97)R;F\@/2`E;&0*`&]F
-M;VYL>0!O9F9B`&]F9@`\-SYC:&5C:VEN9R!G96YE<FEC("@E;&QX("5L;'@I
-M('9S(&AW("@E;&QX("5L;'@I"@`\-CYF8CH@8V]N9FQI8W1I;F<@9F(@:'<@
-M=7-A9V4@)7,@=G,@)7,@+2!R96UO=FEN9R!G96YE<FEC(&1R:79E<@H`/#,^
-M)7,Z(&5N86)L92!#3TY&24=?1D)?0DE'7T5.1$E!3B!T;R!S=7!P;W)T('1H
-M:7,@9G)A;65B=69F97(*`"9F8E]I;F9O+3YL;V-K`"9F8E]I;F9O+3YM;5]L
-M;V-K`#PT/E5N86)L92!T;R!C<F5A=&4@9&5V:6-E(&9O<B!F<F%M96)U9F9E
-M<B`E9#L@97)R;F\@/2`E;&0*`#PT/F1E=&5C=&5D(&9B7W-E=%]P87(@97)R
-M;W(L(&5R<F]R(&-O9&4Z("5D"@`E9`H`)7,*`"5D+"5D"@`E8SHE9'@E9"5C
-M+25D"@!B:71S7W!E<E]P:7AE;`!B;&%N:P!C;VYS;VQE`&-U<G-O<@!M;V1E
-M`&UO9&5S`'!A;@!V:7)T=6%L7W-I>F4`;F%M90!S=')I9&4`<F]T871E`'-T
-M871E`#PV/F9B8W9T.B!);G9A;&ED(&EN<'5T('!A<F%M971E<G,*`#PV/F9B
-M8W9T.B!2969R97-H(')A=&4@;F]T($-65"!S=&%N9&%R9`H`/#8^9F)C=G0Z
-M(#8P2'H@<F5F<F5S:"!R871E(&%D=FES960@9F]R(')E9'5C960@8FQA;FMI
-M;F<*`#PV/F9B8W9T.B!!<W!E8W0@<F%T:6\@;F]T($-65"!S=&%N9&%R9`H`
-M9F)C=G0Z("5D>"5D0"5D.B!#5E0@3F%M92`M(`!.;W0@82!#5E0@<W1A;F1A
-M<F0@+2`E9"XE,#-D($UE9V$@4&EX96P@26UA9V4*`"5D`"XE,#-D30`S`#0`
-M.0!!`"U2`#PV/B5S"@```````$L`````````@P`````````>``````````8!
-M````````\`````````#/````````````````````F@```&9B7V=E=%]O<'1I
-M;VYS`&9B7W-E=%]S=7-P96YD`&9B7V=E=%]B=69F97)?;V9F<V5T`&9B7W!A
-M;E]D:7-P;&%Y`&9B7V)L86YK`&9B7W-E=%]V87(`9F)?<VAO=U]L;V=O`')E
-M9VES=&5R961?9F(`;G5M7W)E9VES=&5R961?9F(`=6YR96=I<W1E<E]F<F%M
-M96)U9F9E<@!R96=I<W1E<E]F<F%M96)U9F9E<@!R96UO=F5?8V]N9FQI8W1I
-M;F=?9G)A;65B=69F97)S`&9B7V-L87-S`&9B7W!A9%]U;F%L:6=N961?8G5F
-M9F5R`&9B7W!A9%]A;&EG;F5D7V)U9F9E<@!L;V-K7V9B7VEN9F\`9F)?9V5T
-M7V-O;&]R7V1E<'1H`&9B7V1E<W1R;WE?;6]D961B`&9B7W9A;&ED871E7VUO
-M9&4`9F)?9V5T7VUO9&4`9F)?961I9%]A9&1?;6]N<W!E8W,`9F)?961I9%]T
-M;U]M;VYS<&5C<P!F8E]P87)S95]E9&ED`&9B7V9I<FUW87)E7V5D:60`9F)?
-M:6YV97)T7V-M87!S`&9B7V1E9F%U;'1?8VUA<`!F8E]S971?8VUA<`!F8E]C
-M;W!Y7V-M87``9F)?9&5A;&QO8U]C;6%P`&9B7V%L;&]C7V-M87``9G)A;65B
-M=69F97)?86QL;V,`9G)A;65B=69F97)?<F5L96%S90!F8E]F:6YD7VUO9&5?
-M8W9T`&9B7V9I;F1?;6]D90!F8E]V:61E;VUO9&5?=&]?;6]D96QI<W0`9F)?
-M9FEN9%]N96%R97-T7VUO9&4`9F)?9FEN9%]B97-T7VUO9&4`9F)?;6%T8VA?
-M;6]D90!F8E]A9&1?=FED96]M;V1E`&9B7VUO9&5?:7-?97%U86P`9F)?=F%R
-M7W1O7W9I9&5O;6]D90!F8E]V:61E;VUO9&5?=&]?=F%R`&9B7V9I;F1?8F5S
-M=%]D:7-P;&%Y`&9B7V1E<W1R;WE?;6]D96QI<W0`9F)?;6]D95]O<'1I;VX`
-M`````$(`````````#P````````",`0```````%4!````````.`$```````!^
-M`0```````$D!````````:@$````````F`0```````)T!````````U@$`````
-M``"]`0```````*T!````````R0$```````#F`0```````/0!````````!@(`
-M```````X`@```````(8"````````40(````````:`@```````/D"````````
-M>`(```````#E`@```````)<"````````*P(```````"H`@```````-`"````
-M````O`(```````!F`@``![$!@;"P7X0``````````+"PJ(`X````L+"P@)0`
-M``"PL*F`T````+"O!("<`0``L+"L@#@"``"PL+"`2`(``+"PJ8"(`@``L+"N
-M@*@#``"PL*B`Z`,``+"PJH`\!```L+"H@)@$``"PL+"`I`0``+"PJH#8!```
-ML+"L@!`&````````H`<``*D'L8#\!P``L*D$@&0(``"PL*B`$`H``*\'L8#H
-M"P``KPBQ@(P-``"PL+"`G`T``+"PJ(#8#0``KPBQ@,P.``"J`[&`M`\``+"P
-MJH#H#P``L*\.@(01``"PL*R`P!$``+"K$H#@$P``KS\4@'`6``"L/PF`>!P`
-M`+"PL("\'```L*\X@,P=``!?A!Z`E!X``+"PJH`P(```L*\4@`PG``"PL+"`
-M%"<``+"PL(`8)P``L+"P@!PG``"PL+"`("<``+"PL(`H)P``KPBQ@*0H``"P
-ML+"`K"@``+!?A(#,*0``L+"P@`PJ``"PL*Z`<"L``+"PK(!(+```L*\$@#0M
-M``"PL*B`>"T``+"PK(",+@``L*L&@(PP``"PL+"`E#```+"PL("<,```L+"P
-M@*0P``"PL+"`K#```+"PL("T,```L+"P@+PP``"PL*J`%#$``*H#L8!@,0``
-ML+"H@(PQ``"PL*B`N#$``+"PJ(#D,0``L+"H@`PR``"H`[&`0#(``*@#L8!T
-M,@``J@^Q@.`R``"PL*R`)#,``+"PJ(!8,P``L+"H@(0S``"PL*J`U#,``+"K
-M*(`P-```7X0J@,PT``"PJRB`*#4``%^$*H#4-0``K`.Q@*PV``"N/P&`:#<`
-M`*P#L8#8-P``L+"J@&PX``"PL*J`K#@``+"PJ(#(.```L+"J@'PY``"PL*J`
-M=#H``+"PL(#L.@``L+"P@*P[``"PL*R`0#P``+!?A(#H/```L*L.@$`]``!?
-MA"B`/#X``+"PK("4/@``L+"N@`0_``"PL*R`H#\``+"PK(#H/P``L*\:@-Q%
-M``"PKQJ``0````0````$````+@(``*0!`````````````#T"``"D`0``````
-M``````!#`@``I`$`````````````2P(``*0!`````````````%("``"D`0``
-M``````````!7`@``I`$`````````````70(``*0!`````````````&$"``"D
-M`0````````````!N`@``)`$`````````````<P(``"0!`````````````'H"
-M``"D`0````````````"!`@``I`$`````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```"!`@-$"!`(```````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M````````````````````````````````````````````````````````````
-M```````````````#!TL0"$`Y"0``JJH``*JJ``"JJ@``JJI55?__``"JJE55
-M__\``*JJ557__P``````````JJJJJJJJJJH`````JJJJJ@````!55:JJ``"J
-MJ@``JJH``*JJ``"JJ@``````````JJJJJJJJJJI5555555555?__________
-M`````*JJJJH`````556JJE55557_____55555?____\``*JJ``"JJ@``JJH`
-M`*JJ557__U55__]55?__557__P4$!@P0($!,!PD+*1\S1U<`````````````
-M````1T-#.B`H1TY5*2`T+C0N,```1T-#.B`H1TY5*2`T+C0N,```1T-#.B`H
-M1TY5*2`T+C0N,```1T-#.B`H1TY5*2`T+C0N,```1T-#.B`H1TY5*2`T+C0N
-M,```1T-#.B`H1TY5*2`T+C0N,`!!*@```&%E86)I``$@````!3<M00`&"@=!
-M"`$2!!0!%0$7`Q@!&0$:`AX$`"YS>6UT86(`+G-T<G1A8@`N<VAS=')T86(`
-M+G)E;"YT97AT`"YR96PN:6YI="YT97AT`"YR96PN<F]D871A`"Y!4DTN97AT
-M86(N:6YI="YT97AT`"YR96PN05)-+F5X:61X+FEN:70N=&5X=``N<F5L7U]?
-M:W-Y;71A8BMF8E]P861?=6YA;&EG;F5D7V)U9F9E<@`N<F5L7U]?:W-Y;71A
-M8BMF8E]G971?8V]L;W)?9&5P=&@`+G)E;%]?7VMS>6UT86(K<F5G:7-T97)E
-M9%]F8@`N<F5L7U]?:W-Y;71A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4M<W1A8VL`````````````````````````````````````````
-M```````````````?`````0````8`````````-````*1,``````````````0`
-M````````&P````D``````````````+B$``#(#```=@````$````$````"```
-M`$H````!````!@````````#83```4`$`````````````!``````````E````
-M"0``````````````@)$``)````!V`````P````0````(````.`````$````"
-M`````````"A.``!X#@`````````````$`````````#0````)````````````
-M```0D@``V````'8````%````!`````@```!``````0````(`````````H%P`
-M``````````````````$`````````60````$``'""`````````*!<```0````
-M`P`````````$`````````%4````)``````````````#HD@``&````'8````(
-M````!`````@```!R`````0````(`````````L%P```@```````````````0`
-M````````;@````D```````````````"3```0````=@````H````$````"```
-M`)D````!`````@````````"X7```"```````````````!`````````"5````
-M"0``````````````$),``!````!V````#`````0````(````NP````$````"
-M`````````,!<```(```````````````$`````````+<````)````````````
-M```@DP``$````'8````.````!`````@```#8`````0````(`````````R%P`
-M``@```````````````0`````````U`````D``````````````#"3```0````
-M=@```!`````$````"````/8````!`````@````````#07```"```````````
-M````!`````````#R````"0``````````````0),``!````!V````$@````0`
-M```(````$@$```$````"`````````-A<```(```````````````$````````
-M``X!```)``````````````!0DP``$````'8````4````!`````@````]`0``
-M`0````(`````````X%P```<```````````````$`````````3@$```$````"
-M`````````.A<```(```````````````$`````````$H!```)````````````
-M``!@DP``$````'8````7````!`````@```!K`0```0```#(`````````\%P`
-M`)\#``````````````$````!````?@$```$````"`````````)!@```(````
-M```````````$`````````'H!```)``````````````!PDP``$````'8````:
-M````!`````@```"8`0```0````(`````````F&````@```````````````0`
-M````````E`$```D``````````````("3```0````=@```!P````$````"```
-M`+X!```!`````@````````"@8```"```````````````!`````````"Z`0``
-M"0``````````````D),``!````!V````'@````0````(````X@$```$````"
-M`````````*A@```(```````````````$`````````-X!```)````````````
-M``"@DP``$````'8````@````!`````@```#^`0```0````(`````````L&``
-M``@```````````````0`````````^@$```D``````````````+"3```0````
-M=@```"(````$````"````","```!`````@````````"X8```"```````````
-M````!``````````?`@``"0``````````````P),``!````!V````)`````0`
-M```(````.P(```$````"`````````,!@```(```````````````$````````
-M`#<"```)``````````````#0DP``$````'8````F````!`````@```!9`@``
-M`0````(`````````R&````@```````````````0`````````50(```D`````
-M`````````."3```0````=@```"@````$````"````'D"```!`````@``````
-M``#08```"`,``````````````0````````"/`@```0````(`````````V&,`
-M``@```````````````0`````````BP(```D``````````````/"3```0````
-M=@```"L````$````"````*<"```!`````@````````#@8P``"```````````
-M````!`````````"C`@``"0```````````````)0``!````!V````+0````0`
-M```(````Q0(```$````"`````````.AC```(```````````````$````````
-M`,$"```)```````````````0E```$````'8````O````!`````@```#E`@``
-M`0````(`````````\&,```@```````````````0`````````X0(```D`````
-M`````````""4```0````=@```#$````$````"`````D#```!`````@``````
-M``#X8P``"```````````````!``````````%`P``"0``````````````,)0`
-M`!````!V````,P````0````(````*0,```$````"``````````!D```(````
-M```````````$`````````"4#```)``````````````!`E```$````'8````U
-M````!`````@```!&`P```0````(`````````"&0```@```````````````0`
-M````````0@,```D``````````````%"4```0````=@```#<````$````"```
-M`&$#```!`````@`````````09```"```````````````!`````````!=`P``
-M"0``````````````8)0``!````!V````.0````0````(````A`,```$````"
-M`````````!AD```(```````````````$`````````(`#```)````````````
-M``!PE```$````'8````[````!`````@```"E`P```0````(`````````(&0`
-M``@```````````````0`````````H0,```D``````````````("4```0````
-M=@```#T````$````"````,0#```!`````@`````````H9```"```````````
-M````!`````````#``P``"0``````````````D)0``!````!V````/P````0`
-M```(````XP,```$````"`````````#!D```(```````````````$````````
-M`-\#```)``````````````"@E```$````'8```!!````!`````@```#^`P``
-M`0````(`````````.&0```@```````````````0`````````^@,```D`````
-M`````````+"4```0````=@```$,````$````"````!T$```!`````@``````
-M``!`9```"```````````````!``````````9!```"0``````````````P)0`
-M`!````!V````10````0````(````.00```$````"`````````$AD```(````
-M```````````$`````````#4$```)``````````````#0E```$````'8```!'
-M````!`````@```!6!````0````(`````````4&0```@```````````````0`
-M````````4@0```D``````````````."4```0````=@```$D````$````"```
-M`'<$```!`````@````````!89```"```````````````!`````````!S!```
-M"0``````````````\)0``!````!V````2P````0````(````F@0```$````"
-M`````````&!D```(```````````````$`````````)8$```)````````````
-M````E0``$````'8```!-````!`````@```#"!````0````(`````````:&0`
-M``@```````````````0`````````O@0```D``````````````!"5```0````
-M=@```$\````$````"````.($```!`````@````````!P9```"```````````
-M````!`````````#>!```"0``````````````()4``!````!V````40````0`
-M```(````!@4```$````"`````````'AD```(```````````````$````````
-M``(%```)```````````````PE0``$````'8```!3````!`````@````F!0``
-M`0````(`````````@&0```@```````````````0`````````(@4```D`````
-M`````````$"5```0````=@```%4````$````"````$@%```!`````@``````
-M``"(9```"```````````````!`````````!$!0``"0``````````````4)4`
-M`!````!V````5P````0````(````904```$````"`````````)!D```(````
-M```````````$`````````&$%```)``````````````!@E0``$````'8```!9
-M````!`````@```",!0```0````(`````````F&0```@```````````````0`
-M````````B`4```D``````````````'"5```0````=@```%L````$````"```
-M`*P%```!`````@````````"@9```"```````````````!`````````"H!0``
-M"0``````````````@)4``!````!V````70````0````(````R`4```$````"
-M`````````*AD```(```````````````$`````````,0%```)````````````
-M``"0E0``$````'8```!?````!`````@```#K!0```0````(`````````L&0`
-M``@```````````````0`````````YP4```D``````````````*"5```0````
-M=@```&$````$````"`````\&```!`````@````````"X9```"```````````
-M````!``````````+!@``"0``````````````L)4``!````!V````8P````0`
-M```(````,@8```$````"`````````,!D```(```````````````$````````
-M`"X&```)``````````````#`E0``$````'8```!E````!`````@```!/!@``
-M`0````(`````````R&0```P```````````````0`````````7@8```$``'""
-M`````````-1D``#H`@```0`````````$`````````%H&```)````````````
-M``#0E0``*`,``'8```!H````!`````@```!M!@```0````,`````````O&<`
-M`,P```````````````0`````````:08```D``````````````/B8```@`0``
-M=@```&H````$````"````'<&```!`````P````````"(:```!```````````
-M````!`````````!S!@``"0``````````````&)H```@```!V````;`````0`
-M```(````AP8```$````#`````````(QH``#P`0`````````````$````````
-M`)X&```!`````P````````!\:@``#```````````````!`````````":!@``
-M"0``````````````()H``!````!V````;P````0````(````J@8```@````#
-M`````````(AJ```0```````````````$`````````*\&```!````````````
-M``"(:@``;````````````````0````````"X!@```P``<```````````]&H`
-M`"L```````````````$`````````R`8```$``````````````!]K````````
-M```````````!`````````!$````#```````````````?:P``V`8`````````
-M`````0`````````!`````@``````````````,)H````B``!W````MP$```0`
-M```0````"0````,``````````````#"\``#<$P`````````````!````````
-M`$0"```".@``P`(``!P+`@#D`@``'`L"`!@#```<"P(`M`,``!SI`0#D`P``
-M`C@``/@#```<Z0$`(`0``!S@`0`H!```'`,"`%0$```<Z0$`A`0``!P#`@"0
-M!````C@``)0$```".@``G`0``!T#`@"@!````C@``+0$```<Z0$`S`0``!P#
-M`@`(!0``'!\"`#0%```<Z0$`I`4``!SE`0#H!0``'.`!`/`%```<`P(`#`8`
-M``(.``!P!@``'.D!`-P&```<`P(`$`<``!P#`@!,!P``',8!`'`'```<S@$`
-MF`<```(Z``"L!P``',L!`-`'```<_@$`[`<``!S^`0#T!P``'`,"`%0(```<
-M_@$`[`D``!SV`0#T"0``'/`!``0*```".@``#`H```(.``#D"@``'!T"`&`+
-M```<'`(`@`L``!SV`0"D"P``',T!`-`+```<SP$`Y`L```(Z``"H#```'!T"
-M`/P,```<S0$`*`T``!P:`@!T#0``',\!`(@-```".@``E`T``!T4`@"8#0``
-M`@,``,0-```<"`(`T`T```(Z``#4#0```@X``.0-```<&`(`#`X``!SK`0!L
-M#@``'.L!`*0.```<ZP$`O`X```(Z``#`#@```@X``,0.```".@``R`X```(.
-M``#P#@``',L!`!`/```<_@$`'`\``!P#`@!`#P``',\!`$P/```<#P(`;`\`
-M`!R_`0!\#P``'`<"`)`/```<_@$`K`\```(Z``"P#P```CP``,0/```<Z0$`
-MV`\``!P#`@#D#P```C@``(00```<\`$`1!$``!SP`0!X$0```CH``'P1```"
-M#@``@!$```(.``"<$0``'.D!`+@1```=`P(`O!$```(X``#0$0``'.D!`.P1
-M```<\`$`6!(``!SQ`0!H$@``'/$!`(@2```<Y@$`I!(``!SP`0"X$@``'`T"
-M`-02```<WP$`7!,``!SH`0!H$P``'`X"`(`3```<RP$`F!,``!S^`0"@$P``
-M'`,"`*P3```<`P(`O!,```(X``#`$P```@X``,03```".@``R!,```(\``#,
-M$P```@X``-`3```"#@``U!,```(.``#8$P```@X``-P3```"$`(`#!0``!SH
-M`0`8%```'.@!`"04```<YP$`0!0``!S^`0!4%```'`0"`&P4```<[@$`E!0`
-M`!S-`0#<%```'/8!`.@4```<]@$`!!4``!S^`0!@%0``',T!`'`5```<S0$`
-MI!4``!S-`0"P%0``'/`!`,@5```<$@(`U!4``!S,`0#@%0``'.@!``P6```<
-M#@(`3!8``!S^`0!L%@```@X``!07```<RP$`,!<``!S-`0`X%P``'-0!`$`7
-M```<`P(`K!<``!P<`@"\%P``',L!`,@7```<Z@$`X!<``!S3`0#T%P``'/D!
-M`/P7```<`P(`+!@``!S+`0!(&```',T!`%`8```<`P(`O!@``!P<`@#0&```
-M'-X!``P9```<'`(`+!D``!S+`0!4&0``'`,"`&`9```<$P(`H!D``!P<`@#`
-M&0``',L!`,P9```<Z@$`V!D``!P2`@#@&0``'/D!`.@9```<`P(`&!H``!P:
-M`@!<&@``'!P"`(@:```<RP$`H!H``!S^`0"H&@``'`,"`-P:```<&@(`(!L`
-M`!P<`@`X&P``'/8!`'@;```<'P(`H!L``!S+`0"X&P``'/X!`,`;```<RP$`
-MS!L``!SJ`0#D&P``'+H!`/@;```<^0$`!!P``!S+`0`\'```'`,"`'`<```"
-M.@``=!P```(.``"X'````CH``-P<```<S0$`\!P``!RX`0`$'0``'-,!`!0=
-M```<Z`$`*!T``!SG`0!8'0``',\!`(P=```<RP$`J!T``!S^`0"T'0``'`,"
-M`'@>```<S`$`_!X``!SV`0!<'P``',`!`"@@```".@``N"```!S?`0`T(@``
-M'!T"`$0B```<SP$`)"0``!P=`@#$)@``',\!`-0F```<SP$`W"8``!S/`0``
-M)P```CH```0G```"$`(`""<```(#``"\)P``'/@!`!0H```<^`$`("@``!SX
-M`0`T*```'/@!`)PH```".@``P"D```(Z``#$*0```CH``,@I```".@``_"D`
-M``(#````*@```@,```0J```"`P``""H```(#``"<*@``'!H"`-0J```<&@(`
-M#"L``!P:`@!4*P``'!H"`-PK```<S0$`]"L``!S-`0`,+```',T!`#0L```<
-MS0$`'"T``!S_`0!`+0``',\!`$@M```<SP$`4"T``!S/`0!8+0``',\!`)@M
-M```<X0$`L"T``!P=`@#(+0``'!T"`.`M```<'0(`!"X``!P=`@!(+@``'/\!
-M`&`N```<X0$`>"X```(#``!\+@```@,``(`N```"`P``A"X```(#``"(+@``
-M`CH``+@N```<]@$`U"X``!S7`0`0+P``'!P"`%@O```<'`(`H"\``!P<`@#P
-M+P``'!P"``PP```<]@$`(#```!S+`0!8,```',P!`&0P```<`P(`=#```!SA
-M`0"0,```'=<!`/`P```<'@(`##$```(Z```0,0```C@``"`Q```<O0$`/#$`
-M`!P,`@!$,0``'.H!`%`Q```<^P$`5#$``!SY`0!H,0``'+T!`(0Q```=PP$`
-MB#$```(.``"4,0``'+T!`+`Q```=PP$`M#$```(.``#`,0``'+T!`-PQ```=
-MPP$`X#$```(.``#L,0``'+T!``0R```=PP$`"#(```(.```4,@``'+T!`#0R
-M```<PP$`/#(```(.``!(,@``'+T!`&@R```<PP$`<#(```(.``#0,@``',,!
-M`-PR```"#@``Z#(``!R]`0`L,P``'+T!`&`S```<O0$`?#,``!W#`0"`,P``
-M`@X``)PS```<Z@$`M#,``!S3`0#(,P``'/D!`.0S```<O0$`_#,``!S-`0`,
-M-```'`P"`$`T```<O0$`9#0``!S-`0!T-```'`P"`*@T```<#`(`W#0``!R]
-M`0#T-```',T!``0U```<#`(`.#4``!R]`0!<-0``',T!`&PU```<#`(`H#4`
-M`!P,`@"H-0``'.H!`+0U```<$@(`O#4``!SY`0#@-0``'+T!`/`U```<^`$`
-M``!SJ`0!4-@``'-L!`%PV```<_`$`;#8``!P/`@"<-@``'`\"`*`V```<
-M^0$`O#8``!R]`0#4-@``'/8!`/@V```<ZP$`%#<``!S-`0`@-P``'+@!`'0W
-M```<O0$`B#<``!SJ`0"D-P``'`P"`+`W```<N@$`Q#<``!SY`0#P-P``'!8"
-M``@X```<X@$`/#@``!P>`@!H.````C@``(PX```<'0(`N#@``!S/`0#$.```
-M'<\!``0Z```<^`$`7#H``!SX`0!D.@``'/@!```]```<Z`$`##T``!SG`0#0
-M/0``'/8!`.@]```<XP$`_#T``!SC`0`,/@``'-4!`'`^```<SP$`M#X``!SG
-M`0#</@``',\!`!@_```<YP$`2#\``!S?`0"</P```A`"`,`_```<#@(`7$``
-M`!P8`@`D00``',<!`&Q!```<QP$`L$$``!S'`0!,0@``',<!`(1"```<]@$`
-MS$(``!SZ`0"80P``'.L!`*A#```<&`(`U$4```(#``#810```CP``/A%```<
-M]@$`<$8``!SP`0"<1@``'/`!`.A&```<\`$`$$<``!SX`0`D1P``'/@!`#!'
-M```<^`$`3$<``!SX`0!@1P``'`L"`'A'```<^`$`C$<``!P+`@"D1P``'/@!
-M`+A'```<"P(`]$<``!SX`0`(2```'`L"`"!(```<\`$`2$@``!SX`0!P2```
-M'/@!`)A(```<^`$`L$@``!SX`0#<2```'/@!``!)```<^`$`%$D``!SX`0!4
-M20``'/@!`(!)```<^`$`K$D``!SX`0#820``'/@!`.!)```<^`$`^$D``!SX
-M`0`P2@``'/@!`%!*```<WP$`;$H``!SX`0!\2@``'/@!`(Q*```<"P(`F$H`
-M`!SX`0"X2@``',,!`.1*```<PP$`!$L``!S#`0`@2P``',,!`(Q+```<PP$`
-MK$L``!S#`0"X2P``'/`!`,!+```<SP$`U$L``!SX`0#@2P``'/@!`$Q,```"
-M#@``4$P```(.``!43````@X``%A,```"#@``8$P```(#``!X3````A`"`'Q,
-M```"#@``@$P```(.``"$3````@X``(A,```"#@``C$P```(.``"03````@X`
-M`)1,```"#@``F$P```(.``"<3````@X``*!,```"#@``'````!S1`0`X````
-M'`8"`$P````<\`$`8````!R^`0!X````'/`!`(P````"`P``D`````(.``"4
-M`````@,``)@````"#@``G`````(\``"@`````@X``*0````"#@``R````!SK
-M`0`H`0``'!L"`$`!```"#@``1`$```(Z``!(`0```NP!`$P!```".@``````
-M``),```$`````E0```@````"20``#`````)K```4`````M`!`!@````"`0(`
-M/`````)H``!$`````L(!`'P````"]`$`@`````)E``"$`````F(``)@````"
-MAP``H`````);``"D`````E@``*P````"3P``^`````(Z``#\`````CH````!
-M```".@``$`$```(Z```4`0```CH``!@!```".@``*`$```(Z```L`0```CH`
-M`#`!```".@``0`$```(Z``!$`0```CH``$@!```".@```````"H"````````
-M`,@!``@````J`@````````+)`0`$`````A<````````"`@(`!`````(7````
-M`````MD!``0````"%P````````(2`@`$`````A<````````"Q`$`!`````(7
-M`````````O4!``0````"%P````````*[`0`$`````A<````````"TP$`!```
-M``(7`````````K<!``0````"%P````````(5`@`$`````A<````````"RP$`
-M!`````(7`````````LH!``0````"%P````````*Y`0`$`````A<````````"
-M\P$`!`````(7`````````NT!``0````"%P````````*Z`0`$`````A<`````
-M```"^P$`!`````(7`````````@`"``0````"%P````````+]`0`$`````A<`
-M```````"O`$`!`````(7`````````@H"``0````"%P````````+:`0`$````
-M`A<````````"V`$`!`````(7`````````M8!``0````"%P````````+%`0`$
-M`````A<````````"X0$`!`````(7`````````LP!``0````"%P````````+R
-M`0`$`````A<````````"_P$`!`````(7`````````N\!``0````"%P``````
-M``+2`0`$`````A<````````"%P(`!`````(7`````````ML!``0````"%P``
-M``````(.`@`$`````A<````````"W0$`!`````(7`````````OH!``0````"
-M%P````````+L`0`$`````A<````````"P0$`!`````(7`````````@\"``0`
-M```"%P````````+G`0`$`````A<````````"W`$`!`````(7`````````N@!
-M``0````"%P````````(1`@`$`````A<````````"N`$`!`````(7````````
-M`M4!``0````"%P```````"H!`````````,@!``@````J`0``$````"H!```8
-M````*@$``"`````J`0``*````"H!```P````*@$``#@````J`0``0````"H!
-M``!(````*@$``%`````J`0``6````"H!``!@````*@$``&@````J`0``<```
-M`"H!``!P`````!D"`'0````J-@``>````"H!``"`````*@$``(@````J`0``
-MD````"H!``"8````*@$``*`````J`0``J````"H!``"P````*@$``+@````J
-M`0``P````"H!``#(````*@$``-`````J`0``V````"H!``#@````*@$``.@`
-M```J`0``\````"H!``#X````*@$````!```J`0``"`$``"H!```0`0``*@$`
-M`!@!```J`0``&`$```#(`0`@`0``*@$``"@!```J`0``,`$``"H!```X`0``
-M*@$``$`!```J`0``2`$``"H!``!0`0``*@$``%`!````R`$`6`$``"H!``!@
-M`0``*@$``&@!```J`0``<`$``"H!``!X`0``*@$``(`!```J`0``B`$``"H!
-M``"0`0``*@$``)@!```J`0``F`$```#(`0"@`0``*@$``*@!```J`0``L`$`
-M`"H!``"X`0``*@$``,`!```J`0``R`$``"H!``#0`0``*@$``-@!```J`0``
-MX`$``"H!``#H`0``*@$``/`!```J`0``^`$``"H!`````@``*@$```@"```J
-M`0``$`(``"H!```8`@``*@$``"`"```J`0``*`(``"H!```P`@``*@$``#@"
-M```J`0``0`(``"H!``!(`@``*@$``%`"```J`0``6`(``"H!``!@`@``*@$`
-M`&@"```J`0``<`(``"H!``!X`@``*@$``'@"````R`$`@`(``"H!``"(`@``
-M*@$``)`"```J`0``F`(``"H!``"@`@``*@$``*@"```J`0``L`(``"H!``"X
-M`@``*@$``,`"```J`0``R`(``"H!``#0`@``*@$``-@"```J`0``X`(``"H!
-M``#@`@```,@!``0````".```"`````(X```,`````@X``!0````"5`$`&```
-M``)=`0`<`````@X``"0````"+P$`*`````)E`0`L`````@X``#0````",P$`
-M.`````(M`0`\`````@X``$0````"-0$`2`````(Q`0!,`````@X``%0````"
-M4@$`6`````)C`0!<`````@X``&0````"4`$`:`````)A`0!L`````@X``'0`
-M```"2@$`>`````)?`0!\`````@X``(0````"1P$`B`````);`0",`````@X`
-M`)0````"1`$`G`````(.``"D`````D$!`*P````"#@``M`````(^`0"X````
-M`ED!`+P````"#@``Q`````([`0#(`````CD!```````";@````````(,```$
-M`````G$````````````````````````````````````````#``$`````````
-M`````````P`#``````````````````,`!0`````````````````#``<`````
-M`````````````P`(``````````````````,`"@`````````````````#``P`
-M`````````````````P`.``````````````````,`$``````````````````#
-M`!(``````````````````P`4``````````````````,`%@``````````````
-M```#`!<``````````````````P`9``````````````````,`&@``````````
-M```````#`!P``````````````````P`>``````````````````,`(```````
-M```````````#`"(``````````````````P`D``````````````````,`)@``
-M```````````````#`"@``````````````````P`J``````````````````,`
-M*P`````````````````#`"T``````````````````P`O````````````````
-M``,`,0`````````````````#`#,``````````````````P`U````````````
-M``````,`-P`````````````````#`#D``````````````````P`[````````
-M``````````,`/0`````````````````#`#\``````````````````P!!````
-M``````````````,`0P`````````````````#`$4``````````````````P!'
-M``````````````````,`20`````````````````#`$L`````````````````
-M`P!-``````````````````,`3P`````````````````#`%$`````````````
-M`````P!3``````````````````,`50`````````````````#`%<`````````
-M`````````P!9``````````````````,`6P`````````````````#`%T`````
-M`````````````P!?``````````````````,`80`````````````````#`&,`
-M`````````````````P!E``````````````````,`9P`````````````````#
-M`&@``````````````````P!J``````````````````,`;```````````````
-M```#`&X``````````````````P!O``````````````````,`<0``````````
-M```````#`'(``````````````````P!S``````````````````,`=``!````
-M```````````$`/'_"0`````````X`````@`!`!4``````````````````0`5
-M````.`````````````$`%0```)0````````````!`!4```#0````````````
-M`0`5````G`$```````````$`%0```#@"```````````!`!@```!$`@``````
-M`````0`;````2`(``$`````"``$`%0```$@"```````````!`!4```"(`@``
-M`````````0`G````J`,``$`````"``$`%0```*@#```````````!`!@```#D
-M`P```````````0`T````Z`,``%0````"``$`%0```.@#```````````!`#\`
-M```\!```7`````(``0`5````/`0```````````$`&````)`$```````````!
-M`$L```"8!```#`````(``0`5````F`0```````````$`&````*`$````````
-M```!`!4```"D!````````````0!7````V`0``#@!```"``$`%0```-@$````
-M```````!`!@````,!@```````````0!?````$`8``)`!```"``$`%0```!`&
-M```````````!`!@```"8!P```````````0`5````H`<```````````$`%0``
-M`/P'```````````!`!4```!D"````````````0`8``````H```````````$`
-M9P```!`*``#8`0```@`!`!4````0"@```````````0`8````Y`L`````````
-M``$`<````.@+``"D`0```@`!`!4```#H"P```````````0`8````B`T`````
-M``````$`>````(P-```0`````@`!`!4```",#0```````````0`8````F`T`
-M``````````$`A0```)P-```\`````@`!`!4```"<#0```````````0`8````
-MT`T```````````$`D0````````"H`````@`#`!4``````````````````P`8
-M````C`````````````,`G````*@```"H`````@`#`!4```"H````````````
-M`P`8````0`$```````````,`%0```-@-```````````!`!@```"\#@``````
-M`````0"H````S`X``.@````"``$`%0```,P.```````````!`!@```"L#P``
-M`````````0`5````M`\```````````$`&````.0/```````````!`,(```#H
-M#P``G`$```(``0`5````Z`\```````````$`&````'@1```````````!`!4`
-M``"$$0```````````0`8````O!$```````````$`%0```,`1```````````!
-M`!@```"\$P```````````0`5````X!,```````````$`&````&P6````````
-M```!`.4```!P%@``"`8```(``0`5````<!8```````````$`&````&P<````
-M```````!`/$```!X'```1`````(``0`5````>!P```````````$`&````+@<
-M```````````!`!4```"\'````````````0`8````Q!T```````````$`^@``
-M`,P=``#(`````@`!`!4```#,'0```````````0`5````E!X```````````$`
-M&````"@@```````````!`!4````P(````````````0`8`````"<`````````
-M``$`"@$````````0`````0`%`!@`````````````````!0`:`0``$````&@`
-M```!``4`)P$``'@```!H`````0`%`"\!``#@````"0````$`!0`Z`0``[```
-M``(````!``4`10$````````,`````0!J`!@`````````````````:@!7`0``
-M``````@````!``H`&``````````````````*`'D!``#8````&`````$`*@";
-M`0````````@````!``P`&``````````````````,`+@!```3`0``$P````$`
-M*@#5`0````````@````!``X`&``````````````````.`.T!``!C````#@``
-M``$`*@`%`@````````@````!`!``&``````````````````0`!X"```S````
-M#P````$`*@`W`@````````@````!`!(`&``````````````````2`$X"``!6
-M````#0````$`*@!E`@`````````````!`'$`<0(```0``````````0!Q`'T"
-M```$``````````$`<0")`@````````@````!`!0`&``````````````````4
-M`+,"``"O````(`````$`*@#=`@````````<````!`!8`]0(````````(````
-M`0`7`!@`````````````````%P`1`P``<0```!(````!`"H`+0,````````$
-M`````0!L`!@`````````````````;`!$`P````````@````!`!H`&```````
-M```````````:`%D#``!+````"P````$`*@!N`P```````!0````!`&X`=@,`
-M`)0````(`````0!N`!@```"4````````````;@!Z`P``G`````0````!`&X`
-M@0,``*````"``````0!N`(\#````````"`````$`'``8````````````````
-M`!P`L`,``(,````7`````0`J`-$#````````"`````$`'@`8````````````
-M`````!X`\`,``!X````5`````0`J``\$````````"`````$`(``8````````
-M`````````"``)@0```8!```-`````0`J`#T$````````"`````$`(@`8````
-M`````````````"(`700``/`````6`````0`J`'T$````````"`````$`)``8
-M`````````````````"0`D`0``,\````)`````0`J`*,$````````"`````$`
-M)@`8`````````````````"8`O`0````````/`````0`J`-4$````````"```
-M``$`*``8`````````````````"@`]`0``)H````5`````0`J`!,%```/````
-M#P````$`*@`L!0``0@````D````!`"H`/P4````````(`````0`K`!@`````
-M````````````*P!2!0````````P````!`&\`&`````````````````!O`&8%
-M````````"`````$`+0`8`````````````````"T`?P4`````````````!`#Q
-M_Q4````,)P```````````0`5````%"<```````````$`%0```!@G````````
-M```!`!4````<)P```````````0`5````("<```````````$`%0```"@G````
-M```````!`!@```"8*````````````0`5````I"@```````````$`AP4`````
-M```(`````0`O`!@`````````````````+P"B!0``C`$``!$````!`"H`O04`
-M```````(`````0`Q`!@`````````````````,0#<!0``50$``!4````!`"H`
-M^P4````````(`````0`S`!@`````````````````,P`6!@``.`$``!$````!
-M`"H`,08````````(`````0`U`!@`````````````````-0!)!@``?@$```X`
-M```!`"H`808``"8!```2`````0`J`'T&``!)`0``#`````$`*@"3!@``:@$`
-M`!0````!`"H`L08````````(`````0`W`!@`````````````````-P#'!@``
-M``````@````!`#D`&``````````````````Y`.4&````````"`````$`.P`8
-M`````````````````#L``0<``"0!```(`````0!N`!@````D`0``````````
-M;@`%!P`````````````$`/'_%0```*PH```````````!`!@```#`*0``````
-M`````0`5````S"D```````````$`&````/PI```````````!`!4````,*@``
-M`````````0`5````<"L```````````$`%0```$@L```````````!`!4````T
-M+0```````````0`5````>"T```````````$`&````'@N```````````!`!4`
-M``",+@```````````0`5````C#````````````$`#@<``/`````8`````0`%
-M`!@```#T````````````!0`?!P``+`$```0````!`&X`)`<``#`!```$````
-M`0!N`"L'```T`0``!`````$`;@`Q!P``"`$``!@````!``4`0@<``#@!```(
-M`````0!N`$<'``!``0``"`````$`;@!.!P``2`$```@````!`&X`5`<``"`!
-M```8`````0`%`&8'``"``0``(`````$`;@!L!P``H`$``"`````!`&X`=`<`
-M`,`!```@`````0!N`'L'```X`0``&`````$`!0",!P``4`$``!`````!`&X`
-MD0<``&`!```0`````0!N`)@'``!P`0``$`````$`;@">!P````````@````!
-M`#T`&``````````````````]`+@'``"=`0``$`````$`*@#2!P``K0$``!``
-M```!`"H`[`<``+T!```,`````0`J``((``#)`0``#0````$`*@`9"```U@$`
-M`!`````!`"H`,P@``.8!```.`````0`J`$L(````````"`````$`/P`8````
-M`````````````#\`90@````````(`````0!!`!@`````````````````00![
-M"`````````@````!`$,`&`````````````````!#`)4(````````"`````$`
-M10`8`````````````````$4`K`@````````(`````0!'`!@`````````````
-M````1P`8````+`$``````````&X`Q`@``.`!```(`````0!N`,@(````````
-M``````0`\?_2"```E#````@````"``$`%0```)0P```````````!`.`(``"<
-M,```"`````(``0`5````G#````````````$`ZP@``*0P```(`````@`!`!4`
-M``"D,````````````0#X"```K#````@````"``$`%0```*PP```````````!
-M``4)``"T,```"`````(``0`5````M#````````````$`%0```+PP````````
-M```!`!@````,,0```````````0`1"0``%#$``$P````"``$`%0```!0Q````
-M```````!`!\)``!@,0``+`````(``0`5````8#$```````````$`&````(@Q
-M```````````!`"P)``",,0``+`````(``0`5````C#$```````````$`&```
-M`+0Q```````````!`#@)``"X,0``+`````(``0`5````N#$```````````$`
-M&````.`Q```````````!`$0)``#D,0``*`````(``0`5````Y#$`````````
-M``$`&`````@R```````````!`$X)```,,@``-`````(``0`5````##(`````
-M``````$`&````#PR```````````!`%L)``!`,@``-`````(``0`5````0#(`
-M``````````$`&````'`R```````````!`&0)``!T,@``;`````(``0`5````
-M=#(```````````$`&````-PR```````````!`'`)``#@,@``1`````(``0`5
-M````X#(```````````$`>PD``"0S```T`````@`!`!4````D,P``````````
-M`0"%"0``6#,``"P````"``$`%0```%@S```````````!`!@```"`,P``````
-M`````0"."0``A#,``%`````"``$`%0```(0S```````````!`)<)``#4,P``
-M7`````(``0`5````U#,```````````$`I`D``#`T``"<`````@`!`!4````P
-M-````````````0"R"0``S#0``%P````"``$`%0```,PT```````````!`+P)
-M```H-0``K`````(``0`5````*#4```````````$`Q@D``-0U``#8`````@`!
-M`!4```#4-0```````````0#2"0``K#8``+P````"``$`%0```*PV````````
-M```!`-T)``!H-P``<`````(``0`5````:#<```````````$`%0```-@W````
-M```````!`!@```!H.````````````0`5````;#@```````````$`%0```*PX
-M```````````!`.D)``#T`0``$@````$`*@`%"@``!@(``!0````!`"H`(PH`
-M```````(`````0!)`!@`````````````````20`_"@````````@````!`$L`
-M&`````````````````!+`%T*```,````P`````$`:@`8````#```````````
-M`&H`:@H``.@!```(`````0!N`!@```#H`0``````````;@!N"@``````````
-M```$`/'_=PH``,@X``"T`````@`!`!4```#(.````````````0`5````?#D`
-M``````````$`&````'`Z```````````!`!4```!T.@```````````0`5````
-M[#H```````````$`%0```*P[```````````!`!4```!`/````````````0`5
-M````Z#P```````````$`%0```$`]```````````!`!4````\/@``````````
-M`0`8````C#X```````````$`%0```)0^```````````!`!@```#\/@``````
-M`````0`5````!#\```````````$`&````)P_```````````!`!4```"@/P``
-M`````````0`5````Z#\```````````$`&````-1%```````````!`(,*``!0
-M`0``(`T```$`!0`8````4`$```````````4`B@H````````(`````0!-`!@`
-M````````````````30"M"@``.`(``!D````!`"H`T`H````````(`````0!/
-M`!@`````````````````3P#K"@``A@(``!$````!`"H`!@L````````(````
-M`0!1`!@`````````````````40`E"P``40(``!4````!`"H`1`L````````(
-M`````0!3`!@`````````````````4P!?"P``&@(``!$````!`"H`>@L``"L"
-M```-`````0`J`)$+``!F`@``$@````$`*@"M"P``>`(```X````!`"H`Q0L`
-M`)<"```1`````0`J`.`+``"H`@``%`````$`*@#^"P``O`(``!0````!`"H`
-M'`P``-`"```5`````0`J`#L,``#E`@``%`````$`*@!9#```^0(```\````!
-M`"H`<@P````````(`````0!5`!@`````````````````50"+#`````````@`
-M```!`%<`&`````````````````!7`*,,````````"`````$`60`8````````
-M`````````%D`P0P````````(`````0!;`!@`````````````````6P#<#```
-M``````@````!`%T`&`````````````````!=`/,,````````"`````$`7P`8
-M`````````````````%\`$0T````````(`````0!A`!@`````````````````
-M80`P#0````````@````!`&,`&`````````````````!C`$X-````````"```
-M``$`90`8`````````````````&4`:@T`````````````!`#Q_Q4```#<10``
-M`````````0`8````3$P```````````$`<@T``'`.```(`````0`%`!@```!P
-M#@``````````!0"!#0``M`\``#0````2``$`F`T``'0Z``!X````$@`!`*P-
-M````````!````!$`<0"U#0``_`<``&@````2``$`O@T``"`!```$````$0!N
-M`-`-```H)P``?`$``!(``0#A#0`````````````0````\0T`````````````
-M$``````.``"\,```6````!(``0`2#@`````````````0````'PX``.@\``!8
-M````$@`!`"T.`````````````!`````Y#@`````````````0````0@X``#`@
-M``#<!@``$@`!`$\.``"L*```(`$``!(``0!?#@`````````````0````<`X`
-M````````````$````'X.`````````````!````"5#@``T````,P````2``$`
-MK0X``)0````\````$@`!`,,.``"D!```-````!(``0#0#@``2"P``.P````2
-M``$`W`X`````````````$````.,.`````````````!````#S#@``````````
-M```0````^0X`````````````$`````,/`````````````!`````4#P``;#@`
-M`$`````2``$`)@\``.`3``"0`@``$@`!`#$/``!D"```K`$``!(``0!%#P``
-MK#L``)0````2``$`5P\``!PG```$````$@`!`&D/``!X+0``%`$``!(``0![
-M#P``&"<```0````2``$`CP\``!0```"`````$0!N`)T/```@)P``"````!(`
-M`0"I#P``H#\``$@````2``$`P@\``.@_``#T!0``$@`!`,\/``!`/```J```
-M`!(``0#D#P``C"X````"```2``$`]0\`````````````$`````80````````
-M`````!`````1$```-"T``$0````2``$`(1``````````````$````#00````
-M`````````!````!!$```.`(``!`````2``$`51``````````````$````&80
-M`````````````!````!T$```[#H``,`````2``$`A1```'PY``#X````$@`!
-M`)D0`````````````!````"D$``````````````0````L1``````````````
-M$````+D0```,````!````!$`<0#($```P!$``"`"```2``$`W1``````````
-M````$````.00``",,```"````!(``0#R$``````````````0````^1``````
-M````````$`````81``#,*0``0````!(``0`6$0``V`T``/0````2``$`)1$`
-M````````````$````#01``"$$0``/````!(``0!4$0`````````````0````
-M7A$``)0>``"<`0``$@`!`&X1`````````````!````!\$0`````````````0
-M````BQ$``-Q%``#(!@``$@`!`)P1``"@!P``7````!(``0"K$0``O!P``!`!
-M```2``$`NQ$``!0G```$````$@`!`-`1`````````````!````#G$0``<"L`
-M`-@````2``$`]!$``*0H```(````$@`!``42`````````````!`````.$@``
-M.````%P````2``$`(1(`````````````$````"X2``"4/@``<````!(``0!"
-M$@``!`````0````1`'$`2Q(`````````````$````%T2`````````````!``
-M``!L$@`````````````0````=Q(```@````$````$0!Q`(02```,)P``"```
-M`!(``0"2$@`````````````0````HQ(`````````````$````+(2``#8-P``
-ME````!(``0#!$@``!#\``)P````2``$`TA(``#P^``!8````$@`!`.82````
-M`````````!````#S$@``0#T``/P````2``$`"!,``(@"```@`0``$@`!`!<3
-M```,*@``9`$``!(``0`G$P`````````````0````,!,``)P!``"<````$@`!
-M`$43`````````````!````!5$P``K#@``!P````2``$`:1,`````````````
-M$````'`3`````````````!````"'$P`````````````0````EA,`````````
-M````$````)T3`````````````!````"N$P`````````````0````N!,`````
-M````````$````,L3`````````````!``````9F)M96TN8P!P=71?9F)?:6YF
-M;P`D80`D9`!F8E]S97%?;F5X=`!F8E]S97%?<W1A<G0`9F)?<F5L96%S90!G
-M971?9F)?:6YF;P!F8E]S97%?<W1O<`!F8E]O<&5N`&9B7VUM87``9F)?=W)I
-M=&4`9F)?<F5A9`!P<F]C7V9B7V]P96X`9F)?<V5Q7W-H;W<`9F)M96U?:6YI
-M=`!V:61E;U]S971U<`!D;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%]D979I8V4`9F)?861D7W9I9&5O;6]D90!F8E]D97-T<F]Y7VUO9&5L
-M:7-T`&UA;&QO8U]S:7IE<P!F8E]F:6YD7V)E<W1?9&ES<&QA>0!F8E]P86Y?
-M9&ES<&QA>0!F8E]C;6%P7W1O7W5S97(`<V5Q7V]P96X`9F)?9V5T7V)U9F9E
-M<E]O9F9S970`9&5V7W-E=%]D<G9D871A`&9R86UE8G5F9F5R7W)E;&5A<V4`
-M<W1R;&5N`%]?865A8FE?=6YW:6YD7V-P<%]P<C$`7U]C;W!Y7W1O7W5S97(`
-M<W1R8VAR`%]?8V]P>5]F<F]M7W5S97(`7U]K;6%L;&]C`&1E=FEC95]R96UO
-9=F5?9FEL90!?7W)E<75E<W1?;6]D=6QE````
-`
-end
+++ /dev/null
-/*
- * drivers/video/rk29_fb.c
- *
- * Copyright (C) 2010 ROCKCHIP, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <linux/device.h>
-#include <linux/fb.h>
-#include <linux/init.h>
-#include <linux/dma-mapping.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/clk.h>
-#include <linux/backlight.h>
-#include <linux/timer.h>
-#include <linux/time.h>
-#include <linux/wait.h>
-#include <linux/earlysuspend.h>
-#include <linux/cpufreq.h>
-#include <linux/wakelock.h>
-
-#include <asm/io.h>
-#include <asm/div64.h>
-#include <asm/uaccess.h>
-#include <asm/cacheflush.h>
-
-#include "rk29_fb.h"
-
-#ifdef CONFIG_PM
-#include <linux/pm.h>
-#endif
-#ifdef CONFIG_HDMI
-#include <linux/completion.h>
-
-#include <linux/hdmi.h>
-#endif
-
-
-#include <mach/iomux.h>
-#include <mach/gpio.h>
-#include <mach/board.h>
-#include <mach/rk29_iomap.h>
-#include <mach/pmu.h>
-#include <mach/rk29-ipp.h>
-#include <mach/ddr.h>
-
-#include "./display/screen/screen.h"
-
-#ifdef CONFIG_MFD_RK610
-#include "./display/transmitter/rk610_lcd.h"
-#endif
-#define ANDROID_USE_THREE_BUFS 0 //android use three buffers to accelerate UI display in rgb plane
-#define CURSOR_BUF_SIZE 256 //RK2818 cursor need 256B buf
-int rk29_cursor_buf[CURSOR_BUF_SIZE];
-char cursor_img[] = {
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x20,0x00,0x00,
-0x00,0x30,0x00,0x00,
-0x00,0x28,0x00,0x00,
-0x00,0x24,0x00,0x00,
-0x00,0x22,0x00,0x00,
-0x00,0x21,0x00,0x00,
-0x00,0x20,0x80,0x00,
-0x00,0x20,0x40,0x00,
-0x00,0x20,0x20,0x00,
-0x00,0x20,0x10,0x00,
-0x00,0x20,0x08,0x00,
-0x00,0x20,0x7C,0x00,
-0x00,0x22,0x40,0x00,
-0x00,0x26,0x40,0x00,
-0x00,0x29,0x20,0x00,
-0x00,0x31,0x20,0x00,
-0x00,0x20,0x90,0x00,
-0x00,0x00,0x90,0x00,
-0x00,0x00,0x48,0x00,
-0x00,0x00,0x48,0x00,
-0x00,0x00,0x30,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00,
-0x00,0x00,0x00,0x00
-};
-
-#if 0
- #define fbprintk(msg...) printk(msg);
-#else
- #define fbprintk(msg...)
-#endif
-
-
-#if 0
- #define fbprintk2(msg...) printk(msg);
-#else
- #define fbprintk2(msg...)
-#endif
-
-#define LcdReadBit(inf, addr, msk) ((inf->regbak.addr=inf->preg->addr)&(msk))
-#define LcdWrReg(inf, addr, val) inf->preg->addr=inf->regbak.addr=(val)
-#define LcdRdReg(inf, addr) (inf->preg->addr)
-#define LcdSetBit(inf, addr, msk) inf->preg->addr=((inf->regbak.addr) |= (msk))
-#define LcdClrBit(inf, addr, msk) inf->preg->addr=((inf->regbak.addr) &= ~(msk))
-#define LcdSetRegisterBit(inf, addr, msk) inf->preg->addr=((inf->preg->addr) |= (msk))
-#define LcdMskReg(inf, addr, msk, val) (inf->regbak.addr)&=~(msk); inf->preg->addr=(inf->regbak.addr|=(val))
-
-
-#define IsMcuLandscape() ((SCREEN_MCU==inf->cur_screen->type) && (0==inf->mcu_scandir))
-#define IsMcuUseFmk() ( (2==inf->cur_screen->mcu_usefmk) || (1==inf->cur_screen->mcu_usefmk))
-
-#define CalScaleW0(x, y) (((u32)x*0x1000)/y)
-
-struct rk29fb_rgb {
- struct fb_bitfield red;
- struct fb_bitfield green;
- struct fb_bitfield blue;
- struct fb_bitfield transp;
-};
-
-static struct rk29fb_rgb def_rgb_16 = {
- red: { offset: 11, length: 5, },
- green: { offset: 5, length: 6, },
- blue: { offset: 0, length: 5, },
- transp: { offset: 0, length: 0, },
-};
-
-struct win_set {
- volatile u32 y_offset;
- volatile u32 c_offset;
-};
-
-struct win0_par {
- u32 refcount;
- u32 pseudo_pal[16];
- u32 y_offset;
- u32 c_offset;
- u32 xpos; //size in panel
- u32 ypos;
- u32 xsize; //start point in panel
- u32 ysize;
- u32 format;
-
- wait_queue_head_t wait;
- struct win_set mirror;
- struct win_set displ;
- struct win_set done;
-
- u8 par_seted;
- u8 addr_seted;
-};
-
-/*
-struct win1_par {
- u32 refcount;
- u32 pseudo_pal[16];
- int lstblank;
- u32 xpos;
- u32 ypos;
- u32 xsize;
- u32 ysize;
- u32 format;
- u32 addr_offset;
-};
-*/
-
-struct rk29fb_inf {
- struct fb_info *fb1;
- struct fb_info *fb0;
-
- void __iomem *reg_vir_base; // virtual basic address of lcdc register
- u32 reg_phy_base; // physical basic address of lcdc register
- u32 len; // physical map length of lcdc register
- u32 video_mode;
-
- struct clk *clk;
- struct clk *dclk; //lcdc dclk
- struct clk *aclk; //lcdc share memory frequency
- struct clk *aclk_parent; //lcdc aclk divider frequency source
- struct clk *aclk_ddr_lcdc; //DDR LCDC AXI clock disable.
- struct clk *aclk_disp_matrix; //DISPLAY matrix AXI clock disable.
- struct clk *hclk_cpu_display; //CPU DISPLAY AHB bus clock disable.
- struct clk *pd_display; // display power domain
- unsigned long dclk_rate;
-
- /* lcdc reg base address and backup reg */
- LCDC_REG *preg;
- LCDC_REG regbak;
-
- int in_suspend;
- int fb0_color_deepth;
- /* variable used in mcu panel */
- int mcu_needflush;
- int mcu_isrcnt;
- u16 mcu_scandir;
- struct timer_list mcutimer;
- int mcu_status;
- u8 mcu_fmksync;
- int mcu_usetimer;
- int mcu_stopflush;
-
- int setFlag;
- /* external memery */
- char __iomem *screen_base2;
- __u32 smem_len2;
- unsigned long smem_start2;
-
- char __iomem *cursor_base; /* cursor Virtual address*/
- __u32 cursor_size; /* Amount of ioremapped VRAM or 0 */
- unsigned long cursor_start;
-
- struct rk29fb_screen panel1_info; // 1st panel, it's lcd normally
- struct rk29fb_screen panel2_info; // 2nd panel
- struct rk29fb_screen *cur_screen;
-#if 0 //def CONFIG_CPU_FREQ
- struct notifier_block freq_transition;
-#endif
-
-};
-
-typedef enum _TRSP_MODE
-{
- TRSP_CLOSE = 0,
- TRSP_FMREG,
- TRSP_FMREGEX,
- TRSP_FMRAM,
- TRSP_FMRAMEX,
- TRSP_MASK,
- TRSP_INVAL
-} TRSP_MODE;
-#ifdef FB_WIMO_FLAG
-struct wimo_fb_info{
- unsigned long bitperpixel;
- unsigned long mode;
- unsigned long xaff;
- unsigned long yaff;
- unsigned long xpos;
- unsigned long ypos;
- unsigned long xsize;
- unsigned long ysize;
- unsigned long src_y;
- unsigned long src_uv;
- unsigned long dst_width;
- unsigned long dst_height;
- //struct mutex fb_lock;
- volatile unsigned long fb_lock;
-
-
-};
-struct wimo_fb_info wimo_info;
-unsigned char* ui_buffer;
-unsigned char* ui_buffer_map;
-//unsigned char* overlay_buffer;
-//unsigned char* overlay_buffer_map;
-#endif
-
-struct platform_device *g_pdev = NULL;
-//static int win1fb_set_par(struct fb_info *info);
-
-#if 0
-#define CHK_SUSPEND(inf) \
- if(inf->in_suspend) { \
- fbprintk(">>>>>> fb is in suspend! return! \n"); \
- return -EPERM; \
- }
-#else
-#define CHK_SUSPEND(inf)
-#endif
-static DECLARE_WAIT_QUEUE_HEAD(fb0_wait_queue);
-static volatile int idle_condition = 1; //1:idel, 0:busy
-
-static DECLARE_WAIT_QUEUE_HEAD(wq);
-static int wq_condition = 0;
-static int wq_condition2 = 0;
-static int fb1_open_init = 0;
-#if ANDROID_USE_THREE_BUFS
-static int new_frame_seted = 1;
-#endif
-static struct wake_lock idlelock; /* only for fb */
-#ifdef CONFIG_FB_ROTATE_VIDEO
-//add by zyc
-static bool has_set_rotate;
-static u32 last_yuv_phy[2] = {0,0};
-#endif
-int fb0_first_buff_bits = 32;
-int fb0_second_buff_bits = 32;
-int fb_compose_layer_count = 0;
-static BLOCKING_NOTIFIER_HEAD(rk29fb_notifier_list);
-int rk29fb_register_notifier(struct notifier_block *nb)
-{
- int ret = 0;
- if (g_pdev) {
- struct rk29fb_inf *inf = platform_get_drvdata(g_pdev);
- if (inf) {
- if (inf->cur_screen && inf->cur_screen->type == SCREEN_HDMI)
- nb->notifier_call(nb, RK29FB_EVENT_HDMI_ON, inf->cur_screen);
- if (inf->fb1 && inf->fb1->par) {
- struct win0_par *par = inf->fb1->par;
- if (par->refcount)
- nb->notifier_call(nb, RK29FB_EVENT_FB1_ON, inf->cur_screen);
- }
- }
- }
- ret = blocking_notifier_chain_register(&rk29fb_notifier_list, nb);
-
- return ret;
-}
-
-int rk29fb_unregister_notifier(struct notifier_block *nb)
-{
- return blocking_notifier_chain_unregister(&rk29fb_notifier_list, nb);
-}
-
-static int rk29fb_notify(struct rk29fb_inf *inf, unsigned long event)
-{
- return blocking_notifier_call_chain(&rk29fb_notifier_list, event, inf->cur_screen);
-}
-void rk29_lcd_set(bool on)
-{
- struct rk29fb_info *mach_info = g_pdev->dev.platform_data;
- if(on == 1 &&mach_info->io_enable)
- mach_info->io_enable(); //open lcd out
- else if(mach_info->io_disable)
- mach_info->io_disable(); //close lcd out
-
-}
-int mcu_do_refresh(struct rk29fb_inf *inf)
-{
- if(inf->mcu_stopflush) return 0;
-
- if(SCREEN_MCU!=inf->cur_screen->type) return 0;
-
- // use frame mark
- if(IsMcuUseFmk())
- {
- inf->mcu_needflush = 1;
- return 0;
- }
-
- // not use frame mark
- if(LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_SELECT))
- {
- if(!LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST))
- {
- inf->mcu_needflush = 1;
- }
- else
- {
- if(inf->cur_screen->refresh) inf->cur_screen->refresh(REFRESH_PRE);
- inf->mcu_needflush = 0;
- inf->mcu_isrcnt = 0;
- LcdSetRegisterBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST);
- }
- }
- return 0;
-}
-
-
-void mcutimer_callback(unsigned long arg)
-{
- struct rk29fb_inf *inf = platform_get_drvdata(g_pdev);
- static int waitcnt = 0;
-
- mod_timer(&inf->mcutimer, jiffies + HZ/10);
-
- switch(inf->mcu_status)
- {
- case MS_IDLE:
- inf->mcu_status = MS_MCU;
- break;
- case MS_MCU:
- if(inf->mcu_usetimer) mcu_do_refresh(inf);
- break;
- case MS_EWAITSTART:
- inf->mcu_status = MS_EWAITEND;
- waitcnt = 0;
- break;
- case MS_EWAITEND:
- if(0==waitcnt) {
- mcu_do_refresh(inf);
- }
- if(waitcnt++>14) {
- inf->mcu_status = MS_EEND;
- }
- break;
- case MS_EEND:
- inf->mcu_status = MS_MCU;
- break;
- default:
- inf->mcu_status = MS_MCU;
- break;
- }
-}
-
-int mcu_refresh(struct rk29fb_inf *inf)
-{
- static int mcutimer_inited = 0;
-
- if(SCREEN_MCU!=inf->cur_screen->type) return 0;
-
- if(!mcutimer_inited)
- {
- mcutimer_inited = 1;
- init_timer(&inf->mcutimer);
- inf->mcutimer.function = mcutimer_callback;
- inf->mcutimer.expires = jiffies + HZ/5;
- inf->mcu_status = MS_IDLE;
- add_timer(&inf->mcutimer);
- }
-
- if(MS_MCU==inf->mcu_status) mcu_do_refresh(inf);
-
- return 0;
-}
-
-int mcu_ioctl(unsigned int cmd, unsigned long arg)
-{
- struct rk29fb_inf *inf = NULL;
- if(!g_pdev) return -1;
-
- inf = dev_get_drvdata(&g_pdev->dev);
-
- switch(cmd)
- {
- case MCU_WRCMD:
- LcdClrBit(inf, MCU_TIMING_CTRL, m_MCU_RS_SELECT);
- LcdWrReg(inf, MCU_BYPASS_WPORT, arg);
- LcdSetBit(inf, MCU_TIMING_CTRL, m_MCU_RS_SELECT);
- break;
-
- case MCU_WRDATA:
- LcdSetBit(inf, MCU_TIMING_CTRL, m_MCU_RS_SELECT);
- LcdWrReg(inf, MCU_BYPASS_WPORT, arg);
- break;
-
- case MCU_SETBYPASS:
- LcdMskReg(inf, MCU_TIMING_CTRL, m_MCU_BYPASSMODE_SELECT, v_MCU_BYPASSMODE_SELECT(arg));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- break;
-
- default:
- break;
- }
-
- return 0;
-}
-
-static irqreturn_t mcu_irqfmk(int irq, void *dev_id)
-{
- struct platform_device *pdev = (struct platform_device*)dev_id;
- struct rk29fb_inf *inf = platform_get_drvdata(pdev);
- struct rk29fb_screen *screen;
-
- if(!inf) return IRQ_HANDLED;
-
- screen = inf->cur_screen;
-
- if(0==screen->mcu_usefmk) {
- return IRQ_HANDLED;
- }
-
- if(inf->mcu_fmksync == 1)
- return IRQ_HANDLED;
-
- inf->mcu_fmksync = 1;
- if(inf->mcu_needflush)
- {
- inf->mcu_needflush = 0;
- inf->mcu_isrcnt = 0;
- if(inf->cur_screen->refresh)
- inf->cur_screen->refresh(REFRESH_PRE);
- LcdSetBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST);
- }
- inf->mcu_fmksync = 0;
-
- return IRQ_HANDLED;
-}
-
-int init_lcdc(struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- u32 msk=0, clr=0;
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- inf->clk = clk_get(NULL, "hclk_lcdc");
- inf->aclk_ddr_lcdc = clk_get(NULL, "aclk_ddr_lcdc");
- inf->aclk_disp_matrix = clk_get(NULL, "aclk_disp_matrix");
- inf->hclk_cpu_display = clk_get(NULL, "hclk_cpu_display");
- inf->pd_display = clk_get(NULL, "pd_display");
- if ((IS_ERR(inf->clk)) ||
- (IS_ERR(inf->aclk_ddr_lcdc)) ||
- (IS_ERR(inf->aclk_disp_matrix)) ||
- (IS_ERR(inf->hclk_cpu_display)) ||
- (IS_ERR(inf->pd_display)))
- {
- printk(KERN_ERR "failed to get lcdc_hclk source\n");
- return PTR_ERR(inf->clk);
- }
- clk_enable(inf->aclk_disp_matrix);
- clk_enable(inf->hclk_cpu_display);
- clk_enable(inf->clk);
- clk_enable(inf->pd_display);
- //pmu_set_power_domain(PD_DISPLAY, 1);
- clk_enable(inf->aclk_ddr_lcdc);
-
- // set AHB access rule and disable all windows
- LcdWrReg(inf, SYS_CONFIG, 0x60000000);
- LcdWrReg(inf, SWAP_CTRL, 0);
- LcdWrReg(inf, FIFO_WATER_MARK, 0x00000862);//68
- LcdWrReg(inf, AXI_MS_ID, 0x54321);
-
- // and mcu holdmode; and set win1 top.
- LcdMskReg(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_SELECT | m_MCU_HOLDMODE_FRAME_ST | m_MCU_BYPASSMODE_SELECT ,
- v_MCU_HOLDMODE_SELECT(0)| v_MCU_HOLDMODE_FRAME_ST(0) |v_MCU_BYPASSMODE_SELECT(0));
-
- // disable blank out, black out, tristate out, yuv2rgb bypass
- LcdMskReg(inf, BLEND_CTRL,m_W2_BLEND_EN | m_W1_BLEND_EN | m_W0_BLEND_EN | m_HWC_BLEND_EN |
- m_HWC_BLEND_FACTOR | m_W1_BLEND_FACTOR | m_W0_BLEND_FACTOR,
- v_W2_BLEND_EN(0) |v_W1_BLEND_EN(0) | v_W0_BLEND_EN(0) | v_HWC_BLEND_EN(0) |
- v_HWC_BLEND_FACTOR(0) | v_W2_BLEND_FACTOR(0) | v_W1_BLEND_FACTOR(0) | v_W0_BLEND_FACTOR(0)
- );
-
- LcdMskReg(inf, WIN0_COLOR_KEY_CTRL, m_COLORKEY_EN, v_COLORKEY_EN(0));
- LcdMskReg(inf, WIN1_COLOR_KEY_CTRL, m_COLORKEY_EN, v_COLORKEY_EN(0));
-
- LcdWrReg(inf, DSP_CTRL1, 0);
-
- // initialize all interrupt
- clr = v_HOR_STARTCLEAR(1) | v_FRM_STARTCLEAR(1) | v_SCANNING_CLEAR(1);
-
- msk = v_HOR_STARTMASK(1) | v_FRM_STARTMASK(0) | v_SCANNING_MASK(1);
-
- LcdWrReg(inf, INT_STATUS, clr | msk);
-
- // let above to take effect
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- return 0;
-}
-
-void load_screen(struct fb_info *info, bool initscreen)
-{
- int ret = -EINVAL;
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct rk29fb_screen *screen = inf->cur_screen;
- u16 face;
- u16 mcu_total, mcu_rwstart, mcu_csstart, mcu_rwend, mcu_csend;
- u16 right_margin = screen->right_margin, lower_margin = screen->lower_margin;
- u16 x_res = screen->x_res, y_res = screen->y_res;
- u32 aclk_rate = 150000000;
-
- if(!g_pdev){
- printk(">>>>>> %s : %s no g_pdev\n", __FILE__, __FUNCTION__);
- return;
- }
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- // set the rgb or mcu
- LcdMskReg(inf, MCU_TIMING_CTRL, m_MCU_OUTPUT_SELECT, v_MCU_OUTPUT_SELECT((SCREEN_MCU==screen->type)?(1):(0)));
-
- // set out format and mcu timing
- mcu_total = (screen->mcu_wrperiod*150*1000)/1000000;
- if(mcu_total>31) mcu_total = 31;
- if(mcu_total<3) mcu_total = 3;
- mcu_rwstart = (mcu_total+1)/4 - 1;
- mcu_rwend = ((mcu_total+1)*3)/4 - 1;
- mcu_csstart = (mcu_rwstart>2) ? (mcu_rwstart-3) : (0);
- mcu_csend = (mcu_rwend>15) ? (mcu_rwend-1) : (mcu_rwend);
-
- fbprintk(">> mcu_total=%d, mcu_rwstart=%d, mcu_csstart=%d, mcu_rwend=%d, mcu_csend=%d \n",
- mcu_total, mcu_rwstart, mcu_csstart, mcu_rwend, mcu_csend);
-
- LcdMskReg(inf, MCU_TIMING_CTRL,
- m_MCU_CS_ST | m_MCU_CS_END| m_MCU_RW_ST | m_MCU_RW_END |
- m_MCU_WRITE_PERIOD | m_MCU_HOLDMODE_SELECT | m_MCU_HOLDMODE_FRAME_ST,
- v_MCU_CS_ST(mcu_csstart) | v_MCU_CS_END(mcu_csend) | v_MCU_RW_ST(mcu_rwstart) |
- v_MCU_RW_END(mcu_rwend) | v_MCU_WRITE_PERIOD(mcu_total) |
- v_MCU_HOLDMODE_SELECT((SCREEN_MCU==screen->type)?(1):(0)) | v_MCU_HOLDMODE_FRAME_ST(0)
- );
-
- // set synchronous pin polarity and data pin swap rule
- switch (screen->face)
- {
- case OUT_P565:
- face = OUT_P565;
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_DOWN_EN | m_DITHER_DOWN_MODE, v_DITHER_DOWN_EN(1) | v_DITHER_DOWN_MODE(0));
- break;
- case OUT_P666:
- face = OUT_P666;
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_DOWN_EN | m_DITHER_DOWN_MODE, v_DITHER_DOWN_EN(1) | v_DITHER_DOWN_MODE(1));
- break;
- case OUT_D888_P565:
- face = OUT_P888;
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_DOWN_EN | m_DITHER_DOWN_MODE, v_DITHER_DOWN_EN(1) | v_DITHER_DOWN_MODE(0));
- break;
- case OUT_D888_P666:
- face = OUT_P888;
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_DOWN_EN | m_DITHER_DOWN_MODE, v_DITHER_DOWN_EN(1) | v_DITHER_DOWN_MODE(1));
- break;
- case OUT_P888:
- face = OUT_P888;
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_UP_EN, v_DITHER_UP_EN(1));
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_DOWN_EN | m_DITHER_DOWN_MODE, v_DITHER_DOWN_EN(0) | v_DITHER_DOWN_MODE(0));
- break;
- default:
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_UP_EN, v_DITHER_UP_EN(0));
- LcdMskReg(inf, DSP_CTRL0, m_DITHER_DOWN_EN | m_DITHER_DOWN_MODE, v_DITHER_DOWN_EN(0) | v_DITHER_DOWN_MODE(0));
- face = screen->face;
- break;
- }
-
- LcdMskReg(inf, DSP_CTRL0,
- m_DISPLAY_FORMAT | m_HSYNC_POLARITY | m_VSYNC_POLARITY | m_DEN_POLARITY |
- m_DCLK_POLARITY | m_COLOR_SPACE_CONVERSION,
- v_DISPLAY_FORMAT(face) | v_HSYNC_POLARITY(screen->pin_hsync) | v_VSYNC_POLARITY(screen->pin_vsync) |
- v_DEN_POLARITY(screen->pin_den) | v_DCLK_POLARITY(screen->pin_dclk) | v_COLOR_SPACE_CONVERSION(0)
- );
-
- LcdMskReg(inf, DSP_CTRL1, m_BG_COLOR, v_BG_COLOR(0x000000) );
-
- LcdMskReg(inf, SWAP_CTRL, m_OUTPUT_RB_SWAP | m_OUTPUT_RG_SWAP | m_DELTA_SWAP | m_DUMMY_SWAP,
- v_OUTPUT_RB_SWAP(screen->swap_rb) | v_OUTPUT_RG_SWAP(screen->swap_rg) | v_DELTA_SWAP(screen->swap_delta) | v_DUMMY_SWAP(screen->swap_dumy));
-
- // set horizontal & vertical out timing
- if(SCREEN_MCU==inf->cur_screen->type)
- {
- right_margin = x_res/6;
- }
-
- fbprintk("screen->hsync_len =%d, screen->left_margin =%d, x_res =%d, right_margin = %d \n",
- screen->hsync_len , screen->left_margin , x_res , right_margin );
- LcdMskReg(inf, DSP_HTOTAL_HS_END, m_BIT12LO | m_BIT12HI, v_BIT12LO(screen->hsync_len) |
- v_BIT12HI(screen->hsync_len + screen->left_margin + x_res + right_margin));
- LcdMskReg(inf, DSP_HACT_ST_END, m_BIT12LO | m_BIT12HI, v_BIT12LO(screen->hsync_len + screen->left_margin + x_res) |
- v_BIT12HI(screen->hsync_len + screen->left_margin));
-
- LcdMskReg(inf, DSP_VTOTAL_VS_END, m_BIT11LO | m_BIT11HI, v_BIT11LO(screen->vsync_len) |
- v_BIT11HI(screen->vsync_len + screen->upper_margin + y_res + lower_margin));
- LcdMskReg(inf, DSP_VACT_ST_END, m_BIT11LO | m_BIT11HI, v_BIT11LO(screen->vsync_len + screen->upper_margin+y_res)|
- v_BIT11HI(screen->vsync_len + screen->upper_margin));
-
- LcdMskReg(inf, DSP_VS_ST_END_F1, m_BIT11LO | m_BIT11HI, v_BIT11LO(0) | v_BIT11HI(0));
- LcdMskReg(inf, DSP_VACT_ST_END_F1, m_BIT11LO | m_BIT11HI, v_BIT11LO(0) | v_BIT11HI(0));
-
- // let above to take effect
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- inf->dclk = clk_get(NULL, "dclk_lcdc");
- if (IS_ERR(inf->dclk))
- {
- printk(KERN_ERR "failed to get lcd dclock source\n");
- return ;
- }
-
- inf->aclk = clk_get(NULL, "aclk_lcdc");
- if (IS_ERR(inf->aclk))
- {
- printk(KERN_ERR "failed to get lcd clock clk_share_mem source \n");
- return;
- }
- inf->aclk_parent = clk_get(NULL, "ddr_pll");//general_pll //ddr_pll
- if (IS_ERR(inf->aclk_parent))
- {
- printk(KERN_ERR "failed to get lcd clock parent source\n");
- return ;
- }
-
- // set lcdc clk
- if(SCREEN_MCU==screen->type) screen->pixclock = 150000000; //mcu fix to 150 MHz
-
- if(initscreen == 0) //not init
- {
- clk_disable(inf->dclk);
- // clk_disable(inf->aclk);
- }
-
- // clk_disable(inf->aclk_ddr_lcdc);
- // clk_disable(inf->aclk_disp_matrix);
- // clk_disable(inf->hclk_cpu_display);
-
- // clk_disable(inf->clk);
-
-
- fbprintk(">>>>>> set lcdc dclk need %d HZ, clk_parent = %d hz ret =%d\n ", screen->pixclock, screen->lcdc_aclk, ret);
-
- ret = clk_set_rate(inf->dclk, screen->pixclock);
- if(ret)
- {
- printk(KERN_ERR ">>>>>> set lcdc dclk failed\n");
- }
- inf->fb0->var.pixclock = inf->fb1->var.pixclock = div_u64(1000000000000llu, clk_get_rate(inf->dclk));
- if(initscreen)
- {
- ret = clk_set_parent(inf->aclk, inf->aclk_parent);
- if(screen->lcdc_aclk){
- aclk_rate = screen->lcdc_aclk;
- }
- ret = clk_set_rate(inf->aclk, aclk_rate);
- if(ret){
- printk(KERN_ERR ">>>>>> set lcdc aclk failed\n");
- }
- clk_enable(inf->aclk);
- }
- // clk_enable(inf->aclk_ddr_lcdc);
- // clk_enable(inf->aclk_disp_matrix);
- // clk_enable(inf->hclk_cpu_display);
- // clk_enable(inf->clk);
- clk_enable(inf->dclk);
-
- // init screen panel
- if(screen->init)
- {
- screen->init();
- }
-}
-#if 0 //def CONFIG_CPU_FREQ
-/*
-* CPU clock speed change handler. We need to adjust the LCD timing
-* parameters when the CPU clock is adjusted by the power management
-* subsystem.
-*/
-#define TO_INF(ptr,member) container_of(ptr,struct rk29fb_inf,member)
-
-static int
-rk29fb_freq_transition(struct notifier_block *nb, unsigned long val, void *data)
-{
- struct rk29fb_inf *inf = TO_INF(nb, freq_transition);
- struct rk29fb_screen *screen = inf->cur_screen;
- u32 dclk_rate = 0;
-
- switch (val)
- {
- case CPUFREQ_PRECHANGE:
- break;
- case CPUFREQ_POSTCHANGE:
- {
- dclk_rate = screen->pixclock * 1000000;
-
- fbprintk(">>>>>> set lcdc dclk need %d HZ, clk_parent = %d hz \n ", screen->pixclock, dclk_rate);
-
- clk_set_rate(inf->dclk_divider, dclk_rate);
- break;
- }
- }
- return 0;
-}
-#endif
-
-static inline unsigned int chan_to_field(unsigned int chan,
- struct fb_bitfield *bf)
-{
- chan &= 0xffff;
- chan >>= 16 - bf->length;
- return chan << bf->offset;
-}
-
-static int fb_setcolreg(unsigned regno,
- unsigned red, unsigned green, unsigned blue,
- unsigned transp, struct fb_info *info)
-{
- unsigned int val;
-// fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- switch (info->fix.visual) {
- case FB_VISUAL_TRUECOLOR:
- /* true-colour, use pseudo-palette */
- if (regno < 16) {
- u32 *pal = info->pseudo_palette;
- val = chan_to_field(red, &info->var.red);
- val |= chan_to_field(green, &info->var.green);
- val |= chan_to_field(blue, &info->var.blue);
- pal[regno] = val;
- }
- break;
- default:
- return -1; /* unknown type */
- }
-
- return 0;
-}
-
-int rk29_set_cursor_en(struct rk29fb_inf *inf, int enable)
-{
- if (enable){
- LcdSetBit(inf, SYS_CONFIG, m_HWC_ENABLE);
- }else{
- LcdClrBit(inf, SYS_CONFIG, m_HWC_ENABLE);
- }
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- return 0;
-}
-
-int rk29_set_cursor_pos(struct rk29fb_inf *inf, int x, int y)
-{
- struct rk29fb_screen *screen = inf->cur_screen;
-
- /* set data */
- if (x >= 0x800 || y >= 0x800 )
- return -EINVAL;
- //printk("%s: %08x,%08x \n",__func__, x, y);
- x += (screen->left_margin + screen->hsync_len);
- y += (screen->upper_margin + screen->vsync_len);
- LcdWrReg(inf, HWC_DSP_ST, v_BIT11LO(x)|v_BIT11HI(y));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- return 0;
-}
-
-
-int rk29_set_cursor_colour_map(struct rk29fb_inf *inf, int bg_col, int fg_col)
-{
- LcdMskReg(inf, HWC_COLOR_LUT0, m_HWC_R|m_HWC_G|m_HWC_B,bg_col);
- LcdMskReg(inf, HWC_COLOR_LUT2, m_HWC_R|m_HWC_G|m_HWC_B,fg_col);
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- return 0;
-}
-
-#define RK29_CURSOR_WRITE_BIT(addr,mask,value) (*((char*)addr)) = (((*((char*)addr))&(~((char)mask)))|((char)value))
-int rk29_set_cursor_img_transform(char *data)
-{ int x, y;
- char *pmsk = data;
- char *dst = (char*)rk29_cursor_buf;
- unsigned char dmsk = 0;
- unsigned int op,shift,offset;
-
- /* rk29 cursor is a 2 bpp 32x32 bitmap this routine
- * clears it to transparent then combines the cursor
- * shape plane with the colour plane to set the
- * cursor */
- for (y = 0; y < 32; y++)
- {
- for (x = 0; x < 32; x++)
- {
- if ((x % 8) == 0) {
- dmsk = *pmsk++;
- } else {
- dmsk <<= 1;
- }
- op = (dmsk & 0x80) ? 2 : 3;
- shift = (x*2)%8;
- offset = x/4;
- RK29_CURSOR_WRITE_BIT((dst+offset),(3<<shift),(op<<shift));
- }
- dst += 8;
- }
-
- return 0;
-}
-
-
-
-int rk29_set_cursor_img(struct rk29fb_inf *inf, char *data)
-{
- if(data)
- {
- rk29_set_cursor_img_transform(data);
- }
- else
- {
- rk29_set_cursor_img_transform(cursor_img);
- }
- LcdWrReg(inf, HWC_MST, __pa(rk29_cursor_buf));
- //LcdSetBit(inf, SYS_CONFIG,m_HWC_RELOAD_EN);
- LcdSetBit(inf, SYS_CONFIG, m_HWC_RELOAD_EN);
- flush_cache_all();
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- return 0;
-}
-
-
-int rk29_set_cursor_test(struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- rk29_set_cursor_colour_map(inf, 0x000000ff, 0x00ff0000);
- rk29_set_cursor_pos(inf, 0, 0);
- rk29_set_cursor_img(inf, 0);
- rk29_set_cursor_en(inf, 1);
- return 0;
-}
-#if 0
-
-int rk29_set_cursor(struct fb_info *info, struct fb_cursor *cursor)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
-
- //fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- /* check not being asked to exceed capabilities */
-
- if (cursor->image.width > 32)
- return -EINVAL;
-
- if (cursor->image.height > 32)
- return -EINVAL;
-
- if (cursor->image.depth > 1)
- return -EINVAL;
-
- if (cursor->enable)
- LcdSetBit(inf, SYS_CONFIG, m_HWC_ENABLE);
- else
- LcdClrBit(inf, SYS_CONFIG, m_HWC_ENABLE);
-
- /* set data */
- if (cursor->set & FB_CUR_SETPOS)
- {
- unsigned int x = cursor->image.dx;
- unsigned int y = cursor->image.dy;
-
- if (x >= 0x800 || y >= 0x800 )
- return -EINVAL;
- LcdWrReg(inf, HWC_DSP_ST, v_BIT11LO(x)|v_BIT11HI(y));
- }
-
-
- if (cursor->set & FB_CUR_SETCMAP)
- {
- unsigned int bg_col = cursor->image.bg_color;
- unsigned int fg_col = cursor->image.fg_color;
-
- fbprintk("%s: update cmap (%08x,%08x)\n",
- __func__, bg_col, fg_col);
-
- LcdMskReg(inf, HWC_COLOR_LUT0, m_HWC_R|m_HWC_G|m_HWC_B,
- v_HWC_R(info->cmap.red[bg_col]>>8) | v_HWC_G(info->cmap.green[bg_col]>>8) | v_HWC_B(info->cmap.blue[bg_col]>>8));
-
- LcdMskReg(inf, HWC_COLOR_LUT2, m_HWC_R|m_HWC_G|m_HWC_B,
- v_HWC_R(info->cmap.red[fg_col]>>8) | v_HWC_G(info->cmap.green[fg_col]>>8) | v_HWC_B(info->cmap.blue[fg_col]>>8));
- }
-
- if ((cursor->set & FB_CUR_SETSIZE ||
- cursor->set & (FB_CUR_SETIMAGE | FB_CUR_SETSHAPE))
- && info->screen_base && info->fix.smem_start && info->fix.smem_len)
- {
- /* rk29 cursor is a 2 bpp 32x32 bitmap this routine
- * clears it to transparent then combines the cursor
- * shape plane with the colour plane to set the
- * cursor */
- int x, y;
- const unsigned char *pcol = cursor->image.data;
- const unsigned char *pmsk = cursor->mask;
- void __iomem *dst;
- unsigned long cursor_mem_start;
- unsigned char dcol = 0;
- unsigned char dmsk = 0;
- unsigned int op;
-
- dst = info->screen_base + info->fix.smem_len - CURSOR_BUF_SIZE;
- cursor_mem_start = info->fix.smem_start + info->fix.smem_len - CURSOR_BUF_SIZE;
-
- fbprintk("%s: setting shape (%d,%d)\n",
- __func__, cursor->image.width, cursor->image.height);
-
- memset(dst, 0, CURSOR_BUF_SIZE);
-
- for (y = 0; y < cursor->image.height; y++)
- {
- for (x = 0; x < cursor->image.width; x++)
- {
- if ((x % 8) == 0) {
- dcol = *pcol++;
- dmsk = *pmsk++;
- } else {
- dcol >>= 1;
- dmsk >>= 1;
- }
-
- if (dmsk & 1) {
- op = (dcol & 1) ? 1 : 3;
- op <<= ((x % 4) * 2);
- *(u8*)(dst+(x/4)) |= op;
- }
- }
- dst += (32*2)/8;
- }
- LcdSetBit(inf, SYS_CONFIG,m_HWC_RELOAD_EN);
- LcdWrReg(inf, HWC_MST, cursor_mem_start);
- // flush end when wq_condition=1 in mcu panel, but not in rgb panel
- if(SCREEN_MCU == inf->cur_screen->type) {
- wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
- wq_condition = 0;
- } else {
- wq_condition = 0;
- wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
- }
- LcdClrBit(inf, SYS_CONFIG, m_HWC_RELOAD_EN);
- }
-
- return 0;
-}
-#endif
-static int hdmi_get_fbscale(void)
-{
-#ifdef CONFIG_HDMI
- return hdmi_get_scale();
-#else
- return 100;
-#endif
-}
-static void hdmi_set_fbscale(struct fb_info *info)
-{
-#ifdef CONFIG_HDMI
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct rk29fb_screen *screen = inf->cur_screen;
- struct win0_par *par = info->par;
- int scale;
-
- scale = hdmi_get_scale();
- if(scale == 100)
- return;
- par->xpos += screen->x_res * (100-scale) / 200;
- par->ypos += screen->y_res * (100-scale) / 200;
- par->xsize = par->xsize *scale /100;
- par->ysize = par->ysize *scale /100;
-#endif
-}
-static int win0_blank(int blank_mode, struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- switch(blank_mode)
- {
- case FB_BLANK_UNBLANK:
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE(1));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- break;
- case FB_BLANK_NORMAL:
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE(0));
- break;
- default:
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE(0));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-#ifdef CONFIG_DDR_RECONFIG
- msleep(40);
-#endif
- break;
- }
-
- mcu_refresh(inf);
- return 0;
-}
-
-static int win0_set_par(struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct rk29fb_screen *screen = inf->cur_screen;
- struct fb_var_screeninfo *var = &info->var;
- struct fb_fix_screeninfo *fix = &info->fix;
- struct win0_par *par = info->par;
- u32 xact, yact, xvir, yvir, xpos, ypos, ScaleYrgbX,ScaleYrgbY, ScaleCbrX, ScaleCbrY, y_addr,uv_addr;
- hdmi_set_fbscale(info);
- xact = var->xres; /* visible resolution */
- yact = var->yres;
- xvir = var->xres_virtual; /* virtual resolution */
- yvir = var->yres_virtual;
- //u32 xact_st = var->xoffset; /* offset from virtual to visible */
- //u32 yact_st = var->yoffset; /* resolution */
- xpos = par->xpos;
- ypos = par->ypos;
-
- ScaleYrgbX=0x1000;
- ScaleYrgbY=0x1000;
- ScaleCbrX=0x1000;
- ScaleCbrY=0x1000;
-
- y_addr = 0; //user alloc buf addr y
- uv_addr = 0;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- if((var->rotate%360!=0)&& (inf->video_mode))
- {
- #ifdef CONFIG_FB_ROTATE_VIDEO
- if(xact > screen->x_res)
- {
- xact = screen->x_res; /* visible resolution */
- yact = screen->y_res;
- xvir = screen->x_res; /* virtual resolution */
- yvir = screen->y_res;
- } else {
- xact = var->xres; /* visible resolution */
- yact = var->yres;
- xvir = var->xres_virtual; /* virtual resolution */
- yvir = var->yres_virtual;
- printk("xact=%d yact =%d \n",xact,yact);
- }
- #else //CONFIG_FB_ROTATE_VIDEO
- printk("LCDC not support rotate!\n");
- return -EINVAL;
- #endif
- }
-
- // calculate the display phy address
- y_addr = fix->smem_start + par->y_offset;
- uv_addr = fix->mmio_start + par->c_offset;
-
- ScaleYrgbX = CalScaleW0(xact, par->xsize);
- ScaleYrgbY = CalScaleW0(yact, par->ysize);
-
- switch (par->format)
- {
- case 2:// yuv422
- ScaleCbrX= CalScaleW0((xact/2), par->xsize);
- ScaleCbrY = CalScaleW0(yact, par->ysize);
- break;
- case 3: // yuv4200
- case 4: // yuv4201
- ScaleCbrX= CalScaleW0(xact/2, par->xsize);
- ScaleCbrY = CalScaleW0(yact/2, par->ysize);
- break;
- case 5:// yuv444
- ScaleCbrX= CalScaleW0(xact, par->xsize);
- ScaleCbrY = CalScaleW0(yact, par->ysize);
- break;
- default:
- break;
- }
-
- xpos += (screen->left_margin + screen->hsync_len);
- ypos += (screen->upper_margin + screen->vsync_len);
-
- LcdWrReg(inf, WIN0_YRGB_MST, y_addr);
- LcdWrReg(inf, WIN0_CBR_MST, uv_addr);
-
- LcdMskReg(inf, SYS_CONFIG, m_W0_FORMAT , v_W0_FORMAT(par->format));//(inf->video_mode==0)
-
- LcdMskReg(inf, WIN0_VIR, m_WORDLO | m_WORDHI, v_VIRWIDTH(xvir) | v_VIRHEIGHT((yvir)) );
- LcdMskReg(inf, WIN0_ACT_INFO, m_WORDLO | m_WORDHI, v_WORDLO(xact) | v_WORDHI(yact));
- LcdMskReg(inf, WIN0_DSP_ST, m_BIT11LO | m_BIT11HI, v_BIT11LO(xpos) | v_BIT11HI(ypos));
- LcdMskReg(inf, WIN0_DSP_INFO, m_BIT12LO | m_BIT12HI, v_BIT12LO(par->xsize) | v_BIT12HI(par->ysize));
- LcdMskReg(inf, WIN0_SCL_FACTOR_YRGB, m_WORDLO | m_WORDHI, v_WORDLO(ScaleYrgbX) | v_WORDHI(ScaleYrgbY));
- LcdMskReg(inf, WIN0_SCL_FACTOR_CBR, m_WORDLO | m_WORDHI, v_WORDLO(ScaleCbrX) | v_WORDHI(ScaleCbrY));
-
- switch(par->format)
- {
- case 0: //rgb888
- LcdMskReg(inf, SWAP_CTRL, m_W0_YRGB_8_SWAP | m_W0_YRGB_16_SWAP | m_W0_YRGB_R_SHIFT_SWAP | m_W0_565_RB_SWAP | m_W0_YRGB_M8_SWAP | m_W0_CBR_8_SWAP,
- v_W0_YRGB_8_SWAP(1) | v_W0_YRGB_16_SWAP(1) | v_W0_YRGB_R_SHIFT_SWAP(1) | v_W0_565_RB_SWAP(0) | v_W0_YRGB_M8_SWAP(0) | v_W0_CBR_8_SWAP(0));
- break;
- case 1: //rgb565
- LcdMskReg(inf, SWAP_CTRL, m_W0_YRGB_8_SWAP | m_W0_YRGB_16_SWAP | m_W0_YRGB_R_SHIFT_SWAP | m_W0_565_RB_SWAP | m_W0_YRGB_M8_SWAP | m_W0_CBR_8_SWAP,
- v_W0_YRGB_8_SWAP(0) | v_W0_YRGB_16_SWAP(0) | v_W0_YRGB_R_SHIFT_SWAP(0) | v_W0_565_RB_SWAP(0) | v_W0_YRGB_M8_SWAP(0) | v_W0_CBR_8_SWAP(0));
- break;
- case 4: //yuv4201
- LcdMskReg(inf, SWAP_CTRL, m_W0_YRGB_8_SWAP | m_W0_YRGB_16_SWAP | m_W0_YRGB_R_SHIFT_SWAP | m_W0_565_RB_SWAP | m_W0_YRGB_M8_SWAP | m_W0_CBR_8_SWAP,
- v_W0_YRGB_8_SWAP(0) | v_W0_YRGB_16_SWAP(0) | v_W0_YRGB_R_SHIFT_SWAP(0) | v_W0_565_RB_SWAP(0) |
- v_W0_YRGB_M8_SWAP(1) | v_W0_CBR_8_SWAP(0));
- break;
- default:
- LcdMskReg(inf, SWAP_CTRL, m_W0_YRGB_8_SWAP | m_W0_YRGB_16_SWAP | m_W0_YRGB_R_SHIFT_SWAP | m_W0_565_RB_SWAP | m_W0_YRGB_M8_SWAP | m_W0_CBR_8_SWAP,
- v_W0_YRGB_8_SWAP(0) | v_W0_YRGB_16_SWAP(0) | v_W0_YRGB_R_SHIFT_SWAP(0) | v_W0_565_RB_SWAP(0) | v_W0_YRGB_M8_SWAP(0) | v_W0_CBR_8_SWAP(0) );
- break;
- }
-
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- return 0;
-
-}
-
-static int win0_pan( struct fb_info *info )
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- // struct fb_var_screeninfo *var0 = &info->var;
- struct fb_fix_screeninfo *fix0 = &info->fix;
- struct win0_par *par = info->par;
- u32 y_addr=0, uv_addr=0;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- y_addr = fix0->smem_start + par->y_offset;//y_offset;
- uv_addr = fix0->mmio_start + par->c_offset ;//c_offset;
-
- LcdWrReg(inf, WIN0_YRGB_MST, y_addr);
- LcdWrReg(inf, WIN0_CBR_MST, uv_addr);
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- // enable win0 after the win0 addr is seted
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE((1==par->addr_seted)?(1):(0)));
- mcu_refresh(inf);
-
- return 0;
-}
-
-static int win1_blank(int blank_mode, struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- switch(blank_mode)
- {
- case FB_BLANK_UNBLANK:
- LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE, v_W1_ENABLE(1));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- break;
- case FB_BLANK_NORMAL:
- LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE, v_W1_ENABLE(0));
- break;
- default:
- LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE, v_W1_ENABLE(0));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- break;
- }
-
-
- mcu_refresh(inf);
- return 0;
-}
-
-
-#ifdef CONFIG_CLOSE_WIN1_DYNAMIC
-static void win1_check_work_func(struct work_struct *work)
-{
- struct rk29fb_inf *inf = platform_get_drvdata(g_pdev);
- struct fb_info *fb0_inf = inf->fb0;
- struct fb_var_screeninfo *var = &fb0_inf->var;
- int i=0;
- int *p = NULL;
- int blank_data,total_data;
- int format = 0;
- u16 xres_virtual = fb0_inf->var.xres_virtual; //virtual screen size
- u16 xpos_virtual = fb0_inf->var.xoffset; //visiable offset in virtual screen
- u16 ypos_virtual = fb0_inf->var.yoffset;
-
- int offset = 0;//(ypos_virtual*xres_virtual + xpos_virtual)*((inf->fb0_color_deepth || fb0_inf->var.bits_per_pixel==32)? 4:2)/4;
- switch(var->bits_per_pixel)
- {
- case 16:
- format = 1;
- offset = (ypos_virtual*xres_virtual + xpos_virtual)*(inf->fb0_color_deepth ? 4:2);
- if(ypos_virtual == 3*var->yres && inf->fb0_color_deepth)
- offset -= var->yres * var->xres *2;
- break;
- default:
- format = 0;
- offset = (ypos_virtual*xres_virtual + xpos_virtual)*4;
- if(ypos_virtual >= 2*var->yres)
- {
- format = 1;
- if(ypos_virtual == 3*var->yres)
- {
- offset -= var->yres * var->xres *2;
- }
- }
- break;
- }
- p = (u32)fb0_inf->screen_base + offset;
- blank_data = (inf->fb0_color_deepth==32) ? 0xff000000 : 0;
- total_data = fb0_inf->var.xres * fb0_inf->var.yres / (format+1);
-
- // printk("var->bits_per_pixel=%d,ypos_virtual=%d, var->yres=%d,offset=%d,total_data=%d\n",var->bits_per_pixel,ypos_virtual,var->yres,offset,total_data);
-
- for(i=0; i < total_data; i++)
- {
- if(*p++ != blank_data)
- {
- //printk("win1 have no 0 data in %d, total %d\n",i,total_data);
- return;
- }
- }
-
- win1_blank(FB_BLANK_POWERDOWN, fb0_inf);
- // printk("%s close win1!\n",__func__);
-}
-static DECLARE_DELAYED_WORK(rk29_win1_check_work, win1_check_work_func);
-#endif
-static int win1_set_par(struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct fb_fix_screeninfo *fix = &info->fix;
- struct rk29fb_screen *screen = inf->cur_screen;
- struct win0_par *par = info->par;
- struct fb_var_screeninfo *var = &info->var;
- u32 addr;
- u16 xres_virtual,xpos,ypos;
- u8 trspval,trspmode;
- #ifdef CONFIG_CLOSE_WIN1_DYNAMIC
- cancel_delayed_work_sync(&rk29_win1_check_work);
- #endif
- if(((screen->x_res != var->xres) || (screen->y_res != var->yres))
- #ifndef CONFIG_FB_SCALING_OSD_1080P
- && !((screen->x_res>1280) && (var->bits_per_pixel == 32))
- #endif
- )
- {
- hdmi_set_fbscale(info);
- }
- #ifndef CONFIG_FB_SCALING_OSD_1080P
- else if(((screen->x_res==1920) ))
- {
- if(hdmi_get_fbscale() < 100)
- par->ypos -=screen->y_res * (100-hdmi_get_fbscale()) / 200;
- }
- #endif
- //u32 offset=0, addr=0, map_size=0, smem_len=0;
- addr=0;
- xres_virtual = 0; //virtual screen size
-
- //u16 xpos_virtual = var->xoffset; //visiable offset in virtual screen
- //u16 ypos_virtual = var->yoffset;
-
- xpos = par->xpos; //visiable offset in panel
- ypos = par->ypos;
-
- trspmode = TRSP_CLOSE;
- trspval = 0;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- #ifdef CONFIG_FB_SCALING_OSD
- if(((screen->x_res != var->xres) || (screen->y_res != var->yres))
- #ifndef CONFIG_FB_SCALING_OSD_1080P
- && (screen->x_res<=1280)
- #endif
- )
- {
- addr = fix->mmio_start + par->y_offset* hdmi_get_fbscale()/100;
- xres_virtual = screen->x_res* hdmi_get_fbscale()/100; //virtual screen size
- }
- else
- #endif
- {
- addr = fix->smem_start + par->y_offset;
- xres_virtual = var->xres_virtual; //virtual screen size
- }
- LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE|m_W1_FORMAT, v_W1_ENABLE(fb1_open_init?0:1)|v_W1_FORMAT(par->format));
-
- xpos += (screen->left_margin + screen->hsync_len);
- ypos += (screen->upper_margin + screen->vsync_len);
-
- LcdWrReg(inf, WIN1_YRGB_MST, addr);
-
- LcdMskReg(inf, WIN1_DSP_ST, m_BIT11LO|m_BIT11HI, v_BIT11LO(xpos) | v_BIT11HI(ypos));
- LcdMskReg(inf, WIN1_DSP_INFO, m_BIT12LO|m_BIT12HI, v_BIT12LO(par->xsize) | v_BIT12HI(par->ysize));
-
- LcdMskReg(inf, WIN1_VIR, m_WORDLO , v_WORDLO(xres_virtual));
-
- LcdMskReg(inf, BLEND_CTRL, m_W1_BLEND_EN | m_W1_BLEND_FACTOR,
- v_W1_BLEND_EN((TRSP_FMREG==trspmode) || (TRSP_MASK==trspmode)) | v_W1_BLEND_FACTOR(trspval));
-
- // enable win1 color key and set the color to black(rgb=0)
- LcdMskReg(inf, WIN1_COLOR_KEY_CTRL, m_COLORKEY_EN | m_KEYCOLOR, v_COLORKEY_EN(1) | v_KEYCOLOR(0));
-
- if(1==par->format) //rgb565
- {
- LcdMskReg(inf, SWAP_CTRL, m_W1_8_SWAP | m_W1_16_SWAP | m_W1_R_SHIFT_SWAP | m_W1_565_RB_SWAP,
- v_W1_8_SWAP(0) | v_W1_16_SWAP(0) | v_W1_R_SHIFT_SWAP(0) | v_W1_565_RB_SWAP(0) );
- }
- else
- {
- LcdMskReg(inf, SWAP_CTRL, m_W1_8_SWAP | m_W1_16_SWAP | m_W1_R_SHIFT_SWAP | m_W1_565_RB_SWAP,
- v_W1_8_SWAP(1) | v_W1_16_SWAP(1) | v_W1_R_SHIFT_SWAP(1) | v_W1_565_RB_SWAP(0) );
-
- LcdMskReg(inf, DSP_CTRL0, m_W1_TRANSP_FROM, v_W1_TRANSP_FROM(TRSP_FMRAM==trspmode) );
- }
-
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
-#ifdef CONFIG_CLOSE_WIN1_DYNAMIC
- schedule_delayed_work(&rk29_win1_check_work, msecs_to_jiffies(5000));
-#endif
-
- return 0;
-}
-
-static int win1_pan( struct fb_info *info )
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct fb_fix_screeninfo *fix1 = &info->fix;
- struct win0_par *par = info->par;
- u32 addr = 0;
-
- #ifdef CONFIG_FB_SCALING_OSD
- struct rk29fb_screen *screen = inf->cur_screen;
- struct fb_var_screeninfo *var = &info->var;
- if(((screen->x_res != var->xres) || (screen->y_res != var->yres))
- #ifndef CONFIG_FB_SCALING_OSD_1080P
- && (screen->x_res<=1280)
- #endif
- )
- {
- addr = fix1->mmio_start + par->y_offset* hdmi_get_fbscale()/100;
- }
- else
- #endif
- {
- addr = fix1->smem_start + par->y_offset;
- }
-
- //fbprintk("info->screen_base = %8x ; fix1->smem_len = %d , addr = %8x\n",(u32)info->screen_base, fix1->smem_len, addr);
-
- LcdWrReg(inf, WIN1_YRGB_MST, addr);
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- mcu_refresh(inf);
-
- return 0;
-}
-
-static int fb0_blank(int blank_mode, struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
-
- if(inf->video_mode == 1)
- {
- win1_blank(blank_mode, info);
- }
- else
- {
- win0_blank(blank_mode, info);
- }
- return 0;
-}
-
-static int fb0_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct rk29fb_screen *screen = inf->cur_screen;
- u16 xpos = (var->nonstd>>8) & 0xfff;
- u16 ypos = (var->nonstd>>20) & 0xfff;
- u16 xlcd = screen->x_res;
- u16 ylcd = screen->y_res;
-
- //fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- if( 0==var->xres_virtual || 0==var->yres_virtual ||
- 0==var->xres || 0==var->yres || var->xres<16 ||
- ((16!=var->bits_per_pixel)&&(32!=var->bits_per_pixel)) )
- {
- printk(">>>>>> fb0_check_var fail 1!!! \n");
- printk(">>>>>> 0==%d || 0==%d ", var->xres_virtual,var->yres_virtual);
- printk("0==%d || 0==%d || %d<16 || ", var->xres,var->yres,var->xres<16);
- printk("bits_per_pixel=%d \n", var->bits_per_pixel);
- return -EINVAL;
- }
-
- if( (var->xoffset+var->xres)>var->xres_virtual ||
- (var->yoffset+var->yres)>var->yres_virtual*2 )
- {
- printk(">>>>>> fb0_check_var fail 2!!! \n");
- printk(">>>>>> (%d+%d)>%d || ", var->xoffset,var->xres,var->xres_virtual);
- printk("(%d+%d)>%d || ", var->yoffset,var->yres,var->yres_virtual);
- printk("(%d+%d)>%d || (%d+%d)>%d \n", xpos,var->xres,xlcd,ypos,var->yres,ylcd);
- return -EINVAL;
- }
-
- if(inf->fb0_color_deepth)var->bits_per_pixel=inf->fb0_color_deepth;
- switch(var->bits_per_pixel)
- {
- case 16: // rgb565
- var->xres_virtual = (var->xres_virtual + 0x1) & (~0x1);
- var->xres = (var->xres + 0x1) & (~0x1);
- var->xoffset = (var->xoffset) & (~0x1);
- break;
- default: // rgb888
- var->bits_per_pixel = 32;
- break;
- }
-
- return 0;
-}
-
-
-static int fb0_set_par(struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct fb_var_screeninfo *var = &info->var;
- struct fb_fix_screeninfo *fix = &info->fix;
- struct rk29fb_screen *screen = inf->cur_screen;
- struct win0_par *par = info->par;
-
- u32 offset=0, smem_len=0;
- u16 xres_virtual = var->xres_virtual; //virtual screen size
- u16 xpos_virtual = var->xoffset; //visiable offset in virtual screen
- u16 ypos_virtual = var->yoffset;
-
-#ifdef CONFIG_FB_SCALING_OSD
- struct rk29_ipp_req ipp_req;
- u32 dstoffset=0;
- memset(&ipp_req, 0, sizeof(struct rk29_ipp_req));
-#endif
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
- wait_event_interruptible(fb0_wait_queue, idle_condition);
- idle_condition = 0;
-
- inf->setFlag = 0;
- CHK_SUSPEND(inf);
-
- if(inf->fb0_color_deepth)var->bits_per_pixel=inf->fb0_color_deepth;
- #if !defined(CONFIG_FB_SCALING_OSD)
- if((inf->video_mode == 1)&&(screen->y_res < var->yres))ypos_virtual += (var->yres-screen->y_res);
- #endif
-
- switch(var->bits_per_pixel)
- {
- case 16: // rgb565
- par->format = 1;
- if( ypos_virtual == 0)
- fb0_first_buff_bits = 16;
- else
- fb0_second_buff_bits = 16;
-
- //fix->line_length = 2 * xres_virtual;
- fix->line_length = (inf->fb0_color_deepth ? 4:2) * xres_virtual; //32bit and 16bit change
-
- #ifdef CONFIG_FB_SCALING_OSD
- dstoffset = ((ypos_virtual*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*2;
- ipp_req.src0.fmt = IPP_RGB_565;
- ipp_req.dst0.fmt = IPP_RGB_565;
- #endif
- offset = (ypos_virtual*xres_virtual + xpos_virtual)*(inf->fb0_color_deepth ? 4:2);
- if(ypos_virtual == 3*var->yres && inf->fb0_color_deepth)
- offset -= var->yres * var->xres *2;
- break;
- case 32: // rgb888
- default:
- par->format = 0;
- if( ypos_virtual == 0)
- fb0_first_buff_bits = 32;
- else
- fb0_second_buff_bits = 32;
- fix->line_length = 4 * xres_virtual;
- #ifdef CONFIG_FB_SCALING_OSD
- dstoffset = ((ypos_virtual*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*4;
-
- ipp_req.src0.fmt = IPP_XRGB_8888;
- ipp_req.dst0.fmt = IPP_XRGB_8888;
- #endif
- offset = (ypos_virtual*xres_virtual + xpos_virtual)*4;
-
- if(ypos_virtual >= 2*var->yres)
- {
- par->format = 1;
- #ifdef CONFIG_FB_SCALING_OSD
- dstoffset = (((ypos_virtual-2*var->yres)*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*4;
- ipp_req.src0.fmt = IPP_RGB_565;
- ipp_req.dst0.fmt = IPP_RGB_565;
- #endif
- if(ypos_virtual == 3*var->yres)
- {
- offset -= var->yres * var->xres *2;
- }
- }
- break;
- }
-
- smem_len = fix->line_length * var->yres_virtual;
- //map_size = PAGE_ALIGN(smem_len);
-
- if (smem_len > fix->smem_len) // buffer need realloc
- {
- printk("%s sorry!!! win1 buf is not enough\n",__FUNCTION__);
- printk("line_length = %d, yres_virtual = %d, win1_buf only = %dB\n",fix->line_length,var->yres_virtual,fix->smem_len);
- printk("you can change buf size MEM_FB_SIZE in board-xxx.c \n");
- }
-
-
- par->addr_seted = 1;
-#if ANDROID_USE_THREE_BUFS
- if(0==new_frame_seted) {
- wq_condition = 0;
- wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
- }
- new_frame_seted = 0;
-#endif
-
- if(inf->video_mode == 1)
- {
- #ifdef CONFIG_FB_SCALING_OSD
- if(((screen->x_res != var->xres) || (screen->y_res != var->yres))
- #ifndef CONFIG_FB_SCALING_OSD_1080P
- && (screen->x_res<=1280)
- #endif
- )
- {
- par->xpos = 0;
- par->ypos = 0;
- par->xsize = screen->x_res;
- par->ysize = screen->y_res;
- par->y_offset = dstoffset;
-
- ipp_req.src0.YrgbMst = fix->smem_start + offset;
- ipp_req.src0.w = var->xres;
- ipp_req.src0.h = var->yres;
-
- ipp_req.dst0.YrgbMst = fix->mmio_start + dstoffset* hdmi_get_fbscale()/100;
- ipp_req.dst0.w = screen->x_res* hdmi_get_fbscale()/100;
- ipp_req.dst0.h = screen->y_res* hdmi_get_fbscale()/100;
-
- ipp_req.src_vir_w = ipp_req.src0.w;
- ipp_req.dst_vir_w = ipp_req.dst0.w;
- ipp_req.timeout = 100;
- ipp_req.flag = IPP_ROT_0;
- //ipp_do_blit(&ipp_req);
- ipp_blit_sync(&ipp_req);
- }else
- #endif
- {
- par->y_offset = offset;
- par->xpos = (screen->x_res >= var->xres)?((screen->x_res - var->xres)/2):0; //visiable offset in panel
- par->ypos = (screen->y_res >= var->yres)?(screen->y_res - var->yres):0;
- par->xsize = var->xres; //visiable size in panel
- par->ysize = (screen->y_res >= var->yres) ? var->yres : screen->y_res;
- }
- win1_set_par(info);
- }
- else
- {
- par->y_offset = offset;
- par->xpos = 0;
- par->ypos = 0;
- par->xsize = screen->x_res;
- par->ysize = screen->y_res;
- win0_set_par(info);
- }
- inf->setFlag = 1;
- idle_condition = 1;
- wake_up_interruptible_sync(&fb0_wait_queue);
- return 0;
-}
-
-static int fb0_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
-{
-
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct fb_var_screeninfo *var1 = &info->var;
- struct rk29fb_screen *screen = inf->cur_screen;
- struct win0_par *par = info->par;
-
- u32 offset = 0;
- u16 ypos_virtual = var->yoffset;
- u16 xpos_virtual = var->xoffset;
- #ifdef CONFIG_FB_SCALING_OSD
- struct fb_fix_screeninfo *fix = &info->fix;
- struct rk29_ipp_req ipp_req;
- u32 dstoffset = 0;
- memset(&ipp_req, 0, sizeof(struct rk29_ipp_req));
- #endif
- //fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- if(inf->fb0_color_deepth)var->bits_per_pixel=inf->fb0_color_deepth;
- #if !defined(CONFIG_FB_SCALING_OSD)
- if((inf->video_mode == 1)&&(screen->y_res < var->yres))ypos_virtual += (var->yres-screen->y_res);
- #endif
-
- switch(var1->bits_per_pixel)
- {
- case 16: // rgb565
- var->xoffset = (var->xoffset) & (~0x1);
- #ifdef CONFIG_FB_SCALING_OSD
- dstoffset = ((ypos_virtual*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres) * 2;
- ipp_req.src0.fmt = IPP_RGB_565;
- ipp_req.dst0.fmt = IPP_RGB_565;
- #endif
- offset = (ypos_virtual*var1->xres_virtual + xpos_virtual)*(inf->fb0_color_deepth ? 4:2);
- if(ypos_virtual == 3*var->yres && inf->fb0_color_deepth)
- offset -= var->yres * var->xres *2;
- break;
- case 32: // rgb888
- #ifdef CONFIG_FB_SCALING_OSD
- dstoffset = ((ypos_virtual*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*4;
- ipp_req.src0.fmt = IPP_XRGB_8888;
- ipp_req.dst0.fmt = IPP_XRGB_8888;
- #endif
- offset = (ypos_virtual*var1->xres_virtual + xpos_virtual)*4;
- if(ypos_virtual >= 2*var->yres)
- {
- par->format = 1;
- #ifdef CONFIG_FB_SCALING_OSD
- dstoffset = (((ypos_virtual-2*var->yres)*screen->y_res/var->yres) *screen->x_res + (xpos_virtual*screen->x_res)/var->xres )*4;
- ipp_req.src0.fmt = IPP_RGB_565;
- ipp_req.dst0.fmt = IPP_RGB_565;
- #endif
- if(ypos_virtual == 3*var->yres)
- {
- offset -= var->yres * var->xres *2;
- }
- }
- break;
- default:
- return -EINVAL;
- }
-
- if(inf->video_mode == 1)
- {
- #ifdef CONFIG_FB_SCALING_OSD
- if(((screen->x_res != var->xres) || (screen->y_res != var->yres))
- #ifndef CONFIG_FB_SCALING_OSD_1080P
- && (screen->x_res<=1280)
- #endif
- )
- {
- par->y_offset = dstoffset;
-
- ipp_req.src0.YrgbMst = fix->smem_start + offset;
- ipp_req.src0.w = var->xres;
- ipp_req.src0.h = var->yres;
-
- ipp_req.dst0.YrgbMst = fix->mmio_start + dstoffset* hdmi_get_fbscale()/100;
- ipp_req.dst0.w = screen->x_res* hdmi_get_fbscale()/100;
- ipp_req.dst0.h = screen->y_res* hdmi_get_fbscale()/100;
-
- ipp_req.src_vir_w = ipp_req.src0.w;
- ipp_req.dst_vir_w = ipp_req.dst0.w;
- ipp_req.timeout = 100;
- ipp_req.flag = IPP_ROT_0;
- //ipp_do_blit(&ipp_req);
- ipp_blit_sync(&ipp_req);
- win1_pan(info);
- return 0;
- }else
- #endif
- par->y_offset = offset;
- win1_pan(info);
- }
- else
- {
- par->y_offset = offset;
- win0_pan(info);
- }
- // flush end when wq_condition=1 in mcu panel, but not in rgb panel
-#if !ANDROID_USE_THREE_BUFS
- // flush end when wq_condition=1 in mcu panel, but not in rgb panel
- if(SCREEN_MCU == inf->cur_screen->type) {
- wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
- wq_condition = 0;
- } else {
- wq_condition = 0;
- wait_event_interruptible_timeout(wq, wq_condition, HZ/20);
- }
-#endif
- return 0;
-}
-
-#ifdef FB_WIMO_FLAG
-unsigned long temp_vv;
-static int frame_num = 0;
-static int wimo_set_buff(struct fb_info *info,unsigned long *temp)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
-
- ui_buffer = temp[0];
- ui_buffer_map = ioremap(temp[0],temp[1]);
- if(ui_buffer_map == NULL)
- {
- printk("can't map a buffer for ui\n");
- return -EFAULT;
- }
-
- printk("ui_buffer %x ",ui_buffer_map);
- memset(&wimo_info,0,sizeof(wimo_info) );
-
- wimo_info.mode = inf->video_mode;
-// wimo_info.bitperpixel = var->bits_per_pixel;
-
-
- wimo_info.dst_width = (temp[2] + 15) & 0xfff0;
- wimo_info.dst_height = (temp[3] + 15) & 0xfff0;
-}
-static int wimo_get_buff(struct fb_info *info)
-{
-
- struct rk29_ipp_req overlay_req;
- struct rk29_ipp_req overlay_req_1;
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- int ret;
- memset(&overlay_req, 0 , sizeof(overlay_req));
- memset(&overlay_req_1, 0 , sizeof(overlay_req_1));
-
- if(inf->video_mode == 0 )
- {
- struct win0_par *par = info->par;
- wimo_info.xpos = 0;
- wimo_info.ypos = 0;
- wimo_info.xsize = 0;
- wimo_info.ysize = 0;
- wimo_info.mode = 0;
- if(par->format == 1)
- wimo_info.bitperpixel = 16;
- else
- wimo_info.bitperpixel =32;// wimo_info.bitperpixel_fb1;
- overlay_req.src0.YrgbMst = info->fix.smem_start + par->y_offset;//info->screen_base + par->y_offset;//info_buffer[8];
- overlay_req.src0.CbrMst = info->fix.smem_start + par->y_offset + wimo_info.dst_width * wimo_info.dst_height;//dst_width*dst_height;//+ par->y_offset + dst_width*dst_height;//info_buffer[9];
- overlay_req.src0.w = wimo_info.dst_width ;//dst_width;//info_buffer[2];
- overlay_req.src0.h = wimo_info.dst_height ;//dst_height;//info_buffer[3];
- overlay_req.src0.fmt = (wimo_info.bitperpixel == 16) ? 1 : 0;//3;
- overlay_req.dst0.YrgbMst = ui_buffer;//overlay_buffer + info_buffer[4] + info_buffer[5] * dst_width;
- overlay_req.dst0.CbrMst = ui_buffer + wimo_info.dst_width * wimo_info.dst_height;//dst_width*dst_height;//(unsigned char*) overlay_buffer + dst_width*dst_height +info_buffer[4] + ( info_buffer[5] * dst_width) / 2;// info_buffer[6] * info_buffer[7];
- overlay_req.dst0.w = wimo_info.dst_width ;//dst_width;//info_buffer[6];
- overlay_req.dst0.h = wimo_info.dst_height ;//dst_height;//info_buffer[7];
- overlay_req.dst0.fmt = (wimo_info.bitperpixel== 16) ? 1 : 0;//3;3;
- overlay_req.deinterlace_enable = 0;
- overlay_req.timeout = 1000000;
- overlay_req.src_vir_w = wimo_info.dst_width ;//dst_width;//info_buffer[2];
- overlay_req.dst_vir_w = wimo_info.dst_width ;//dst_width;
- overlay_req.flag = IPP_ROT_0;
- ipp_blit_sync(&overlay_req);
-
- ret = 0;
- }
- else
- {
-
- int err = 0;
- static int wimo_time = 0;
- unsigned long *overlay_buffer_map_temp;
- unsigned long *map_temp;
- unsigned long sign_memset = 0;
- struct fb_var_screeninfo *var = &inf->fb1->var;
- struct win0_par *par = inf->fb1->par;
- wimo_info.mode = 1;
- // printk("overlay setbuffer in\n");
- // mutex_lock(&wimo_info.fb_lock);
- wimo_info.fb_lock = 1;
- {
- wimo_info.xaff = var->xres;
- wimo_info.yaff = var->yres;
- if((wimo_info.xpos != par->xpos) ||(wimo_info.ypos != par->ypos)||(wimo_info.xsize != par->xsize) ||(wimo_info.ysize != par->ysize))
- {
- wimo_info.xpos = par->xpos;
- wimo_info.ypos = par->ypos;
- wimo_info.xsize = par->xsize;
- wimo_info.ysize = par->ysize;
- sign_memset = 1;
- memset(ui_buffer_map,0,wimo_info.dst_height * wimo_info.dst_width);//dst_width*dst_height);
- memset(ui_buffer_map + wimo_info.dst_height * wimo_info.dst_width, 0x80,wimo_info.dst_height * wimo_info.dst_width / 2);//dst_width*dst_height,0x80,dst_width*dst_height/2);
- printk("wimo_info.xpos %d wimo_info.ypos %d wimo_info.xsize %d wimo_info.ysize %d\n",wimo_info.xpos, wimo_info.ypos, wimo_info.xsize, wimo_info.ysize );
- }
- }
- //printk("wimo_info.xpos %d wimo_info.ypos %d wimo_info.xsize %d wimo_info.ysize %d\n",wimo_info.xpos, wimo_info.ypos, wimo_info.xsize, wimo_info.ysize );
- if(wimo_info.xaff * 3 < wimo_info.xsize || wimo_info.yaff * 3 < wimo_info.ysize)// 3time or bigger scale up
- {
- unsigned long mid_width, mid_height;
- struct rk29_ipp_req overlay_req_1;
- if(wimo_info.xaff * 3 < wimo_info.xsize)
- mid_width = wimo_info.xaff * 3;
- else
- mid_width = wimo_info.xsize;
-
- if(wimo_info.yaff * 3 < wimo_info.ysize)
- mid_height = wimo_info.yaff * 3;
- else
- mid_height = wimo_info.ysize;
- overlay_req.src0.YrgbMst = wimo_info.src_y;//info_buffer[8];
- overlay_req.src0.CbrMst = wimo_info.src_uv;//info_buffer[9];
- overlay_req.src0.w = wimo_info.xaff;// info_buffer[2];
- overlay_req.src0.h = wimo_info.yaff;// info_buffer[3];
- overlay_req.src0.fmt = 3;
- overlay_req.dst0.YrgbMst = ui_buffer + 2048000 ;//info_buffer[4] + info_buffer[5] * dst_width; //С³ß´çƬԴÐèÒª2´Î·Å´ó£¬ËùÒÔ½«bufferµÄºó°ë¶ÎÓÃÓÚ»º´æ
- overlay_req.dst0.CbrMst = (unsigned char*) ui_buffer + mid_height * mid_width + 2048000;
-
- overlay_req.dst0.w = mid_width;//info_buffer[6];
- overlay_req.dst0.h = mid_height;//info_buffer[7];
- overlay_req.dst0.fmt = 3;
- overlay_req.timeout = 100000;
- overlay_req.src_vir_w = wimo_info.xaff;//info_buffer[2];
- overlay_req.dst_vir_w = mid_width;//dst_width;
- overlay_req.flag = IPP_ROT_0;
-
- overlay_req_1.src0.YrgbMst = ui_buffer + 2048000;
- overlay_req_1.src0.CbrMst = (unsigned char*) ui_buffer + mid_height * mid_width + 2048000;
- overlay_req_1.src0.w = mid_width;
- overlay_req_1.src0.h = mid_height;// info_buffer[3];
- overlay_req_1.src0.fmt = 3;
- overlay_req_1.dst0.YrgbMst = ui_buffer + ((wimo_info.xpos + 1)&0xfffe) + wimo_info.ypos * wimo_info.dst_width;//info_buffer[4] + info_buffer[5] * dst_width;
- overlay_req_1.dst0.CbrMst =(unsigned char*) ui_buffer + wimo_info.dst_width * wimo_info.dst_height + ((wimo_info.xpos + 1)&0xfffe) + ( wimo_info.ypos / 2)* wimo_info.dst_width ;
-
- overlay_req_1.dst0.w = wimo_info.xsize;//info_buffer[6];
- overlay_req_1.dst0.h = wimo_info.ysize;//info_buffer[7];
- overlay_req_1.dst0.fmt = 3;
- overlay_req_1.timeout = 100000;
- overlay_req_1.src_vir_w = mid_width;//info_buffer[2];
- overlay_req_1.dst_vir_w = wimo_info.dst_width;//dst_width;
- overlay_req_1.flag = IPP_ROT_0;
-
-
- err = ipp_blit_sync(&overlay_req);
- dmac_flush_range(ui_buffer_map,ui_buffer_map + wimo_info.dst_height * wimo_info.dst_width * 3/2);//dst_width*dst_height*3/2);
- err = ipp_blit_sync(&overlay_req_1);
-
- }
- else
- {
- overlay_req.src0.YrgbMst = wimo_info.src_y;//info_buffer[8];
- overlay_req.src0.CbrMst = wimo_info.src_uv;//info_buffer[9];
- overlay_req.src0.w = wimo_info.xaff;// info_buffer[2];
- overlay_req.src0.h = wimo_info.yaff;// info_buffer[3];
- overlay_req.src0.fmt = 3;
- overlay_req.dst0.YrgbMst = ui_buffer + ((wimo_info.xpos + 1)&0xfffe) + wimo_info.ypos * wimo_info.dst_width;//info_buffer[4] + info_buffer[5] * dst_width;
- overlay_req.dst0.CbrMst =(unsigned char*) ui_buffer + wimo_info.dst_width * wimo_info.dst_height + ((wimo_info.xpos + 1)&0xfffe) + ( wimo_info.ypos / 2)* wimo_info.dst_width ;
-
- overlay_req.dst0.w = wimo_info.xsize;//wimo_info.xsize;//wimo_info.xaff;// wimo_info.xsize;//info_buffer[6];
- overlay_req.dst0.h = (wimo_info.ysize + 1) & 0xfffe;//(wimo_info.ysize + 1) & 0xfffe;//wimo_info.yaff;//(wimo_info.ysize + 1) & 0xfffe;//info_buffer[7];
- overlay_req.dst0.fmt = 3;
- overlay_req.timeout = 100000;
- overlay_req.src_vir_w = wimo_info.xaff;//info_buffer[2];
- overlay_req.dst_vir_w = wimo_info.dst_width;//wimo_info.dst_width;//wimo_info.yaff;//wimo_info.dst_width;//dst_width;
- overlay_req.flag = IPP_ROT_0;
-
- dmac_flush_range(ui_buffer_map,ui_buffer_map + wimo_info.dst_height * wimo_info.dst_width * 3/2);//dst_width*dst_height*3/2);
- err = ipp_blit_sync(&overlay_req);
-
- }
- // printk("overlay setbuffer exit\n");
- ret = 1;
- wimo_info.fb_lock = 0;
- }
-
-
- return ret;
-}
-#endif
-static int fb0_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- switch(cmd)
- {
- case FB0_IOCTL_STOP_TIMER_FLUSH: //stop timer flush mcu panel after android is runing
- if(1==arg)
- {
- inf->mcu_usetimer = 0;
- }
- break;
- case FBIOPUT_16OR32:
-
- inf->fb0_color_deepth = arg;
-
- break;
- case FBIOGET_16OR32:
- return inf->fb0_color_deepth;
- case FBIOGET_IDLEFBUff_16OR32:
- if(info->var.yoffset == 0)
- {
- return fb0_second_buff_bits;
- }
- else
- {
- return fb0_first_buff_bits;
- }
- case FBIOSET_COMPOSE_LAYER_COUNTS:
- fb_compose_layer_count = arg;
- break;
-
- case FBIOGET_COMPOSE_LAYER_COUNTS:
-
- return fb_compose_layer_count;
-
- case FBIOPUT_FBPHYADD:
- return info->fix.smem_start;
- case FBIOGET_OVERLAY_STATE:
- return inf->video_mode;
- case FBIOGET_SCREEN_STATE:
- return inf->cur_screen->type;
-
- case FBIOPUT_SET_CURSOR_EN:
- {
- int en;
- if(copy_from_user(&en, (void*)arg, sizeof(int)))
- return -EFAULT;
- rk29_set_cursor_en(inf, en);
- }
- break;
- case FBIOPUT_SET_CURSOR_POS:
- {
- struct fbcurpos pos;
- if(copy_from_user(&pos, (void*)arg, sizeof(struct fbcurpos)))
- return -EFAULT;
- rk29_set_cursor_pos(inf, pos.x , pos.y);
- }
- break;
- case FBIOPUT_SET_CURSOR_IMG:
- {
- char cursor_buf[CURSOR_BUF_SIZE];
- if(copy_from_user(cursor_buf, (void*)arg, CURSOR_BUF_SIZE))
- return -EFAULT;
- rk29_set_cursor_img(inf, cursor_buf);
- }
- break;
- case FBIOPUT_SET_CURSOR_CMAP:
- {
- struct fb_image img;
- if(copy_from_user(&img, (void*)arg, sizeof(struct fb_image)))
- return -EFAULT;
- rk29_set_cursor_colour_map(inf, img.bg_color, img.fg_color);
- }
- break;
- case FBIOPUT_GET_CURSOR_RESOLUTION:
- {
- u32 panel_size[2];
- //struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- if((inf->fb1->var.rotate &0x1ff ) == 270) {
- panel_size[0] = inf->cur_screen->y_res; //inf->cur_screen->y_res; change for hdmi video size
- panel_size[1] = inf->cur_screen->x_res;
- } else {
- panel_size[0] = inf->cur_screen->x_res;
- panel_size[1] = inf->cur_screen->y_res;
- }
- if(copy_to_user((void*)arg, panel_size, 8)) return -EFAULT;
- break;
- }
- case FBIOPUT_GET_CURSOR_EN:
- {
- u32 en = (inf->regbak.SYS_CONFIG & m_HWC_ENABLE);
- if(copy_to_user((void*)arg, &en, 4)) return -EFAULT;
- break;
- }
-#ifdef FB_WIMO_FLAG
- case FB0_IOCTL_SET_BUF:
- {
- unsigned long temp[4];
- copy_from_user(temp, (void*)arg, 20);
- wimo_set_buff( info,temp);
-
- }
- break;
- case FB0_IOCTL_CLOSE_BUF:
- {
- if(ui_buffer != NULL && ui_buffer_map !=NULL )
- {
- iounmap(ui_buffer_map);
- ui_buffer_map = 0;
- ui_buffer = 0;
- memset(&wimo_info,0,sizeof(wimo_info));
- }
- else
- printk("somethint wrong with wimo in close");
-
- }
- break;
-
- case FB0_IOCTL_COPY_CURBUF:
- {
- unsigned long temp_data[3];
- copy_from_user(&temp_vv, (void*)arg, 4);
- if(ui_buffer != NULL && ui_buffer_map !=NULL )
- {
- temp_data[1] = wimo_get_buff(info);
- temp_data[0] = wimo_info.bitperpixel;
-
- }
- else
- {
- temp_data[1] = 1;
- temp_data[0] = wimo_info.bitperpixel;
- printk("somethint wrong with wimo in getbuf");
- }
- temp_data[2] = frame_num++;
- //printk("FB0_IOCTL_COPY_CURBUF %d %d %d\n",temp_data[0],temp_data[1],temp_data[2]);
- copy_to_user((void*)arg, &temp_data, 12);
- break;
- }
-#endif
- default:
- break;
- }
- return 0;
-}
-
-static int fb1_blank(int blank_mode, struct fb_info *info)
-{
- win0_blank(blank_mode, info);
- return 0;
-}
-
-static int fb1_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct rk29fb_screen *screen = inf->cur_screen;
-
- u32 ScaleYRGBY=0x1000;
- u16 xpos = (var->nonstd>>8) & 0xfff; //offset in panel
- u16 ypos = (var->nonstd>>20) & 0xfff;
- u16 xsize = (var->grayscale>>8) & 0xfff; //visiable size in panel
- u16 ysize = (var->grayscale>>20) & 0xfff;
- u16 xlcd = screen->x_res; //size of panel
- u16 ylcd = screen->y_res;
- u16 yres = 0;
-#if 0
- struct hdmi *hdmi = get_hdmi_struct(0);
-#endif
-
- if((var->rotate & 0x1ff) == 90 ||(var->rotate &0x1ff)== 270) {
- #ifdef CONFIG_FB_ROTATE_VIDEO
- xlcd = screen->y_res;
- ylcd = screen->x_res;
- #else //CONFIG_FB_ROTATE_VIDEO
- printk("LCDC not support rotate!\n");
- return -EINVAL;
- #endif
- }
-
- xpos = (xpos * screen->x_res) / inf->panel1_info.x_res;
- ypos = (ypos * screen->y_res) / inf->panel1_info.y_res;
- xsize = (xsize * screen->x_res) / inf->panel1_info.x_res;
- ysize = (ysize * screen->y_res) / inf->panel1_info.y_res;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- CHK_SUSPEND(inf);
-
- if( 0==var->xres_virtual || 0==var->yres_virtual ||
- 0==var->xres || 0==var->yres || var->xres<16 ||
- 0==xsize || 0==ysize || xsize<16 ||
- ((16!=var->bits_per_pixel)&&(32!=var->bits_per_pixel)) )
- {
- printk(">>>>>> win0fb_check_var fail 1!!! \n");
- printk("0==%d || 0==%d || 0==%d || 0==%d || %d<16 \n ||0==%d || 0==%d || %d<16 ||((16!=%d)&&(32!=%d)) \n",
- var->xres_virtual, var->yres_virtual, var->xres, var->yres, var->xres, xsize, ysize, xsize,
- var->bits_per_pixel, var->bits_per_pixel);
- return -EINVAL;
- }
-
- if( (var->xoffset+var->xres)>var->xres_virtual ||
- (var->yoffset+var->yres)>var->yres_virtual ||
- (xpos+xsize)>xlcd || (ypos+ysize)>ylcd )
- {
- printk(">>>>>> win0fb_check_var fail 2!!! \n");
- printk("(%d+%d)>%d || (%d+%d)>%d || (%d+%d)>%d || (%d+%d)>%d \n ",
- var->xoffset, var->xres, var->xres_virtual, var->yoffset, var->yres,
- var->yres_virtual, xpos, xsize, xlcd, ypos, ysize, ylcd);
- return -EINVAL;
- }
-
- switch(var->nonstd&0x0f)
- {
- case 0: // rgb
- switch(var->bits_per_pixel)
- {
- case 16: // rgb565
- var->xres_virtual = (var->xres_virtual + 0x1) & (~0x1);
- var->xres = (var->xres + 0x1) & (~0x1);
- var->xoffset = (var->xoffset) & (~0x1);
- break;
- default: // rgb888
- var->bits_per_pixel = 32;
- break;
- }
- var->nonstd &= ~0xc0; //not support I2P in this format
- break;
- case 1: // yuv422
- var->xres_virtual = (var->xres_virtual + 0x3) & (~0x3);
- var->xres = (var->xres + 0x3) & (~0x3);
- var->xoffset = (var->xoffset) & (~0x3);
- break;
- case 2: // yuv4200
- var->xres_virtual = (var->xres_virtual + 0x3) & (~0x3);
- var->yres_virtual = (var->yres_virtual + 0x1) & (~0x1);
- var->xres = (var->xres + 0x3) & (~0x3);
- var->yres = (var->yres + 0x1) & (~0x1);
- var->xoffset = (var->xoffset) & (~0x3);
- var->yoffset = (var->yoffset) & (~0x1);
- break;
- case 3: // yuv4201
- var->xres_virtual = (var->xres_virtual + 0x3) & (~0x3);
- var->yres_virtual = (var->yres_virtual + 0x1) & (~0x1);
- var->xres = (var->xres + 0x3) & (~0x3);
- var->yres = (var->yres + 0x1) & (~0x1);
- var->xoffset = (var->xoffset) & (~0x3);
- var->yoffset = (var->yoffset) & (~0x1);
- var->nonstd &= ~0xc0; //not support I2P in this format
- break;
- case 4: // none
- case 5: // yuv444
- var->xres_virtual = (var->xres_virtual + 0x3) & (~0x3);
- var->xres = (var->xres + 0x3) & (~0x3);
- var->xoffset = (var->xoffset) & (~0x3);
- var->nonstd &= ~0xc0; //not support I2P in this format
- break;
- default:
- printk(">>>>>> fb1 var->nonstd=%d is invalid! \n", var->nonstd);
- return -EINVAL;
- }
-
- if((var->rotate & 0x1ff ) == 90 ||(var->rotate & 0x1ff ) == 270)
- {
- yres = var->xres;
- }
- else
- {
- yres = var->yres;
- }
-
- ScaleYRGBY = CalScaleW0(yres, ysize);
-
- if((ScaleYRGBY>0x8000) || (ScaleYRGBY<0x200))
- {
- return -EINVAL; // multiple of scale down or scale up can't exceed 8
- }
-#if 0
- if(inf->video_mode == 1) {
- if(hdmi_resolution_changed(hdmi,var->xres,var->yres, 1) == 1)
- {
- LcdMskReg(inf, DSP_CTRL1, m_BLACK_MODE, v_BLACK_MODE(1));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- init_completion(&hdmi->complete);
- hdmi->wait = 1;
- wait_for_completion_interruptible_timeout(&hdmi->complete,
- msecs_to_jiffies(10000));
- }
- }
-#endif
- return 0;
-}
-
-static int fb1_set_par(struct fb_info *info)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct rk29fb_screen *screen = inf->cur_screen;
- struct fb_var_screeninfo *var = &info->var;
- struct fb_fix_screeninfo *fix = &info->fix;
- struct win0_par *par = info->par;
-
- u8 format = 0;
- u32 cblen=0, crlen=0, map_size=0, smem_len=0;
-
- //u32 xact = var->xres; /* visible resolution */
- //u32 yact = var->yres;
- u32 xvir = var->xres_virtual; /* virtual resolution */
- u32 yvir = var->yres_virtual;
- u32 xact_st = var->xoffset; /* offset from virtual to visible */
- u32 yact_st = var->yoffset; /* resolution */
-
- u16 xpos = (var->nonstd>>8) & 0xfff; //visiable pos in panel
- u16 ypos = (var->nonstd>>20) & 0xfff;
- u16 xsize = (var->grayscale>>8) & 0xfff; //visiable size in panel
- u16 ysize = (var->grayscale>>20) & 0xfff;
-
- //u32 ScaleYrgbX=0x1000,ScaleYrgbY=0x1000;
- //u32 ScaleCbrX=0x1000, ScaleCbrY=0x1000;
-
- u8 data_format = var->nonstd&0x0f;
- // u32 win0_en = var->reserved[2];
- // u32 y_addr = var->reserved[3]; //user alloc buf addr y
- // u32 uv_addr = var->reserved[4];
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
- CHK_SUSPEND(inf);
- if((var->rotate & 0x1ff ) == 90 || (var->rotate & 0x1ff ) == 270)
- {
- #ifdef CONFIG_FB_ROTATE_VIDEO
- xpos = (var->nonstd>>20) & 0xfff; //visiable pos in panel
- ypos = (var->nonstd>>8) & 0xfff;
- xsize = (var->grayscale>>20) & 0xfff; //visiable size in panel
- ysize = (var->grayscale>>8) & 0xfff;
- #else //CONFIG_FB_ROTATE_VIDEO
- printk("LCDC not support rotate!\n");
- return -EINVAL;
- #endif
- } else{
- xpos = (xpos * screen->x_res) / inf->panel1_info.x_res;
- ypos = (ypos * screen->y_res) / inf->panel1_info.y_res;
- xsize = (xsize * screen->x_res) / inf->panel1_info.x_res;
- ysize = (ysize * screen->y_res) / inf->panel1_info.y_res;
- }
- /* calculate y_offset,c_offset,line_length,cblen and crlen */
- switch (data_format)
- {
- case 0: // rgb
- switch(var->bits_per_pixel)
- {
- case 16: // rgb565
- format = 1;
- fix->line_length = 2 * xvir;
- par->y_offset = (yact_st*xvir + xact_st)*2;
- break;
- case 32: // rgb888
- format = 0;
- fix->line_length = 4 * xvir;
- par->y_offset = (yact_st*xvir + xact_st)*4;
- break;
- default:
- return -EINVAL;
- }
- break;
- case 1: // yuv422
- format = 2;
- fix->line_length = xvir;
- cblen = crlen = (xvir*yvir)/2;
- par->y_offset = yact_st*xvir + xact_st;
- par->c_offset = yact_st*xvir + xact_st;
- break;
- case 2: // yuv4200
- format = 3;
- fix->line_length = xvir;
- cblen = crlen = (xvir*yvir)/4;
-
- par->y_offset = yact_st*xvir + xact_st;
- par->c_offset = (yact_st/2)*xvir + xact_st;
-
- break;
- case 3: // yuv4201
- format = 4;
- fix->line_length = xvir;
- par->y_offset = (yact_st/2)*2*xvir + (xact_st)*2;
- par->c_offset = (yact_st/2)*xvir + xact_st;
- cblen = crlen = (xvir*yvir)/4;
- break;
- case 4: // none
- case 5: // yuv444
- format = 5;
- fix->line_length = xvir;
- par->y_offset = yact_st*xvir + xact_st;
- par->c_offset = yact_st*2*xvir + xact_st*2;
- cblen = crlen = (xvir*yvir);
- break;
- default:
- return -EINVAL;
- }
-
- smem_len = fix->line_length * yvir + cblen + crlen;
- map_size = PAGE_ALIGN(smem_len);
-
- // fix->smem_start = y_addr;
- fix->smem_len = smem_len;
- // fix->mmio_start = uv_addr;
-
- // par->addr_seted = ((-1==(int)y_addr) || (0==(int)y_addr) || (win0_en==0)) ? 0 : 1;
- fbprintk("buffer alloced by user fix->smem_start = %8x, fix->smem_len = %8x, fix->mmio_start = %8x \n", (u32)fix->smem_start, (u32)fix->smem_len, (u32)fix->mmio_start);
-
- par->format = format;
- par->xpos = xpos;
- par->ypos = ypos;
- par->xsize = xsize;
- par->ysize = ysize;
- win0_set_par(info);
-
- if ( wq_condition2 == 0 ) {
- wait_event_interruptible_timeout(wq, wq_condition2, HZ/20);
- }
- wq_condition2 = 0;
-
-#ifdef CONFIG_FB_ROTATE_VIDEO
-//need refresh ,zyc add
- if((has_set_rotate == true) && (last_yuv_phy[0] != 0) && (last_yuv_phy[1] != 0))
- {
- u32 yuv_phy[2];
- struct rk29_ipp_req ipp_req;
- static u32 dstoffset = 0;
- static int fb_index = 0;
- memset(&ipp_req, 0, sizeof(struct rk29_ipp_req));
- yuv_phy[0] = last_yuv_phy[0];
- yuv_phy[1] = last_yuv_phy[1];
- yuv_phy[0] += par->y_offset;
- yuv_phy[1] += par->c_offset;
- #if 0
- if((var->rotate == 90) ||(var->rotate == 270))
- #else
- if(var->rotate%360 != 0)
- #endif
- {
- #ifdef CONFIG_FB_ROTATE_VIDEO
- dstoffset = (dstoffset+1)%2;
- ipp_req.src0.fmt = 3;
- ipp_req.src0.YrgbMst = yuv_phy[0];
- ipp_req.src0.CbrMst = yuv_phy[1];
- ipp_req.src0.w = var->xres;
- ipp_req.src0.h = var->yres;
-
- ipp_req.src_vir_w= (var->xres + 15) & (~15);
- ipp_req.dst_vir_w=screen->x_res;
-
- ipp_req.dst0.fmt = 3;
- #ifdef CONFIG_FB_MIRROR_X_Y
- if((var->rotate & 0x1ff)!=0 &&(var->rotate&(X_MIRROR|Y_MIRROR))!= 0 )
- {
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*4;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*5;
- }
- else
- {
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
-
- }
- if(var->xres > screen->x_res)
- {
- ipp_req.dst0.w = screen->x_res;
- ipp_req.dst0.h = screen->y_res;
- } else {
- ipp_req.dst0.w = var->xres;
- ipp_req.dst0.h = var->yres;
- }
- ipp_req.dst_vir_w = (ipp_req.dst0.w + 15) & (~15);
- ipp_req.timeout = 100;
- if((var->rotate & 0x1ff) == 90)
- ipp_req.flag = IPP_ROT_90;
- else if ((var->rotate & 0x1ff) == 180)
- ipp_req.flag = IPP_ROT_180;
- else if((var->rotate & 0x1ff) == 270)
- ipp_req.flag = IPP_ROT_270;
- else if((var->rotate & X_MIRROR) == X_MIRROR )
- ipp_req.flag = IPP_ROT_X_FLIP;
- else if((var->rotate & Y_MIRROR) == Y_MIRROR)
- ipp_req.flag = IPP_ROT_Y_FLIP;
- //ipp_do_blit(&ipp_req);
- ipp_blit_sync(&ipp_req);
- yuv_phy[0] = ipp_req.dst0.YrgbMst;
- yuv_phy[1] = ipp_req.dst0.CbrMst;
- if((var->rotate & 0x1ff)!=0 &&(var->rotate&(X_MIRROR|Y_MIRROR))!= 0 )
- {
- memset(&ipp_req,0,sizeof(struct rk29_ipp_req));
-
- if((var->rotate & X_MIRROR) == X_MIRROR)
- ipp_req.flag = IPP_ROT_X_FLIP;
- else if((var->rotate & Y_MIRROR) == Y_MIRROR)
- ipp_req.flag = IPP_ROT_Y_FLIP;
- else
- printk(">>>>>> %d rotate is not support!\n",var->rotate);
-
- if(var->xres > screen->x_res)
- {
- ipp_req.dst0.w = screen->x_res;
- ipp_req.dst0.h = screen->y_res;
- } else {
- ipp_req.dst0.w = var->xres;
- ipp_req.dst0.h = var->yres;
- }
- ipp_req.src0.fmt = 3;
- ipp_req.src0.YrgbMst = yuv_phy[0];
- ipp_req.src0.CbrMst = yuv_phy[1];
- ipp_req.src0.w = ipp_req.dst0.w;
- ipp_req.src0.h = ipp_req.dst0.h;
-
- ipp_req.src_vir_w= (ipp_req.dst0.w + 15) & (~15);
- ipp_req.dst_vir_w= (ipp_req.dst0.w + 15) & (~15);
-
- ipp_req.dst0.fmt = 3;
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
-
- ipp_req.timeout = 100;
- ipp_blit_sync(&ipp_req);
- yuv_phy[0] = ipp_req.dst0.YrgbMst;
- yuv_phy[1] = ipp_req.dst0.CbrMst;
- }
- fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
- #else
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
- if(var->xres > screen->x_res)
- {
- ipp_req.dst0.w = screen->x_res;
- ipp_req.dst0.h = screen->y_res;
- } else {
- ipp_req.dst0.w = var->xres;
- ipp_req.dst0.h = var->yres;
-
- }
- ipp_req.dst_vir_w = (ipp_req.dst0.w + 15) & (~15);
- ipp_req.timeout = 100;
- if(var->rotate == 90)
- ipp_req.flag = IPP_ROT_90;
- else if(var->rotate == 180)
- ipp_req.flag = IPP_ROT_180;
- else if(var->rotate == 270)
- ipp_req.flag = IPP_ROT_270;
- //ipp_do_blit(&ipp_req);
- ipp_blit_sync(&ipp_req);
-
- fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
- yuv_phy[0] = ipp_req.dst0.YrgbMst;
- yuv_phy[1] = ipp_req.dst0.CbrMst;
- #endif
- fix->smem_start = yuv_phy[0];
- fix->mmio_start = yuv_phy[1];
- #else //CONFIG_FB_ROTATE_VIDEO
- printk("LCDC not support rotate!\n");
- #endif
- }
- else
- {
-
- fix->smem_start = yuv_phy[0];
- fix->mmio_start = yuv_phy[1];
- }
-
- LcdWrReg(inf, WIN0_YRGB_MST, yuv_phy[0]);
- LcdWrReg(inf, WIN0_CBR_MST, yuv_phy[1]);
- // enable win0 after the win0 par is seted
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE(par->par_seted && par->addr_seted));
- par->addr_seted = 1;
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- if(par->addr_seted ) {
- unsigned long flags;
-
- local_irq_save(flags);
- par->mirror.y_offset = yuv_phy[0];
- par->mirror.c_offset = yuv_phy[1];
- local_irq_restore(flags);
-
- mcu_refresh(inf);
- //printk("0x%.8x 0x%.8x mirror\n", par->mirror.y_offset, par->mirror.c_offset);
- }
-
- }
-
- has_set_rotate = false;
-#endif
- return 0;
-}
-
-static int fb1_pan_display(struct fb_var_screeninfo *var, struct fb_info *info)
-{
- struct win0_par *par = info->par;
- // enable win0 after the win0 addr is seted
-
- win0_pan(info);
- par->par_seted = 1;
- return 0;
-}
-
-int fb1_open(struct fb_info *info, int user)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct win0_par *par = info->par;
- struct rk29fb_screen *screen = inf->cur_screen;
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- par->par_seted = 0;
- par->addr_seted = 0;
- inf->video_mode = 1;
- wq_condition2 = 1;
-#ifdef CONFIG_FB_ROTATE_VIDEO
- //reinitialize the var when open,zyc
- last_yuv_phy[0] = 0;
- last_yuv_phy[1] = 0;
- has_set_rotate = 0;
-#endif
- if(par->refcount) {
- printk(">>>>>> fb1 has opened! \n");
- return -EACCES;
- } else {
- par->refcount++;
- win0_blank(FB_BLANK_NORMAL, info);
- if(screen->x_res>1280)
- fb1_open_init=1;
- fb0_set_par(inf->fb0);
- fb1_open_init=0;
- rk29fb_notify(inf, RK29FB_EVENT_FB1_ON);
- return 0;
- }
-}
-
-int fb1_release(struct fb_info *info, int user)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct win0_par *par = info->par;
- struct fb_var_screeninfo *var0 = &info->var;
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
- if(inf->setFlag == 0)
- {
- wait_event_interruptible_timeout(wq, inf->setFlag, HZ*10);
- }
- if(par->refcount) {
- par->refcount--;
- inf->video_mode = 0;
- par->par_seted = 0;
- par->addr_seted = 0;
- win1_blank(FB_BLANK_NORMAL, info);
-
- //if(inf->cur_screen->type != SCREEN_HDMI)
- fb0_set_par(inf->fb0);
-
- // unmap memory
- info->screen_base = 0;
- info->fix.smem_start = 0;
- info->fix.smem_len = 0;
- // clean the var param
- memset(var0, 0, sizeof(struct fb_var_screeninfo));
- rk29fb_notify(inf, RK29FB_EVENT_FB1_OFF);
- #ifdef CONFIG_CLOSE_WIN1_DYNAMIC
- cancel_delayed_work_sync(&rk29_win1_check_work);
- #endif
- }
-
- return 0;
-}
-
-static int fb1_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
-{
- struct rk29fb_inf *inf = dev_get_drvdata(info->device);
- struct win0_par *par = info->par;
- struct fb_fix_screeninfo *fix0 = &info->fix;
- struct fb_var_screeninfo *var = &info->var;
- void __user *argp = (void __user *)arg;
-
-#ifdef CONFIG_FB_ROTATE_VIDEO
- struct rk29fb_screen *screen = inf->cur_screen;
- struct rk29_ipp_req ipp_req;
- static u32 dstoffset = 0;
- memset(&ipp_req, 0, sizeof(struct rk29_ipp_req));
-#endif
-
- fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
- fbprintk("win0fb_ioctl cmd = %8x, arg = %8x \n", (u32)cmd, (u32)arg);
-
- CHK_SUSPEND(inf);
-
- switch(cmd)
- {
- case FB1_IOCTL_GET_PANEL_SIZE: //get panel size
- {
- u32 panel_size[2];
- if((var->rotate & 0x1ff) == 270 ||(var->rotate & 0x1ff) == 90) {
- panel_size[0] = inf->panel1_info.y_res; //inf->cur_screen->y_res; change for hdmi video size
- panel_size[1] = inf->panel1_info.x_res;
- } else {
- panel_size[0] = inf->panel1_info.x_res;
- panel_size[1] = inf->panel1_info.y_res;
- }
-
- if(copy_to_user(argp, panel_size, 8)) return -EFAULT;
- }
- break;
-
- case FB1_IOCTL_SET_YUV_ADDR: //set y&uv address to register direct
- {
- u32 yuv_phy[2];
-#ifdef FB_WIMO_FLAG
- // printk("FB1_IOCTL_SET_YUV_ADDR1 \n");
- // while(wimo_info.fb_lock)
- // {
- // msleep(10);
- // }
- // printk("FB1_IOCTL_SET_YUV_ADDR 2\n");
-#endif
- if (copy_from_user(yuv_phy, argp, 8))
- return -EFAULT;
-#ifdef CONFIG_FB_ROTATE_VIDEO
- //add by zyc
- if(has_set_rotate == true)
- break;
- last_yuv_phy[0] = yuv_phy[0];
- last_yuv_phy[1] = yuv_phy[1];
-#endif
-
- fix0->smem_start = yuv_phy[0];
- fix0->mmio_start = yuv_phy[1];
- yuv_phy[0] += par->y_offset;
- yuv_phy[1] += par->c_offset;
-#ifdef FB_WIMO_FLAG
- wimo_info.src_y = yuv_phy[0];
- wimo_info.src_uv = yuv_phy[1];
-
-#endif
-
- #if 0
- if((var->rotate == 90) ||(var->rotate == 270))
- #else
- if(var->rotate%360 != 0)
- #endif
- {
- #ifdef CONFIG_FB_ROTATE_VIDEO
- dstoffset = (dstoffset+1)%2;
- ipp_req.src0.fmt = 3;
- ipp_req.src0.YrgbMst = yuv_phy[0];
- ipp_req.src0.CbrMst = yuv_phy[1];
- ipp_req.src0.w = var->xres ;
- ipp_req.src0.h = var->yres ;
- ipp_req.src_vir_w= (var->xres + 15) & (~15);
- ipp_req.dst_vir_w=screen->x_res;
-
- ipp_req.dst0.fmt = 3;
- #ifdef CONFIG_FB_MIRROR_X_Y
- if((var->rotate & 0x1ff)!=0 &&(var->rotate&(X_MIRROR|Y_MIRROR))!= 0 )
- {
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*4;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*5;
- }
- else
- {
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
-
- }
- if(var->xres > screen->x_res)
- {
- ipp_req.dst0.w = screen->x_res;
- ipp_req.dst0.h = screen->y_res;
- } else {
- ipp_req.dst0.w = var->xres;
- ipp_req.dst0.h = var->yres;
- }
- ipp_req.dst_vir_w = (ipp_req.dst0.w + 15) & (~15);
- ipp_req.timeout = 100;
- if((var->rotate & 0x1ff) == 90)
- ipp_req.flag = IPP_ROT_90;
- else if ((var->rotate & 0x1ff) == 180)
- ipp_req.flag = IPP_ROT_180;
- else if((var->rotate & 0x1ff) == 270)
- ipp_req.flag = IPP_ROT_270;
- else if((var->rotate & X_MIRROR) == X_MIRROR )
- ipp_req.flag = IPP_ROT_X_FLIP;
- else if((var->rotate & Y_MIRROR) == Y_MIRROR)
- ipp_req.flag = IPP_ROT_Y_FLIP;
- //ipp_do_blit(&ipp_req);
- ipp_blit_sync(&ipp_req);
- yuv_phy[0] = ipp_req.dst0.YrgbMst;
- yuv_phy[1] = ipp_req.dst0.CbrMst;
- if((var->rotate & 0x1ff)!=0 &&(var->rotate&(X_MIRROR|Y_MIRROR))!= 0 )
- {
- memset(&ipp_req,0,sizeof(struct rk29_ipp_req));
-
- if((var->rotate & X_MIRROR) == X_MIRROR)
- ipp_req.flag = IPP_ROT_X_FLIP;
- else if((var->rotate & Y_MIRROR) == Y_MIRROR)
- ipp_req.flag = IPP_ROT_Y_FLIP;
- else
- printk(">>>>>> %d rotate is not support!\n",var->rotate);
-
- if(var->xres > screen->x_res)
- {
- ipp_req.dst0.w = screen->x_res;
- ipp_req.dst0.h = screen->y_res;
- } else {
- ipp_req.dst0.w = var->xres;
- ipp_req.dst0.h = var->yres;
- }
- ipp_req.src0.fmt = 3;
- ipp_req.src0.YrgbMst = yuv_phy[0];
- ipp_req.src0.CbrMst = yuv_phy[1];
- ipp_req.src0.w = ipp_req.dst0.w;
- ipp_req.src0.h = ipp_req.dst0.h;
-
- ipp_req.src_vir_w= (ipp_req.dst0.w + 15) & (~15);
- ipp_req.dst_vir_w= (ipp_req.dst0.w + 15) & (~15);
-
- ipp_req.dst0.fmt = 3;
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
-
- ipp_req.timeout = 100;
- ipp_blit_sync(&ipp_req);
- yuv_phy[0] = ipp_req.dst0.YrgbMst;
- yuv_phy[1] = ipp_req.dst0.CbrMst;
- }
- fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
- #else
- ipp_req.dst0.YrgbMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*2*dstoffset;
- ipp_req.dst0.CbrMst = inf->fb0->fix.mmio_start + screen->x_res*screen->y_res*(2*dstoffset+1);
- if(var->xres > screen->x_res)
- {
- ipp_req.dst0.w = screen->x_res;
- ipp_req.dst0.h = screen->y_res;
- } else {
- ipp_req.dst0.w = var->xres;
- ipp_req.dst0.h = var->yres;
-
- }
- ipp_req.dst_vir_w = (ipp_req.dst0.w + 15) & (~15);
- ipp_req.timeout = 100;
- if(var->rotate == 90)
- ipp_req.flag = IPP_ROT_90;
- else if(var->rotate == 180)
- ipp_req.flag = IPP_ROT_180;
- else if(var->rotate == 270)
- ipp_req.flag = IPP_ROT_270;
- //ipp_do_blit(&ipp_req);
- ipp_blit_sync(&ipp_req);
-
- fbprintk("yaddr=0x%x,uvaddr=0x%x\n",ipp_req.dst0.YrgbMst,ipp_req.dst0.CbrMst);
- yuv_phy[0] = ipp_req.dst0.YrgbMst;
- yuv_phy[1] = ipp_req.dst0.CbrMst;
- #endif
- fix0->smem_start = yuv_phy[0];
- fix0->mmio_start = yuv_phy[1];
- #else //CONFIG_FB_ROTATE_VIDEO
- printk("LCDC not support rotate!\n");
- #endif
- }
-
- LcdWrReg(inf, WIN0_YRGB_MST, yuv_phy[0]);
- LcdWrReg(inf, WIN0_CBR_MST, yuv_phy[1]);
- // enable win0 after the win0 par is seted
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE(par->par_seted && par->addr_seted));
- par->addr_seted = 1;
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- if(par->par_seted) {
- unsigned long flags;
-
- local_irq_save(flags);
- par->mirror.y_offset = yuv_phy[0];
- par->mirror.c_offset = yuv_phy[1];
- local_irq_restore(flags);
-
- mcu_refresh(inf);
- //printk("0x%.8x 0x%.8x mirror\n", par->mirror.y_offset, par->mirror.c_offset);
- }
- }
- break;
-
- case FB1_IOCTL_SET_ROTATE: //change MCU panel scan direction
- fbprintk(">>>>>> change lcdc direction(%d) \n", (int)arg);
- #ifdef CONFIG_FB_ROTATE_VIDEO
- //zyc add
- has_set_rotate = true;
- #ifdef CONFIG_FB_MIRROR_X_Y
- if( ((arg&0x1ff)%90) == 0 && ( arg&(~0xfff))==0 )
- {
- if( (arg&( X_MIRROR | Y_MIRROR ) )== (X_MIRROR | Y_MIRROR) )
- var->rotate = ROTATE_180;
- else if((arg&( ROTATE_90 | X_MIRROR | Y_MIRROR ) )== ( ROTATE_90 | X_MIRROR | Y_MIRROR))
- var->rotate = ROTATE_270;
- else if((arg&( ROTATE_180 | X_MIRROR | Y_MIRROR ) )== ( ROTATE_180 | X_MIRROR | Y_MIRROR))
- var->rotate = ROTATE_90;
- else if((arg&( ROTATE_270 | X_MIRROR | Y_MIRROR ) )== ( ROTATE_270 | X_MIRROR | Y_MIRROR))
- var->rotate = ROTATE_0;
- else
- #else
- if(arg == ROTATE_0 || arg==ROTATE_90 || arg == ROTATE_180 || arg==ROTATE_270)
- {
- #endif
- var->rotate = arg;
- }
- else
- printk(">>>>>> %d rotate is not support!\n",(int)arg);
-
- #else //CONFIG_FB_ROTATE_VIDEO
- printk("LCDC not support rotate!\n");
- #endif
- break;
- case FB1_IOCTL_SET_WIN0_TOP:
- fbprintk(">>>>>> FB1_IOCTL_SET_WIN0_TOP %d\n",arg);
- LcdMskReg(inf, DSP_CTRL0, m_W0_ON_TOP, v_W0_ON_TOP(arg));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- break;
- default:
- break;
- }
- return 0;
-}
-
-static struct fb_ops fb1_ops = {
- .owner = THIS_MODULE,
- .fb_open = fb1_open,
- .fb_release = fb1_release,
- .fb_check_var = fb1_check_var,
- .fb_set_par = fb1_set_par,
- .fb_blank = fb1_blank,
- .fb_pan_display = fb1_pan_display,
- .fb_ioctl = fb1_ioctl,
- .fb_setcolreg = fb_setcolreg,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
-};
-
-static struct fb_ops fb0_ops = {
- .owner = THIS_MODULE,
- .fb_check_var = fb0_check_var,
- .fb_set_par = fb0_set_par,
- .fb_blank = fb0_blank,
- .fb_pan_display = fb0_pan_display,
- .fb_ioctl = fb0_ioctl,
- .fb_setcolreg = fb_setcolreg,
- .fb_fillrect = cfb_fillrect,
- .fb_copyarea = cfb_copyarea,
- .fb_imageblit = cfb_imageblit,
- //.fb_cursor = rk29_set_cursor,
-};
-
-int fb_get_video_mode(void)
-{
- struct rk29fb_inf *inf;
- if(!g_pdev)
- return 0;
- inf = platform_get_drvdata(g_pdev);
- return inf->video_mode;
-}
-/*
-enable: 1, switch to tv or hdmi; 0, switch to lcd
-*/
-int FB_Switch_Screen( struct rk29fb_screen *screen, u32 enable )
-{
- struct rk29fb_inf *inf = platform_get_drvdata(g_pdev);
- // struct rk29fb_info *mach_info = g_pdev->dev.platform_data;
- struct rk29fb_info *mach_info = g_pdev->dev.platform_data;
-
- memcpy(&inf->panel2_info, screen, sizeof( struct rk29fb_screen ));
-
- if(enable)inf->cur_screen = &inf->panel2_info;
- else inf->cur_screen = &inf->panel1_info;
-
- /* Black out, because some display device need clock to standby */
- //LcdMskReg(inf, DSP_CTRL_REG1, m_BLACK_OUT, v_BLACK_OUT(1));
- // LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE, v_W0_ENABLE(0));
- // LcdMskReg(inf, SYS_CONFIG, m_W1_ENABLE, v_W1_ENABLE(0));
- LcdMskReg(inf, DSP_CTRL1, m_BLACK_MODE, v_BLACK_MODE(1));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- wake_lock(&idlelock);
- msleep(20);
- wake_unlock(&idlelock);
-
- if(inf->cur_screen->standby) inf->cur_screen->standby(1);
- // operate the display_on pin to power down the lcd
-#ifdef CONFIG_HDMI_DUAL_DISP
- if(inf->panel1_info.sscreen_get!=NULL)
- inf->panel1_info.sscreen_get(&inf->panel1_info,inf->panel2_info.hdmi_resolution);
- else
- printk("warnig : LCD driver do not support dual display");
- if(inf->panel1_info.sscreen_set!=NULL)
- inf->panel1_info.sscreen_set(&inf->panel1_info,enable);
- else
- printk("warnig : LCD driver do not support dual display");
-#else
- if(enable && mach_info->io_disable)mach_info->io_disable(); //close lcd out
- else if (mach_info->io_enable)mach_info->io_enable(); //open lcd out
-#endif
- load_screen(inf->fb0, 0);
- mcu_refresh(inf);
-
- fb1_set_par(inf->fb1);
- fb0_set_par(inf->fb0);
- LcdMskReg(inf, DSP_CTRL1, m_BLACK_MODE, v_BLACK_MODE(0));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- rk29fb_notify(inf, enable ? RK29FB_EVENT_HDMI_ON : RK29FB_EVENT_HDMI_OFF);
- return 0;
-}
-
-static ssize_t dsp_win0_info_read(struct device *device,
- struct device_attribute *attr, char *buf)
-{
- //char * s = _buf;
- struct rk29fb_inf *inf = platform_get_drvdata(g_pdev);
- struct rk29fb_screen *screen = inf->cur_screen;
-
- u16 xpos=0,ypos=0,xsize=0,ysize=0;
-
- fbprintk("%s\n",__FUNCTION__);
- xpos = LcdRdReg(inf, WIN0_DSP_ST) & 0xffff;
- ypos = (LcdRdReg(inf, WIN0_DSP_ST)>>16) & 0xffff;
-
- xpos -= (screen->left_margin + screen->hsync_len);
- ypos -= (screen->upper_margin + screen->vsync_len);
-
- xsize=LcdRdReg(inf, WIN0_DSP_INFO)& 0xffff;
- ysize=(LcdRdReg(inf, WIN0_DSP_INFO)>>16) & 0xffff;
- fbprintk("%s %d , %d, %d ,%d\n",__FUNCTION__,xpos,ypos,xsize,ysize);
- rk29_set_cursor_test(inf->fb0);
-
- return snprintf(buf, PAGE_SIZE, "%d,%d,%d,%d\n", xpos,ypos,xsize,ysize);
-}
-
-static ssize_t dsp_win0_info_write(struct device *device,
- struct device_attribute *attr, const char *buf, size_t count)
-{
- printk("%s\n",__FUNCTION__);
- printk("%s %x \n",__FUNCTION__,*buf);
- return count;
-}
-
-static DEVICE_ATTR(dsp_win0_info, S_IRUGO|S_IWUSR, dsp_win0_info_read, dsp_win0_info_write);
-
-static irqreturn_t rk29fb_irq(int irq, void *dev_id)
-{
- struct platform_device *pdev = (struct platform_device*)dev_id;
- struct rk29fb_inf *inf = platform_get_drvdata(pdev);
- struct win0_par *par = (struct win0_par *)inf->fb1->par;
- if(!inf)
- return IRQ_HANDLED;
-
- //fbprintk(">>>>>> %s : %s \n", __FILE__, __FUNCTION__);
-
- LcdMskReg(inf, INT_STATUS, m_FRM_STARTCLEAR, v_FRM_STARTCLEAR(1));
-
- if(SCREEN_MCU == inf->cur_screen->type)
- {
- inf->mcu_isrcnt = !inf->mcu_isrcnt;
- if(inf->mcu_isrcnt)
- return IRQ_HANDLED;
-
- if(IsMcuUseFmk())
- {
- if(LcdReadBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST) && (inf->mcu_fmksync == 0))
- {
- inf->mcu_fmksync = 1;
- if(inf->cur_screen->refresh)
- inf->cur_screen->refresh(REFRESH_END);
- inf->mcu_fmksync = 0;
- }
- else
- {
- return IRQ_HANDLED;
- }
- }
- else
- {
- if(inf->mcu_needflush) {
- if(inf->cur_screen->refresh)
- inf->cur_screen->refresh(REFRESH_PRE);
- inf->mcu_needflush = 0;
- inf->mcu_isrcnt = 0;
- LcdSetRegisterBit(inf, MCU_TIMING_CTRL, m_MCU_HOLDMODE_FRAME_ST);
- } else {
- if(inf->cur_screen->refresh)
- inf->cur_screen->refresh(REFRESH_END);
- }
- }
- }
-#if ANDROID_USE_THREE_BUFS
- new_frame_seted = 1;
-#endif
-
- if(waitqueue_active(&par->wait)) {
- if (par->mirror.c_offset == 0)
- printk("error: no new buffer to display\n");
-
- par->done.y_offset = par->displ.y_offset;
- par->done.c_offset = par->displ.c_offset;
- par->displ.y_offset = par->mirror.y_offset;
- par->displ.c_offset = par->mirror.c_offset;
- par->mirror.y_offset = 0;
- par->mirror.c_offset = 0;
-
- //printk("0x%.8x 0x%.8x displaying\n", par->displ.y_offset, par->displ.c_offset);
- //printk("0x%.8x 0x%.8x done\n", par->done.y_offset, par->done.c_offset);
- wake_up_interruptible(&par->wait);
- }
-
- wq_condition2 = 1;
- wq_condition = 1;
- wake_up_interruptible(&wq);
-
- rk29fb_irq_notify_ddr();
- return IRQ_HANDLED;
-}
-
-#ifdef CONFIG_HAS_EARLYSUSPEND
-
-struct suspend_info {
- struct early_suspend early_suspend;
- struct rk29fb_inf *inf;
-};
-
-static void rk29fb_early_suspend(struct early_suspend *h)
-{
- struct suspend_info *info = container_of(h, struct suspend_info,
- early_suspend);
-
- struct rk29fb_inf *inf = info->inf;
- struct rk29fb_info *mach_info = g_pdev->dev.platform_data;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- if(!inf) {
- printk("inf==0, rk29fb_suspend fail! \n");
- return;
- }
-
-#ifdef CONFIG_CLOSE_WIN1_DYNAMIC
- cancel_delayed_work_sync(&rk29_win1_check_work);
-#endif
-#ifdef CONFIG_HDMI_DUAL_DISP
- if(mach_info->io_disable) // close lcd pwr when output screen is lcd
- mach_info->io_disable(); //close lcd out
-#else
- if((inf->cur_screen != &inf->panel2_info) && mach_info->io_disable) // close lcd pwr when output screen is lcd
- mach_info->io_disable(); //close lcd out
-#endif
- if(inf->cur_screen->standby)
- {
- fbprintk(">>>>>> power down the screen! \n");
- inf->cur_screen->standby(1);
- }
- LcdMskReg(inf, SYS_CONFIG, m_W0_ENABLE | m_W1_ENABLE, v_W0_ENABLE(0) | v_W1_ENABLE(0));
-
- LcdMskReg(inf, DSP_CTRL0, m_HSYNC_POLARITY | m_VSYNC_POLARITY | m_DEN_POLARITY ,
- v_HSYNC_POLARITY(1) | v_VSYNC_POLARITY(1) | v_DEN_POLARITY(1) );
-
- LcdMskReg(inf, DSP_CTRL1, m_BLANK_MODE , v_BLANK_MODE(1));
- LcdMskReg(inf, SYS_CONFIG, m_STANDBY, v_STANDBY(1));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- if(!inf->in_suspend)
- {
- fbprintk(">>>>>> diable the lcdc clk! \n");
- wake_lock(&idlelock);
- msleep(100);
- wake_unlock(&idlelock);
- clk_disable(inf->aclk_ddr_lcdc);
- clk_disable(inf->aclk_disp_matrix);
- clk_disable(inf->hclk_cpu_display);
- clk_disable(inf->clk);
- if (inf->dclk){
- clk_disable(inf->dclk);
- }
- if(inf->clk){
- clk_disable(inf->aclk);
- }
- //clk_disable(inf->pd_display);
-
- inf->in_suspend = 1;
- }
-}
-
-static void rk29fb_early_resume(struct early_suspend *h)
-{
- struct suspend_info *info = container_of(h, struct suspend_info,
- early_suspend);
-
- struct rk29fb_inf *inf = info->inf;
- struct rk29fb_screen *screen = inf->cur_screen;
- struct rk29fb_info *mach_info = g_pdev->dev.platform_data;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
- if(!inf) {
- printk("inf==0, rk29fb_resume fail! \n");
- return ;
- }
-
- if(inf->in_suspend)
- {
- inf->in_suspend = 0;
- fbprintk(">>>>>> enable the lcdc clk! \n");
- // clk_enable(inf->pd_display);
- clk_enable(inf->aclk_disp_matrix);
- clk_enable(inf->hclk_cpu_display);
- clk_enable(inf->clk);
- clk_enable(inf->aclk_ddr_lcdc);
-
- if (inf->dclk){
- clk_enable(inf->dclk);
- }
- if(inf->clk){
- clk_enable(inf->aclk);
- }
- usleep_range(100*1000, 100*1000);
- }
- LcdMskReg(inf, DSP_CTRL1, m_BLANK_MODE , v_BLANK_MODE(0));
- LcdMskReg(inf, SYS_CONFIG, m_STANDBY, v_STANDBY(0));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
-
- LcdMskReg(inf, DSP_CTRL0, m_HSYNC_POLARITY | m_VSYNC_POLARITY | m_DEN_POLARITY ,
- v_HSYNC_POLARITY(screen->pin_hsync) | v_VSYNC_POLARITY(screen->pin_vsync) | v_DEN_POLARITY(screen->pin_den) );
-
- if(inf->cur_screen->standby)
- {
- fbprintk(">>>>>> power on the screen! \n");
- inf->cur_screen->standby(0);
- }
- usleep_range(10*1000, 10*1000);
- memcpy((u8*)inf->preg, (u8*)&inf->regbak, 0xa4); //resume reg
- usleep_range(40*1000, 40*1000);
- #ifdef CONFIG_HDMI_DUAL_DISP
- if(mach_info->io_enable) // open lcd pwr when output screen is lcd
- mach_info->io_enable(); //close lcd out
- #else
- if((inf->cur_screen != &inf->panel2_info) && mach_info->io_enable) // open lcd pwr when output screen is lcd
- mach_info->io_enable(); //close lcd out
- #endif
-}
-
-static struct suspend_info suspend_info = {
- .early_suspend.suspend = rk29fb_early_suspend,
- .early_suspend.resume = rk29fb_early_resume,
- .early_suspend.level = EARLY_SUSPEND_LEVEL_DISABLE_FB,
-};
-#endif
-struct fb_info *g_fb0_inf = NULL; //add cym@rk 20101027 for charger logo
-static int __devinit rk29fb_probe (struct platform_device *pdev)
-{
- struct rk29fb_inf *inf = NULL;
- struct resource *res = NULL;
- struct resource *mem = NULL;
- struct rk29fb_info *mach_info = NULL;
- struct rk29fb_screen *screen = NULL;
- struct win0_par* par = NULL;
- int irq = 0;
- int ret = 0;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- /* Malloc rk29fb_inf and set it to pdev for drvdata */
- fbprintk(">> Malloc rk29fb_inf and set it to pdev for drvdata \n");
- inf = kmalloc(sizeof(struct rk29fb_inf), GFP_KERNEL);
- if(!inf)
- {
- dev_err(&pdev->dev, ">> inf kmalloc fail!");
- ret = -ENOMEM;
- goto release_drvdata;
- }
- memset(inf, 0, sizeof(struct rk29fb_inf));
- platform_set_drvdata(pdev, inf);
-
- mach_info = pdev->dev.platform_data;
- /* Fill screen info and set current screen */
- fbprintk(">> Fill screen info and set current screen \n");
- #ifdef CONFIG_DEFAULT_OUT_HDMI // set hdmi for default output
- hdmi_get_default_resolution(&inf->panel1_info);
- #else
- set_lcd_info(&inf->panel1_info, mach_info->lcd_info);
- #endif
-
- inf->cur_screen = &inf->panel1_info;
- screen = inf->cur_screen;
- if(SCREEN_NULL==screen->type)
- {
- dev_err(&pdev->dev, ">> Please select a display device! \n");
- ret = -EINVAL;
- goto release_drvdata;
- }
-
- /* get virtual basic address of lcdc register */
- fbprintk(">> get virtual basic address of lcdc register \n");
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "lcdc reg");
- if (res == NULL)
- {
- dev_err(&pdev->dev, "failed to get memory registers\n");
- ret = -ENOENT;
- goto release_drvdata;
- }
- inf->reg_phy_base = res->start;
- inf->len = (res->end - res->start) + 1;
- mem = request_mem_region(inf->reg_phy_base, inf->len, pdev->name);
- if (mem == NULL)
- {
- dev_err(&pdev->dev, "failed to get memory region\n");
- ret = -ENOENT;
- goto release_drvdata;
- }
- fbprintk("inf->reg_phy_base = 0x%08x, inf->len = %d \n", inf->reg_phy_base, inf->len);
- inf->reg_vir_base = ioremap(inf->reg_phy_base, inf->len);
- if (inf->reg_vir_base == NULL)
- {
- dev_err(&pdev->dev, "ioremap() of registers failed\n");
- ret = -ENXIO;
- goto release_drvdata;
- }
- inf->preg = (LCDC_REG*)inf->reg_vir_base;
-
- /* Prepare win1 info */
- fbprintk(">> Prepare win1 info \n");
- inf->fb0 = framebuffer_alloc(sizeof(struct win0_par), &pdev->dev);
- if(!inf->fb0)
- {
- dev_err(&pdev->dev, ">> fb0 framebuffer_alloc fail!");
- inf->fb0 = NULL;
- ret = -ENOMEM;
- goto release_win1fb;
- }
-
- par = (struct win0_par*)inf->fb0->par;
- strcpy(inf->fb0->fix.id, "fb0");
- inf->fb0->fix.type = FB_TYPE_PACKED_PIXELS;
- inf->fb0->fix.type_aux = 0;
- inf->fb0->fix.xpanstep = 1;
- inf->fb0->fix.ypanstep = 1;
- inf->fb0->fix.ywrapstep = 0;
- inf->fb0->fix.accel = FB_ACCEL_NONE;
- inf->fb0->fix.visual = FB_VISUAL_TRUECOLOR;
- inf->fb0->fix.smem_len = 0;
- inf->fb0->fix.line_length = 0;
- inf->fb0->fix.smem_start = 0;
-
- inf->fb0->var.xres = screen->x_res;
- inf->fb0->var.yres = screen->y_res;
- inf->fb0->var.bits_per_pixel = 16;
- inf->fb0_color_deepth = 0;
- inf->fb0->var.xres_virtual = screen->x_res;
- inf->fb0->var.yres_virtual = screen->y_res;
- inf->fb0->var.width = screen->width;
- inf->fb0->var.height = screen->height;
- //inf->fb0->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
- inf->fb0->var.left_margin = screen->left_margin;
- inf->fb0->var.right_margin = screen->right_margin;
- inf->fb0->var.upper_margin = screen->upper_margin;
- inf->fb0->var.lower_margin = screen->lower_margin;
- inf->fb0->var.vsync_len = screen->vsync_len;
- inf->fb0->var.hsync_len = screen->hsync_len;
- inf->fb0->var.red = def_rgb_16.red;
- inf->fb0->var.green = def_rgb_16.green;
- inf->fb0->var.blue = def_rgb_16.blue;
- inf->fb0->var.transp = def_rgb_16.transp;
-
- inf->fb0->var.nonstd = 0; //win1 format & ypos & xpos (ypos<<20 + xpos<<8 + format)
- inf->fb0->var.grayscale = 0; //win1 transprent mode & value(mode<<8 + value)
- inf->fb0->var.activate = FB_ACTIVATE_NOW;
- inf->fb0->var.accel_flags = 0;
- inf->fb0->var.vmode = FB_VMODE_NONINTERLACED;
-
- inf->fb0->fbops = &fb0_ops;
- inf->fb0->flags = FBINFO_FLAG_DEFAULT;
- inf->fb0->pseudo_palette = par->pseudo_pal;
- inf->fb0->screen_base = 0;
-
- memset(par, 0, sizeof(struct win0_par));
-
- ret = fb_alloc_cmap(&inf->fb0->cmap, 256, 0);
- if (ret < 0)
- goto release_cmap;
-
- g_fb0_inf = inf->fb0; //add cym@rk 20101027
-
- /* alloc win1 buf */
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "win1 buf");
- if (res == NULL)
- {
- dev_err(&pdev->dev, "failed to get win1 memory \n");
- ret = -ENOENT;
- goto release_win1fb;
- }
- inf->fb0->fix.smem_start = res->start;
- inf->fb0->fix.smem_len = res->end - res->start + 1;
- inf->fb0->screen_base = ioremap(res->start, inf->fb0->fix.smem_len);
- memset(inf->fb0->screen_base, 0, inf->fb0->fix.smem_len);
-
- #ifdef CONFIG_FB_WORK_IPP
- /* alloc win1 ipp buf */
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "win1 ipp buf");
- if (res == NULL)
- {
- dev_err(&pdev->dev, "failed to get win1 ipp memory \n");
- ret = -ENOENT;
- goto release_win1fb;
- }
- inf->fb0->fix.mmio_start = res->start;
- inf->fb0->fix.mmio_len = res->end - res->start + 1;
- #endif
-
- /* Prepare win0 info */
- fbprintk(">> Prepare win0 info \n");
- inf->fb1 = framebuffer_alloc(sizeof(struct win0_par), &pdev->dev);
- if(!inf->fb1)
- {
- dev_err(&pdev->dev, ">> fb1 framebuffer_alloc fail!");
- inf->fb1 = NULL;
- ret = -ENOMEM;
- goto release_win0fb;
- }
-
- par = (struct win0_par*)inf->fb1->par;
-
- strcpy(inf->fb1->fix.id, "fb1");
- inf->fb1->fix.type = FB_TYPE_PACKED_PIXELS;
- inf->fb1->fix.type_aux = 0;
- inf->fb1->fix.xpanstep = 1;
- inf->fb1->fix.ypanstep = 1;
- inf->fb1->fix.ywrapstep = 0;
- inf->fb1->fix.accel = FB_ACCEL_NONE;
- inf->fb1->fix.visual = FB_VISUAL_TRUECOLOR;
- inf->fb1->fix.smem_len = 0;
- inf->fb1->fix.line_length = 0;
- inf->fb1->fix.smem_start = 0;
-
- inf->fb1->var.xres = screen->x_res;
- inf->fb1->var.yres = screen->y_res;
- inf->fb1->var.bits_per_pixel = 16;
- inf->fb1->var.xres_virtual = screen->x_res;
- inf->fb1->var.yres_virtual = screen->y_res;
- inf->fb1->var.width = screen->width;
- inf->fb1->var.height = screen->height;
- //inf->fb1->var.pixclock = div_u64(1000000000000llu, screen->pixclock);
- inf->fb1->var.left_margin = screen->left_margin;
- inf->fb1->var.right_margin = screen->right_margin;
- inf->fb1->var.upper_margin = screen->upper_margin;
- inf->fb1->var.lower_margin = screen->lower_margin;
- inf->fb1->var.vsync_len = screen->vsync_len;
- inf->fb1->var.hsync_len = screen->hsync_len;
- inf->fb1->var.red = def_rgb_16.red;
- inf->fb1->var.green = def_rgb_16.green;
- inf->fb1->var.blue = def_rgb_16.blue;
- inf->fb1->var.transp = def_rgb_16.transp;
-
- inf->fb1->var.nonstd = 0; //win0 format & ypos & xpos (ypos<<20 + xpos<<8 + format)
- inf->fb1->var.grayscale = ((inf->fb1->var.yres<<20)&0xfff00000) + ((inf->fb1->var.xres<<8)&0xfff00);//win0 xsize & ysize
- inf->fb1->var.activate = FB_ACTIVATE_NOW;
- inf->fb1->var.accel_flags = 0;
- inf->fb1->var.vmode = FB_VMODE_NONINTERLACED;
-
- inf->fb1->fbops = &fb1_ops;
- inf->fb1->flags = FBINFO_FLAG_DEFAULT;
- inf->fb1->pseudo_palette = par->pseudo_pal;
- inf->fb1->screen_base = 0;
-
- memset(par, 0, sizeof(struct win0_par));
-
- init_waitqueue_head(&par->wait);
-
- /* Init all lcdc and lcd before register_framebuffer. */
- /* because after register_framebuffer, the win1fb_check_par and winfb_set_par execute immediately */
- fbprintk(">> Init all lcdc and lcd before register_framebuffer \n");
- init_lcdc(inf->fb0);
-
- #if 0 //def CONFIG_CPU_FREQ
- // inf->freq_transition.notifier_call = rk29fb_freq_transition;
- // cpufreq_register_notifier(&inf->freq_transition, CPUFREQ_TRANSITION_NOTIFIER);
- #endif
- fbprintk("got clock\n");
-
- if(mach_info)
- {
- struct rk29_fb_setting_info fb_setting;
- if( OUT_P888==inf->cur_screen->face ) // set lcdc iomux
- {
- fb_setting.data_num = 24;
- }
- else if(OUT_P666 == inf->cur_screen->face )
- {
- fb_setting.data_num = 18;
- }
- else
- {
- fb_setting.data_num = 16;
- }
- fb_setting.den_en = 1;
- fb_setting.vsync_en = 1;
- fb_setting.disp_on_en = 1;
- fb_setting.standby_en = 1;
- if( inf->cur_screen->mcu_usefmk )
- fb_setting.mcu_fmk_en =1;
- mach_info->io_init(&fb_setting);
- }
-
- //set_lcd_pin(pdev, 1);
- mdelay(10);
- g_pdev = pdev;
- inf->mcu_usetimer = 1;
- inf->mcu_fmksync = 0;
- load_screen(inf->fb0, 1);
-
- /* Register framebuffer(fb0 & fb1) */
- fbprintk(">> Register framebuffer(fb0) \n");
- ret = register_framebuffer(inf->fb0);
- if(ret<0)
- {
- printk(">> fb0 register_framebuffer fail!\n");
- ret = -EINVAL;
- goto release_win0fb;
- }
- fbprintk(">> Register framebuffer(fb1) \n");
-
- ret = register_framebuffer(inf->fb1);
- if(ret<0)
- {
- printk(">> fb1 register_framebuffer fail!\n");
- ret = -EINVAL;
- goto unregister_win1fb;
- }
-
- ret = device_create_file(inf->fb1->dev, &dev_attr_dsp_win0_info);
- if(ret)
- {
- printk(">> fb1 dsp win0 info device_create_file err\n");
- ret = -EINVAL;
- }
-#ifdef CONFIG_HAS_EARLYSUSPEND
- suspend_info.inf = inf;
- register_early_suspend(&suspend_info.early_suspend);
-#endif
-
- /* get and request irq */
- fbprintk(">> get and request irq \n");
- irq = platform_get_irq(pdev, 0);
- if (irq < 0) {
- dev_err(&pdev->dev, "no irq for device\n");
- ret = -ENOENT;
- goto unregister_win1fb;
- }
- ret = request_irq(irq, rk29fb_irq, IRQF_DISABLED, pdev->name, pdev);
- if (ret) {
- dev_err(&pdev->dev, "cannot get irq %d - err %d\n", irq, ret);
- ret = -EBUSY;
- goto release_irq;
- }
-
- if( inf->cur_screen->mcu_usefmk && (mach_info->mcu_fmk_pin != -1) )
- {
- ret = request_irq(gpio_to_irq(mach_info->mcu_fmk_pin), mcu_irqfmk, GPIOEdgelFalling, pdev->name, pdev);
- if (ret)
- {
- dev_err(&pdev->dev, "cannot get fmk irq %d - err %d\n", irq, ret);
- ret = -EBUSY;
- goto release_irq;
- }
- }
- #ifdef CONFIG_MFD_RK610
- rk610_lcd_scaler_set_param(&inf->panel1_info,0);
- #endif
-#if !defined(CONFIG_FRAMEBUFFER_CONSOLE) && defined(CONFIG_LOGO)
- fb0_set_par(inf->fb0);
- if (fb_prepare_logo(inf->fb0, FB_ROTATE_UR)) {
- /* Start display and show logo on boot */
- fb_set_cmap(&inf->fb0->cmap, inf->fb0);
- fb_show_logo(inf->fb0, FB_ROTATE_UR);
- fb0_blank(FB_BLANK_UNBLANK, inf->fb0);
- }
-#endif
-
- printk(" %s ok\n", __FUNCTION__);
- return ret;
-
-release_irq:
- if(irq>=0)
- free_irq(irq, pdev);
-unregister_win1fb:
- unregister_framebuffer(inf->fb0);
-release_win0fb:
- if(inf->fb1)
- framebuffer_release(inf->fb1);
- inf->fb1 = NULL;
-release_cmap:
- if(&inf->fb0->cmap)
- fb_dealloc_cmap(&inf->fb0->cmap);
-release_win1fb:
- if(inf->fb0)
- framebuffer_release(inf->fb0);
- inf->fb0 = NULL;
-release_drvdata:
- if(inf && inf->reg_vir_base)
- iounmap(inf->reg_vir_base);
- if(inf && mem)
- release_mem_region(inf->reg_phy_base, inf->len);
- if(inf)
- kfree(inf);
- platform_set_drvdata(pdev, NULL);
- return ret;
-}
-
-static int __devexit rk29fb_remove(struct platform_device *pdev)
-{
- struct rk29fb_inf *inf = platform_get_drvdata(pdev);
- struct fb_info *info = NULL;
- //pm_message_t msg;
- struct rk29fb_info *mach_info = NULL;
- int irq = 0;
-
- fbprintk(">>>>>> %s : %s\n", __FILE__, __FUNCTION__);
-
- if(!inf) {
- printk("inf==0, rk29_fb_remove fail! \n");
- return -EINVAL;
- }
- device_remove_file(inf->fb1->dev, &dev_attr_dsp_win0_info);
-
- irq = platform_get_irq(pdev, 0);
- if (irq >0)
- {
- free_irq(irq, pdev);
- }
-
- mach_info = pdev->dev.platform_data;
- if(mach_info->mcu_fmk_pin)
- {
- free_irq(gpio_to_irq(mach_info->mcu_fmk_pin), pdev);
- }
-
- if(mach_info->io_disable)
- mach_info->io_disable(); //close lcd out
-
- // blank the lcdc
- if(inf->fb1)
- fb1_blank(FB_BLANK_POWERDOWN, inf->fb1);
- if(inf->fb0)
- fb0_blank(FB_BLANK_POWERDOWN, inf->fb0);
-
- // suspend the lcdc
- //rk29fb_suspend(pdev, msg);
- // unmap memory and release framebuffer
- if(inf->fb1) {
- info = inf->fb1;
- if (info->screen_base) {
- //dma_free_writecombine(NULL, PAGE_ALIGN(info->fix.smem_len),info->screen_base, info->fix.smem_start);
- info->screen_base = 0;
- info->fix.smem_start = 0;
- info->fix.smem_len = 0;
- }
- unregister_framebuffer(inf->fb1);
- framebuffer_release(inf->fb1);
- inf->fb1 = NULL;
- }
- if(inf->fb0) {
- info = inf->fb0;
- if (info->screen_base) {
- // dma_free_writecombine(NULL, PAGE_ALIGN(info->fix.smem_len),info->screen_base, info->fix.smem_start);
- info->screen_base = 0;
- info->fix.smem_start = 0;
- info->fix.smem_len = 0;
- }
- unregister_framebuffer(inf->fb0);
- framebuffer_release(inf->fb0);
- inf->fb0 = NULL;
- }
-
- #if 0 //def CONFIG_CPU_FREQ
- // cpufreq_unregister_notifier(&inf->freq_transition, CPUFREQ_TRANSITION_NOTIFIER);
- #endif
-
- msleep(100);
-
- if (inf->clk)
- {
- clk_disable(inf->clk);
- clk_put(inf->clk);
- inf->clk = NULL;
- }
- if (inf->dclk)
- {
- clk_disable(inf->dclk);
- clk_put(inf->dclk);
- inf->dclk = NULL;
- }
-
- kfree(inf);
- platform_set_drvdata(pdev, NULL);
-
- return 0;
-}
-
-static void rk29fb_shutdown(struct platform_device *pdev)
-{
- struct rk29fb_inf *inf = platform_get_drvdata(pdev);
- struct rk29fb_info *mach_info = pdev->dev.platform_data;;
-
- fbprintk("----------------------------rk29fb_shutdown----------------------------\n");
-
- if(mach_info->io_disable)
- mach_info->io_disable(); //close lcd out
-
- if(!inf->in_suspend)
- {
- LcdMskReg(inf, DSP_CTRL1, m_BLANK_MODE , v_BLANK_MODE(1));
- LcdMskReg(inf, SYS_CONFIG, m_STANDBY, v_STANDBY(1));
- LcdWrReg(inf, REG_CFG_DONE, 0x01);
- mdelay(100);
- clk_disable(inf->aclk_ddr_lcdc);
- clk_disable(inf->aclk_disp_matrix);
- clk_disable(inf->hclk_cpu_display);
- clk_disable(inf->clk);
- if(inf->dclk){
- clk_disable(inf->dclk);
- }
- if(inf->clk){
- clk_disable(inf->aclk);
- }
- clk_disable(inf->pd_display);
- //pmu_set_power_domain(PD_DISPLAY, 0);
- inf->in_suspend = 1;
- }
-
-}
-
-static struct platform_driver rk29fb_driver = {
- .probe = rk29fb_probe,
- .remove = __devexit_p(rk29fb_remove),
- .driver = {
- .name = "rk29-fb",
- .owner = THIS_MODULE,
- },
- .shutdown = rk29fb_shutdown,
-};
-
-static int __init rk29fb_init(void)
-{
- wake_lock_init(&idlelock, WAKE_LOCK_IDLE, "fb");
- return platform_driver_register(&rk29fb_driver);
-}
-
-static void __exit rk29fb_exit(void)
-{
- platform_driver_unregister(&rk29fb_driver);
-}
-
-fs_initcall(rk29fb_init);
-module_exit(rk29fb_exit);
-
-
-MODULE_AUTHOR(" zyw@rock-chips.com");
-MODULE_DESCRIPTION("Driver for rk29 fb device");
-MODULE_LICENSE("GPL");
-
-
+++ /dev/null
-/* drivers/video/rk29_fb.h
- *
- * Copyright (C) 2010 ROCKCHIP, Inc.
- *
- * This software is licensed under the terms of the GNU General Public
- * License version 2, as published by the Free Software Foundation, and
- * may be copied, distributed, and modified under those terms.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- */
-
-#ifndef __ARCH_ARM_MACH_RK29_FB_H
-#define __ARCH_ARM_MACH_RK29_FB_H
-
-/********************************************************************
-** ºê¶¨Òå *
-********************************************************************/
-/* ÊäÍùÆÁµÄÊý¾Ý¸ñʽ */
-#define OUT_P888 0
-#define OUT_P666 1 //666µÄÆÁ, ½ÓDATA0-17
-#define OUT_P565 2 //565µÄÆÁ, ½ÓDATA0-15
-#define OUT_S888x 4
-#define OUT_CCIR656 6
-#define OUT_S888 8
-#define OUT_S888DUMY 12
-#define OUT_P16BPP4 24 //Ä£Äⷽʽ,¿ØÖÆÆ÷²¢²»Ö§³Ö
-#define OUT_D888_P666 0x21 //666µÄÆÁ, ½ÓDATA2-7, DATA10-15, DATA18-23
-#define OUT_D888_P565 0x22 //565µÄÆÁ, ½ÓDATA3-7, DATA10-15, DATA19-23
-
-/* SYS_CONFIG */
-#define m_W2_FORMAT (3<<0)
-#define m_W1_FORMAT (1<<2)
-#define m_W0_FORMAT (7<<3)
-#define m_W0_CBR_DEFLICK_EN (1<<6)
-#define m_W0_YRGB_DEFLICK_EN (1<<7)
-#define m_INTERIACE_EN (1<<8)
-#define m_W2_ENABLE (1<<9)
-#define m_W1_ENABLE (1<<10)
-#define m_W0_ENABLE (1<<11)
-#define m_HWC_ENABLE (1<<12)
-#define m_HWC_RELOAD_EN (1<<13)
-#define m_W2_INTERLACE_READ (1<<14)
-#define m_W1_INTERLACE_READ (1<<15)
-#define m_W0_INTERLACE_READ (1<<16)
-#define m_STANDBY (1<<17)
-#define m_HWC_BURST (3<<18)
-#define m_W2_BURST (3<<20)
-#define m_W1_BURST (3<<22)
-#define m_W0_BURST (3<<24)
-#define m_W2_LUT_CTL (1<<26)
-#define m_DSIP_LUT_CTL (1<<27)
-#define m_HWC_REVERSED_COLOR (1<<28)
-#define m_W1_AXI_OUTSTANDING2 (1<<29)
-#define m_W0_AXI_OUTSTANDING2 (1<<30)
-
-#define v_W2_FORMAT(x) (((x)&3)<<0)
-#define v_W1_FORMAT(x) (((x)&1)<<2)
-#define v_W0_FORMAT(x) (((x)&7)<<3)
-#define v_W0_CBR_DEFLICK_EN(x) (((x)&1)<<6)
-#define v_W0_YRGB_DEFLICK_EN(x) (((x)&1)<<7)
-#define v_INTERIACE_EN(x) (((x)&1)<<8)
-#define v_W2_ENABLE(x) (((x)&)1<<9)
-#define v_W1_ENABLE(x) (((x)&1)<<10)
-#define v_W0_ENABLE(x) (((x)&1)<<11)
-#define v_HWC_ENABLE(x) (((x)&1)<<12)
-#define v_HWC_RELOAD_EN(x) (((x)&1)<<13)
-#define v_W2_INTERLACE_READ(x) (((x)&1)<<14)
-#define v_W1_INTERLACE_READ(x) (((x)&1)<<15)
-#define v_W0_INTERLACE_READ(x) (((x)&1)<<16)
-#define v_STANDBY(x) (((x)&1)<<17)
-#define v_HWC_BURST(x) (((x)&3)<<18)
-#define v_W2_BURST(x) (((x)&3)<<20)
-#define v_W1_BURST(x) (((x)&3)<<22)
-#define v_W0_BURST(x) (((x)&3)<<24)
-#define v_W2_LUT_CTL(x) (((x)&1)<<26)
-#define v_DSIP_LUT_CTL(x) (((x)&1)<<27)
-#define v_HWC_REVERSED_COLOR(x) (((x)&1)<<28)
-#define v_W1_AXI_OUTSTANDING2(x) (((x)&1)<<29)
-#define v_W0_AXI_OUTSTANDING2(x) (((x)&1)<<30)
-
-//LCDC_SWAP_CTRL
-#define m_W1_565_RB_SWAP (1<<0)
-#define m_W0_565_RB_SWAP (1<<1)
-#define m_W0_YRGB_M8_SWAP (1<<2)
-#define m_W0_YRGB_R_SHIFT_SWAP (1<<3)
-#define m_W0_CBR_R_SHIFT_SWAP (1<<4)
-#define m_W0_YRGB_16_SWAP (1<<5)
-#define m_W0_YRGB_8_SWAP (1<<6)
-#define m_W0_CBR_16_SWAP (1<<7)
-#define m_W0_CBR_8_SWAP (1<<8)
-#define m_W1_16_SWAP (1<<9)
-#define m_W1_8_SWAP (1<<10)
-#define m_W1_R_SHIFT_SWAP (1<<11)
-#define m_OUTPUT_BG_SWAP (1<<12)
-#define m_OUTPUT_RB_SWAP (1<<13)
-#define m_OUTPUT_RG_SWAP (1<<14)
-#define m_DELTA_SWAP (1<<15)
-#define m_DUMMY_SWAP (1<<16)
-#define m_W2_BYTE_SWAP (1<<17)
-#define v_W1_565_RB_SWAP(x) (((x)&1)<<0)
-#define v_W0_565_RB_SWAP(x) (((x)&1)<<1)
-#define v_W0_YRGB_M8_SWAP(x) (((x)&1)<<2)
-#define v_W0_YRGB_R_SHIFT_SWAP(x) (((x)&1)<<3)
-#define v_W0_CBR_R_SHIFT_SWAP(x) (((x)&1)<<4)
-#define v_W0_YRGB_16_SWAP(x) (((x)&1)<<5)
-#define v_W0_YRGB_8_SWAP(x) (((x)&1)<<6)
-#define v_W0_CBR_16_SWAP(x) (((x)&1)<<7)
-#define v_W0_CBR_8_SWAP(x) (((x)&1)<<8)
-#define v_W1_16_SWAP(x) (((x)&1)<<9)
-#define v_W1_8_SWAP(x) (((x)&1)<<10)
-#define v_W1_R_SHIFT_SWAP(x) (((x)&1)<<11)
-#define v_OUTPUT_BG_SWAP(x) (((x)&1)<<12)
-#define v_OUTPUT_RB_SWAP(x) (((x)&1)<<13)
-#define v_OUTPUT_RG_SWAP(x) (((x)&1)<<14)
-#define v_DELTA_SWAP(x) (((x)&1)<<15)
-#define v_DUMMY_SWAP(x) (((x)&1)<<16)
-#define v_W2_BYTE_SWAP(x) (((x)&1)<<17)
-
-//LCDC_MCU_TIMING_CTRL
-#define m_MCU_WRITE_PERIOD (31<<0)
-#define m_MCU_CS_ST (31<<5)
-#define m_MCU_CS_END (31<<10)
-#define m_MCU_RW_ST (31<<15)
-#define m_MCU_RW_END (31<<20)
-#define m_MCU_HOLDMODE_SELECT (1<<27)
-#define m_MCU_HOLDMODE_FRAME_ST (1<<28)
-#define m_MCU_RS_SELECT (1<<29)
-#define m_MCU_BYPASSMODE_SELECT (1<<30)
-#define m_MCU_OUTPUT_SELECT (1<<31)
-#define v_MCU_WRITE_PERIOD(x) (((x)&31)<<0)
-#define v_MCU_CS_ST(x) (((x)&31)<<5)
-#define v_MCU_CS_END(x) (((x)&31)<<10)
-#define v_MCU_RW_ST(x) (((x)&31)<<15)
-#define v_MCU_RW_END(x) (((x)&31)<<20)
-#define v_MCU_HOLD_STATUS(x) (((x)&1)<<26)
-#define v_MCU_HOLDMODE_SELECT(x) (((x)&1)<<27)
-#define v_MCU_HOLDMODE_FRAME_ST(x) (((x)&1)<<28)
-#define v_MCU_RS_SELECT(x) (((x)&1)<<29)
-#define v_MCU_BYPASSMODE_SELECT(x) (((x)&1)<<30)
-#define v_MCU_OUTPUT_SELECT(x) (((x)&1)<<31)
-
-//LCDC_ BLEND_CTRL
-#define m_HWC_BLEND_EN (1<<0)
-#define m_W2_BLEND_EN (1<<1)
-#define m_W1_BLEND_EN (1<<2)
-#define m_W0_BLEND_EN (1<<3)
-#define m_HWC_BLEND_FACTOR (15<<4)
-#define m_W2_BLEND_FACTOR (0xff<<8)
-#define m_W1_BLEND_FACTOR (0xff<<16)
-#define m_W0_BLEND_FACTOR (0xff<<24)
-
-#define v_HWC_BLEND_EN(x) (((x)&1)<<0)
-#define v_W2_BLEND_EN(x) (((x)&1)<<1)
-#define v_W1_BLEND_EN(x) (((x)&1)<<2)
-#define v_W0_BLEND_EN(x) (((x)&1)<<3)
-#define v_HWC_BLEND_FACTOR(x) (((x)&15)<<4)
-#define v_W2_BLEND_FACTOR(x) (((x)&0xff)<<8)
-#define v_W1_BLEND_FACTOR(x) (((x)&0xff)<<16)
-#define v_W0_BLEND_FACTOR(x) (((x)&0xff)<<24)
-
-
-//LCDC_WIN0_COLOR_KEY_CTRL / LCDC_WIN1_COLOR_KEY_CTRL
-#define m_KEYCOLOR (0xffffff<<0)
-#define m_KEYCOLOR_B (0xff<<0)
-#define m_KEYCOLOR_G (0xff<<8)
-#define m_KEYCOLOR_R (0xff<<16)
-#define m_COLORKEY_EN (1<<24)
-#define v_KEYCOLOR(x) (((x)&0xffffff)<<0)
-#define v_KEYCOLOR_B(x) (((x)&0xff)<<0)
-#define v_KEYCOLOR_G(x) (((x)&0xff)<<8)
-#define v_KEYCOLOR_R(x) (((x)&0xff)<<16)
-#define v_COLORKEY_EN(x) (((x)&1)<<24)
-
-//LCDC_DEFLICKER_SCL_OFFSET
-#define m_W0_YRGB_VSD_OFFSET (0xff<<0)
-#define m_W0_YRGB_VSP_OFFSET (0xff<<8)
-#define m_W1_VSD_OFFSET (0xff<<16)
-#define m_W1_VSP_OFFSET (0xff<<24)
-#define v_W0_YRGB_VSD_OFFSET(x) (((x)&0xff)<<0)
-#define v_W0_YRGB_VSP_OFFSET(x) (((x)&0xff)<<8)
-#define v_W1_VSD_OFFSET(x) (((x)&0xff)<<16)
-#define v_W1_VSP_OFFSET(x) (((x)&0xff)<<24)
-
-//LCDC_DSP_CTRL_REG0
-#define m_DISPLAY_FORMAT (0xf<<0)
-#define m_HSYNC_POLARITY (1<<4)
-#define m_VSYNC_POLARITY (1<<5)
-#define m_DEN_POLARITY (1<<6)
-#define m_DCLK_POLARITY (1<<7)
-#define m_COLOR_SPACE_CONVERSION (3<<8)
-#define m_DITHER_UP_EN (1<<10)
-#define m_DITHER_DOWN_MODE (1<<11)
-#define m_DITHER_DOWN_EN (1<<12)
-#define m_INTERLACE_FIELD_POLARITY (1<<13)
-#define m_YUV_CLIP (1<<14)
-#define m_W1_TRANSP_FROM (1<<15)
-#define m_W0_TRANSP_FROM (1<<16)
-#define m_W0_ON_TOP (1<<17)
-#define m_W1_CLIP_EN (1<<18)
-#define m_W0_CLIP_EN (1<<19)
-#define m_W0_YCBR_PRIORITY_MODE (1<<20)
-#define m_CBR_FILTER_656 (1<<21)
-#define m_W2_CHIP_EN (1<<22)
-
-#define v_DISPLAY_FORMAT(x) (((x)&0xf)<<0)
-#define v_HSYNC_POLARITY(x) (((x)&1)<<4)
-#define v_VSYNC_POLARITY(x) (((x)&1)<<5)
-#define v_DEN_POLARITY(x) (((x)&1)<<6)
-#define v_DCLK_POLARITY(x) (((x)&1)<<7)
-#define v_COLOR_SPACE_CONVERSION(x) (((x)&3)<<8)
-#define v_DITHER_UP_EN(x) (((x)&1)<<10)
-#define v_DITHER_DOWN_MODE(x) (((x)&1)<<11)
-#define v_DITHER_DOWN_EN(x) (((x)&1)<<12)
-#define v_INTERLACE_FIELD_POLARITY(x) (((x)&1)<<13)
-#define v_YUV_CLIP(x) (((x)&1)<<14)
-#define v_W1_TRANSP_FROM(x) (((x)&1)<<15)
-#define v_W0_TRANSP_FROM(x) (((x)&1)<<16)
-#define v_W0_ON_TOP(x) (((x)&1)<<17)
-#define v_W1_CLIP_EN(x) (((x)&1)<<18)
-#define v_W0_CLIP_EN(x) (((x)&1)<<19)
-#define v_W0_YCBR_PRIORITY_MODE(x) (((x)&1)<<20)
-#define v_CBR_FILTER_656(x) (((x)&1)<<21)
-#define v_W2_CHIP_EN(x) (((x)&1)<<22)
-
-
-//LCDC_DSP_CTRL_REG1
-#define m_BG_COLOR (0xffffff<<0)
-#define m_BG_B (0xff<<0)
-#define m_BG_G (0xff<<8)
-#define m_BG_R (0xff<<16)
-#define m_BLANK_MODE (1<<24)
-#define m_BLACK_MODE (1<<25)
-#define m_DISP_FILTER_FACTOR (3<<26)
-#define m_DISP_FILTER_MODE (1<<28)
-#define m_DISP_FILTER_EN (1<<29)
-#define v_BG_COLOR(x) (((x)&0xffffff)<<0)
-#define v_BG_B(x) (((x)&0xff)<<0)
-#define v_BG_G(x) (((x)&0xff)<<8)
-#define v_BG_R(x) (((x)&0xff)<<16)
-#define v_BLANK_MODE(x) (((x)&1)<<24)
-#define v_BLACK_MODE(x) (((x)&1)<<25)
-#define v_DISP_FILTER_FACTOR(x) (((x)&3)<<26)
-#define v_DISP_FILTER_MODE(x) (((x)&1)<<28)
-#define v_DISP_FILTER_EN(x) (((x)&1)<<29)
-
-//LCDC_INT_STATUS
-#define m_HOR_START (1<<0)
-#define m_FRM_START (1<<1)
-#define m_SCANNING_FLAG (1<<2)
-#define m_HOR_STARTMASK (1<<3)
-#define m_FRM_STARTMASK (1<<4)
-#define m_SCANNING_MASK (1<<5)
-#define m_HOR_STARTCLEAR (1<<6)
-#define m_FRM_STARTCLEAR (1<<7)
-#define m_SCANNING_CLEAR (1<<8)
-#define m_SCAN_LINE_NUM (0x7ff<<9)
-#define v_HOR_START(x) (((x)&1)<<0)
-#define v_FRM_START(x) (((x)&1)<<1)
-#define v_SCANNING_FLAG(x) (((x)&1)<<2)
-#define v_HOR_STARTMASK(x) (((x)&1)<<3)
-#define v_FRM_STARTMASK(x) (((x)&1)<<4)
-#define v_SCANNING_MASK(x) (((x)&1)<<5)
-#define v_HOR_STARTCLEAR(x) (((x)&1)<<6)
-#define v_FRM_STARTCLEAR(x) (((x)&1)<<7)
-#define v_SCANNING_CLEAR(x) (((x)&1)<<8)
-#define v_SCAN_LINE_NUM(x) (((x)&0x7ff)<<9)
-
-//AXI MS ID
-#define m_W0_YRGB_CH_ID (0xF<<0)
-#define m_W0_CBR_CH_ID (0xF<<4)
-#define m_W1_YRGB_CH_ID (0xF<<8)
-#define m_W2_CH_ID (0xF<<12)
-#define m_HWC_CH_ID (0xF<<16)
-#define v_W0_YRGB_CH_ID(x) (((x)&0xF)<<0)
-#define v_W0_CBR_CH_ID(x) (((x)&0xF)<<4)
-#define v_W1_YRGB_CH_ID(x) (((x)&0xF)<<8)
-#define v_W2_CH_ID(x) (((x)&0xF)<<12)
-#define v_HWC_CH_ID(x) (((x)&0xF)<<16)
-
-
-/* Low Bits Mask */
-#define m_WORDLO (0xffff<<0)
-#define m_WORDHI (0xffff<<16)
-#define v_WORDLO(x) (((x)&0xffff)<<0)
-#define v_WORDHI(x) (((x)&0xffff)<<16)
-
-#define m_BIT11LO (0x7ff<<0)
-#define m_BIT11HI (0x7ff<<16)
-#define v_BIT11LO(x) (((x)&0x7ff)<<0)
-#define v_BIT11HI(x) (((x)&0x7ff)<<16)
-
-#define m_BIT12LO (0xfff<<0)
-#define m_BIT12HI (0xfff<<16)
-#define v_BIT12LO(x) (((x)&0xfff)<<0)
-#define v_BIT12HI(x) (((x)&0xfff)<<16)
-
-
-#define m_VIRWIDTH (0xffff<<0)
-#define m_VIRHEIGHT (0xffff<<16)
-#define v_VIRWIDTH(x) (((x)&0xffff)<<0)
-#define v_VIRHEIGHT(x) (((x)&0xffff)<<16)
-
-#define m_ACTWIDTH (0xffff<<0)
-#define m_ACTHEIGHT (0xffff<<16)
-#define v_ACTWIDTH(x) (((x)&0xffff)<<0)
-#define v_ACTHEIGHT(x) (((x)&0xffff)<<16)
-
-#define m_VIRST_X (0xffff<<0)
-#define m_VIRST_Y (0xffff<<16)
-#define v_VIRST_X(x) (((x)&0xffff)<<0)
-#define v_VIRST_Y(x) (((x)&0xffff)<<16)
-
-#define m_PANELST_X (0x3ff<<0)
-#define m_PANELST_Y (0x3ff<<16)
-#define v_PANELST_X(x) (((x)&0x3ff)<<0)
-#define v_PANELST_Y(x) (((x)&0x3ff)<<16)
-
-#define m_PANELWIDTH (0x3ff<<0)
-#define m_PANELHEIGHT (0x3ff<<16)
-#define v_PANELWIDTH(x) (((x)&0x3ff)<<0)
-#define v_PANELHEIGHT(x) (((x)&0x3ff)<<16)
-
-#define m_HWC_B (0xff<<0)
-#define m_HWC_G (0xff<<8)
-#define m_HWC_R (0xff<<16)
-#define m_W0_YRGB_HSP_OFFSET (0xff<<24)
-#define m_W0_YRGB_HSD_OFFSET (0xff<<24)
-#define v_HWC_B(x) (((x)&0xff)<<0)
-#define v_HWC_G(x) (((x)&0xff)<<8)
-#define v_HWC_R(x) (((x)&0xff)<<16)
-#define v_W0_YRGB_HSP_OFFSET(x) (((x)&0xff)<<24)
-#define v_W0_YRGB_HSD_OFFSET(x) (((x)&0xff)<<24)
-
-
-//Panel display scanning
-#define m_PANEL_HSYNC_WIDTH (0x3ff<<0)
-#define m_PANEL_HORIZONTAL_PERIOD (0x3ff<<16)
-#define v_PANEL_HSYNC_WIDTH(x) (((x)&0x3ff)<<0)
-#define v_PANEL_HORIZONTAL_PERIOD(x) (((x)&0x3ff)<<16)
-
-#define m_PANEL_END (0x3ff<<0)
-#define m_PANEL_START (0x3ff<<16)
-#define v_PANEL_END(x) (((x)&0x3ff)<<0)
-#define v_PANEL_START(x) (((x)&0x3ff)<<16)
-
-#define m_PANEL_VSYNC_WIDTH (0x3ff<<0)
-#define m_PANEL_VERTICAL_PERIOD (0x3ff<<16)
-#define v_PANEL_VSYNC_WIDTH(x) (((x)&0x3ff)<<0)
-#define v_PANEL_VERTICAL_PERIOD(x) (((x)&0x3ff)<<16)
-//-----------
-
-#define m_HSCALE_FACTOR (0xffff<<0)
-#define m_VSCALE_FACTOR (0xffff<<16)
-#define v_HSCALE_FACTOR(x) (((x)&0xffff)<<0)
-#define v_VSCALE_FACTOR(x) (((x)&0xffff)<<16)
-
-#define m_W0_CBR_HSD_OFFSET (0xff<<0)
-#define m_W0_CBR_HSP_OFFSET (0xff<<8)
-#define m_W0_CBR_VSD_OFFSET (0xff<<16)
-#define m_W0_CBR_VSP_OFFSET (0xff<<24)
-#define v_W0_CBR_HSD_OFFSET(x) (((x)&0xff)<<0)
-#define v_W0_CBR_HSP_OFFSET(x) (((x)&0xff)<<8)
-#define v_W0_CBR_VSD_OFFSET(x) (((x)&0xff)<<16)
-#define v_W0_CBR_VSP_OFFSET(x) (((x)&0xff)<<24)
-
-
-#define FB0_IOCTL_STOP_TIMER_FLUSH 0x6001
-#define FB0_IOCTL_SET_PANEL 0x6002
-
-#ifdef CONFIG_FB_WIMO
-#define FB_WIMO_FLAG
-#endif
-#ifdef FB_WIMO_FLAG
-#define FB0_IOCTL_SET_BUF 0x6017
-#define FB0_IOCTL_COPY_CURBUF 0x6018
-#define FB0_IOCTL_CLOSE_BUF 0x6019
-#endif
-
-#define FB1_IOCTL_GET_PANEL_SIZE 0x5001
-#define FB1_IOCTL_SET_YUV_ADDR 0x5002
-//#define FB1_TOCTL_SET_MCU_DIR 0x5003
-#define FB1_IOCTL_SET_ROTATE 0x5003
-#define FB1_IOCTL_SET_I2P_ODD_ADDR 0x5005
-#define FB1_IOCTL_SET_I2P_EVEN_ADDR 0x5006
-#define FB1_IOCTL_SET_WIN0_TOP 0x5018
-
-
-/********************************************************************
-** ½á¹¹¶¨Òå *
-********************************************************************/
-/* LCDCµÄ¼Ä´æÆ÷½á¹¹ */
-
-typedef volatile struct tagLCDC_REG
-{
- /* offset 0x00~0xc0 */
- unsigned int SYS_CONFIG; //0x00 SYSTEM configure register
- unsigned int SWAP_CTRL; //0x04 Data SWAP control
- unsigned int MCU_TIMING_CTRL; //0x08 MCU TIMING control register
- unsigned int BLEND_CTRL; //0x0c Blending control register
- unsigned int WIN0_COLOR_KEY_CTRL; //0x10 Win0 blending control register
- unsigned int WIN1_COLOR_KEY_CTRL; //0x14 Win1 blending control register
- unsigned int WIN2_VIR; //0x18 WIN2 virtual display width
- unsigned int DSP_CTRL0; //0x1c Display control register0
- unsigned int DSP_CTRL1; //0x20 Display control register1
- unsigned int INT_STATUS; //0x24 Interrupt status register
- unsigned int WIN0_VIR; //0x28 WIN0 virtual display width/height
- unsigned int WIN0_YRGB_MST; //0x2c Win0 active YRGB memory start address
- unsigned int WIN0_CBR_MST; //0x30 Win0 active Cbr memory start address
- unsigned int WIN0_ACT_INFO; //0x34 Win0 active window width/height
- unsigned int WIN0_DSP_ST; //0x38 Win0 display start point on panel
- unsigned int WIN0_DSP_INFO; //0x3c Win0 display width/height on panel
- unsigned int WIN1_VIR; //0x40 Win1 virtual display width/height
- unsigned int WIN1_YRGB_MST; //0x44 Win1 active memory start address
- unsigned int WIN1_DSP_INFO; //0x48 Win1 display width/height on panel
- unsigned int WIN1_DSP_ST; //0x4c Win1 display start point on panel
- unsigned int WIN2_MST; //0X50 Win2 memory start address
- unsigned int WIN2_DSP_INFO; //0x54 Win1 display width/height on panel
- unsigned int WIN2_DSP_ST; //0x58 Win1 display start point on panel
- unsigned int HWC_MST; //0x5C HWC memory start address
- unsigned int HWC_DSP_ST; //0x60 HWC display start point on panel
- unsigned int HWC_COLOR_LUT0; //0x64 Hardware cursor color 2¡¯b01 look up table 0
- unsigned int HWC_COLOR_LUT1; //0x68 Hardware cursor color 2¡¯b10 look up table 1
- unsigned int HWC_COLOR_LUT2; //0x6c Hardware cursor color 2¡¯b11 look up table 2
- unsigned int DSP_HTOTAL_HS_END; //0x70 Panel scanning horizontal width and hsync pulse end point
- unsigned int DSP_HACT_ST_END; //0x74 Panel active horizontal scanning start/end point
- unsigned int DSP_VTOTAL_VS_END; //0x78 Panel scanning vertical height and vsync pulse end point
- unsigned int DSP_VACT_ST_END; //0x7c Panel active vertical scanning start/end point
- unsigned int DSP_VS_ST_END_F1; //0x80 Vertical scanning start point and vsync pulse end point of even filed in interlace mode
- unsigned int DSP_VACT_ST_END_F1; //0x84 Vertical scanning active start/end point of even filed in interlace mode
- unsigned int WIN0_SCL_FACTOR_YRGB; //0x88 Win0 YRGB scaling down factor setting
- unsigned int WIN0_SCL_FACTOR_CBR; //0x8c Win0 YRGB scaling up factor setting
- unsigned int WIN0_SCL_OFFSET; //0x90 Win0 Cbr scaling start point offset
- unsigned int FIFO_WATER_MARK; //0x94 Fifo water mark
- unsigned int AXI_MS_ID; //0x98 Axi master ID
- unsigned int reserved0; //0x9c
- unsigned int REG_CFG_DONE; //0xa0 REGISTER CONFIG FINISH
- unsigned int reserved1[(0x100-0xa4)/4];
- unsigned int MCU_BYPASS_WPORT; //0x100 MCU BYPASS MODE, DATA Write Only Port
- unsigned int reserved2[(0x200-0x104)/4];
- unsigned int MCU_BYPASS_RPORT; //0x200 MCU BYPASS MODE, DATA Read Only Port
-} LCDC_REG, *pLCDC_REG;
-
-//roate
-#define ROTATE_0 0
-#define ROTATE_90 90
-#define ROTATE_180 180
-#define ROTATE_270 270
-#define X_MIRROR (1<<10)
-#define Y_MIRROR (1<<11)
-
-
-extern void __init rk29_add_device_lcdc(void);
-extern int mcu_ioctl(unsigned int cmd, unsigned long arg);
-
-#define RK29FB_EVENT_HDMI_ON 1
-#define RK29FB_EVENT_HDMI_OFF 2
-#define RK29FB_EVENT_FB1_ON 3
-#define RK29FB_EVENT_FB1_OFF 4
-#include <linux/notifier.h>
-int rk29fb_register_notifier(struct notifier_block *nb);
-int rk29fb_unregister_notifier(struct notifier_block *nb);
-
-#endif