unsigned int offset_s;
int i, j;
- for(i = y1pos; i < y2pos; i++) {
- for(j = x1pos; j < x2pos; j++) {
+ for (i = y1pos; i < y2pos; i++) {
+ for (j = x1pos; j < x2pos; j++) {
offset_s = i * panel_width + j;
*(pDst + offset_s) = pixel;
}
palette_size = NBITS(vid->vl_bpix) == 8 ? 256 : 16;
palette_mem_size = palette_size * sizeof(u32);
- s5pc_fimd_lcd_init_mem((unsigned long)lcd_base, (unsigned long)fb_size, palette_size);
+ s5pc_fimd_lcd_init_mem((unsigned long)lcd_base,
+ (unsigned long)fb_size, palette_size);
- udebug("fb_size=%d, screen_base=%x, palette_size=%d, palettle_mem_size=%d\n",
- fb_size, (unsigned int)lcd_base, (int)palette_size, (int)palette_mem_size);
+ udebug("fb_size=%d, screen_base=%x, palette_size=%d,i
+ palettle_mem_size=%d\n", fb_size, (unsigned int)lcd_base,
+ (int)palette_size, (int)palette_mem_size);
}
static void s5pc_lcd_init(vidinfo_t *vid)
}
}
-void _draw_samsung_logo(void *lcdbase, int x, int y, int w, int h, unsigned short *bmp)
+void _draw_samsung_logo(void *lcdbase,
+ int x, int y, int w, int h, unsigned short *bmp)
{
int i, j, error_range = 40;
short k = 0;
unsigned int in_len, width, height;
unsigned long out_len = ARRAY_SIZE(logo) * sizeof(*logo);
void *dst = NULL;
+
width = 298;
height = 78;
x = ((panel_width - width) >> 1);
}
if (out_len == CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)
printf("Image could be truncated"
- " (increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n");
- _draw_samsung_logo(lcdbase, x, y, width, height, (unsigned short *) dst);
+ " (increase CONFIG_SYS_VIDEO_LOGO_MAX_SIZE)!\n");
+ _draw_samsung_logo(lcdbase,
+ x, y, width, height, (unsigned short *) dst);
free(dst);
}
+extern mipi_power_on(void);
static void lcd_panel_on(vidinfo_t *vid)
{
+ if (vid->interface_mode == FIMD_CPU_INTERFACE)
+ mipi_power_on();
+
udelay(vid->init_delay);
if (vid->cfg_gpio)
if (vid->backlight_on)
vid->backlight_on(1);
+ if (vid->interface_mode == FIMD_CPU_INTERFACE)
+ s5p_dsim_start();
if (vid->cfg_ldo)
vid->cfg_ldo();
-
if (vid->enable_ldo)
vid->enable_ldo(1);
-
}
/* extern void init_onenand_ext2(void); */
lcd_test(panel_width, panel_height);
#endif
} else if (strcmp(option, "image") == 0)
- memcpy(lcdbase, LOGO_RGB24, PANEL_WIDTH*PANEL_HEIGHT*S5P_LCD_BPP >> 3);
+ memcpy(lcdbase,
+ LOGO_RGB24, PANEL_WIDTH*PANEL_HEIGHT*S5P_LCD_BPP >> 3);
else {
memset(lcdbase, 0, PANEL_WIDTH*PANEL_HEIGHT*S5P_LCD_BPP >> 3);
draw_samsung_logo(lcdbase);
* MA 02111-1307 USA
*/
+#include <linux/types.h>
+
#ifndef _LCD_H_
#define _LCD_H_
/* gunzip_bmp used if CONFIG_VIDEO_BMP_GZIP */
extern struct bmp_image *gunzip_bmp(unsigned long addr, unsigned long *lenp);
+enum {
+ FIMD_RGB_INTERFACE = 1,
+ FIMD_CPU_INTERFACE = 2,
+};
+
#if defined CONFIG_MPC823
/*
* LCD controller stucture for MPC823 CPU
u_char vl_dp; /* Data polarity */
u_char vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8 */
u_char vl_lbw; /* LCD Bus width, 0 = 4, 1 = 8 */
- u_char vl_splt; /* Split display, 0 = single-scan, 1 = dual-scan */
+ u_char vl_splt; /* Split display,
+ * 0 = single-scan, 1 = dual-scan */
u_char vl_clor; /* Color, 0 = mono, 1 = color */
u_char vl_tft; /* 0 = passive, 1 = TFT */
u_char vl_hsp; /* Horizontal Sync polarity */
u_char vl_vsp; /* Vertical Sync polarity */
u_char vl_dp; /* Data polarity */
- u_char vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
+ u_char vl_bpix; /* Bits per pixel,
+ * 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
u_char vl_lbw; /* LCD Bus width, 0 = 4, 1 = 8 */
- u_char vl_splt; /* Split display, 0 = single-scan, 1 = dual-scan */
+ u_char vl_splt; /* Split display,
+ * 0 = single-scan, 1 = dual-scan */
u_char vl_clor; /* Color, 0 = mono, 1 = color */
u_char vl_tft; /* 0 = passive, 1 = TFT */
/* LCD configuration register */
u_long vl_sync; /* Horizontal / vertical sync */
- u_long vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
+ u_long vl_bpix; /* Bits per pixel,
+ * 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
u_long vl_tft; /* 0 = passive, 1 = TFT */
/* Horizontal control register. */
u_char vl_hsp; /* Horizontal Sync polarity */
u_char vl_vsp; /* Vertical Sync polarity */
u_char vl_dp; /* Data polarity */
- u_char vl_bpix; /* Bits per pixel, 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
+ u_char vl_bpix; /* Bits per pixel,
+ * 0 = 1, 1 = 2, 2 = 4, 3 = 8, 4 = 16 */
/* Horizontal control register. Timing from data sheet */
u_char vl_hspw; /* Horz sync pulse width */
unsigned int init_delay;
unsigned int power_on_delay;
unsigned int reset_delay;
+ unsigned int interface_mode;
+ unsigned int cs_setup;
+ unsigned int wr_setup;
+ unsigned int wr_act;
+ unsigned int wr_hold;
unsigned int dual_lcd_enabled;
+
+#ifdef CONFIG_S6E39A0X
+ void *dsim_data;
+
+ /* transfer command to lcd panel at LP mode. */
+ int (*cmd_write) (void *dsim_data, unsigned int data_id,
+ unsigned int data0, unsigned int data1);
+ int (*cmd_read) (void *dsim_data, unsigned int data_id,
+ unsigned int data0, unsigned int data1);
+ /*
+ * get the status that all screen data have been transferred
+ * to mipi-dsi.
+ */
+ int (*get_dsim_frame_done) (void *dsim_data);
+ int (*clear_dsim_frame_done) (void *dsim_data);
+
+ /*
+ * changes mipi transfer mode to LP or HS mode.
+ *
+ * LP mode needs when some commands like gamma values transfers
+ * to lcd panel.
+ */
+ int (*change_dsim_transfer_mode) (int mode);
+
+ /* get frame done status of display controller. */
+ int (*get_fb_frame_done) (void);
+ /* trigger display controller in case of cpu mode. */
+ void (*trigger) (void);
+#endif
} vidinfo_t;
#else
* the LCD controller and memory allocation. Someone has to know what
* is connected, as we can't autodetect anything.
*/
-#define CONFIG_SYS_HIGH 0 /* Pins are active high */
-#define CONFIG_SYS_LOW 1 /* Pins are active low */
+#define CONFIG_SYS_HIGH 0 /* Pins are active high */
+#define CONFIG_SYS_LOW 1 /* Pins are active low */
#define LCD_MONOCHROME 0
#define LCD_COLOR2 1