summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/cfb_console.c14
-rw-r--r--drivers/video/exynos_fb.c32
-rw-r--r--drivers/video/ipu_common.c2
-rw-r--r--drivers/video/ipu_disp.c48
-rw-r--r--drivers/video/mxc_ipuv3_fb.c9
5 files changed, 26 insertions, 79 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 9231927..6aa50cb 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -944,7 +944,7 @@ static void parse_putc(const char c)
CURSOR_SET;
}
-void video_putc(struct stdio_dev *dev, const char c)
+static void video_putc(struct stdio_dev *dev, const char c)
{
#ifdef CONFIG_CFB_CONSOLE_ANSI
int i;
@@ -1158,7 +1158,7 @@ void video_putc(struct stdio_dev *dev, const char c)
flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
}
-void video_puts(struct stdio_dev *dev, const char *s)
+static void video_puts(struct stdio_dev *dev, const char *s)
{
int count = strlen(s);
@@ -1171,14 +1171,11 @@ void video_puts(struct stdio_dev *dev, const char *s)
* video_set_lut() if they do not support 8 bpp format.
* Implement weak default function instead.
*/
-void __video_set_lut(unsigned int index, unsigned char r,
+__weak void video_set_lut(unsigned int index, unsigned char r,
unsigned char g, unsigned char b)
{
}
-void video_set_lut(unsigned int, unsigned char, unsigned char, unsigned char)
- __attribute__ ((weak, alias("__video_set_lut")));
-
#if defined(CONFIG_CMD_BMP) || defined(CONFIG_SPLASH_SCREEN)
#define FILL_8BIT_332RGB(r,g,b) { \
@@ -2240,15 +2237,12 @@ static int video_init(void)
* Implement a weak default function for boards that optionally
* need to skip the video initialization.
*/
-int __board_video_skip(void)
+__weak int board_video_skip(void)
{
/* As default, don't skip test */
return 0;
}
-int board_video_skip(void)
- __attribute__ ((weak, alias("__board_video_skip")));
-
int drv_video_init(void)
{
int skip_dev_init;
diff --git a/drivers/video/exynos_fb.c b/drivers/video/exynos_fb.c
index 180a3b4..be35b98 100644
--- a/drivers/video/exynos_fb.c
+++ b/drivers/video/exynos_fb.c
@@ -58,54 +58,38 @@ static void exynos_lcd_init(vidinfo_t *vid)
lcd_set_flush_dcache(1);
}
-void __exynos_cfg_lcd_gpio(void)
+__weak void exynos_cfg_lcd_gpio(void)
{
}
-void exynos_cfg_lcd_gpio(void)
- __attribute__((weak, alias("__exynos_cfg_lcd_gpio")));
-void __exynos_backlight_on(unsigned int onoff)
+__weak void exynos_backlight_on(unsigned int onoff)
{
}
-void exynos_backlight_on(unsigned int onoff)
- __attribute__((weak, alias("__exynos_cfg_lcd_gpio")));
-void __exynos_reset_lcd(void)
+__weak void exynos_reset_lcd(void)
{
}
-void exynos_reset_lcd(void)
- __attribute__((weak, alias("__exynos_reset_lcd")));
-void __exynos_lcd_power_on(void)
+__weak void exynos_lcd_power_on(void)
{
}
-void exynos_lcd_power_on(void)
- __attribute__((weak, alias("__exynos_lcd_power_on")));
-void __exynos_cfg_ldo(void)
+__weak void exynos_cfg_ldo(void)
{
}
-void exynos_cfg_ldo(void)
- __attribute__((weak, alias("__exynos_cfg_ldo")));
-void __exynos_enable_ldo(unsigned int onoff)
+__weak void exynos_enable_ldo(unsigned int onoff)
{
}
-void exynos_enable_ldo(unsigned int onoff)
- __attribute__((weak, alias("__exynos_enable_ldo")));
-void __exynos_backlight_reset(void)
+__weak void exynos_backlight_reset(void)
{
}
-void exynos_backlight_reset(void)
- __attribute__((weak, alias("__exynos_backlight_reset")));
-int __exynos_lcd_misc_init(vidinfo_t *vid)
+__weak int exynos_lcd_misc_init(vidinfo_t *vid)
{
return 0;
}
-int exynos_lcd_misc_init(vidinfo_t *vid)
- __attribute__((weak, alias("__exynos_lcd_misc_init")));
static void lcd_panel_on(vidinfo_t *vid)
{
diff --git a/drivers/video/ipu_common.c b/drivers/video/ipu_common.c
index 8d4e925..5873531 100644
--- a/drivers/video/ipu_common.c
+++ b/drivers/video/ipu_common.c
@@ -379,7 +379,7 @@ static struct clk pixel_clk[] = {
/*
* This function resets IPU
*/
-void ipu_reset(void)
+static void ipu_reset(void)
{
u32 *reg;
u32 value;
diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
index 948e1fc..4faeafb 100644
--- a/drivers/video/ipu_disp.c
+++ b/drivers/video/ipu_disp.c
@@ -377,7 +377,7 @@ static struct dp_csc_param_t dp_csc_array[CSC_NUM][CSC_NUM] = {
static enum csc_type_t fg_csc_type = CSC_NONE, bg_csc_type = CSC_NONE;
static int color_key_4rgb = 1;
-void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param,
+static void ipu_dp_csc_setup(int dp, struct dp_csc_param_t dp_csc_param,
unsigned char srm_mode_update)
{
u32 reg;
@@ -605,17 +605,6 @@ void ipu_dc_uninit(int dc_chan)
}
}
-int ipu_chan_is_interlaced(ipu_channel_t channel)
-{
- if (channel == MEM_DC_SYNC)
- return !!(__raw_readl(DC_WR_CH_CONF_1) &
- DC_WR_CH_CONF_FIELD_MODE);
- else if ((channel == MEM_BG_SYNC) || (channel == MEM_FG_SYNC))
- return !!(__raw_readl(DC_WR_CH_CONF_5) &
- DC_WR_CH_CONF_FIELD_MODE);
- return 0;
-}
-
void ipu_dp_dc_enable(ipu_channel_t channel)
{
int di;
@@ -782,7 +771,7 @@ void ipu_init_dc_mappings(void)
ipu_dc_map_config(4, 2, 21, 0xFC);
}
-int ipu_pixfmt_to_map(uint32_t fmt)
+static int ipu_pixfmt_to_map(uint32_t fmt)
{
switch (fmt) {
case IPU_PIX_FMT_GENERIC:
@@ -802,28 +791,6 @@ int ipu_pixfmt_to_map(uint32_t fmt)
}
/*
- * This function is called to adapt synchronous LCD panel to IPU restriction.
- */
-void adapt_panel_to_ipu_restricitions(uint32_t *pixel_clk,
- uint16_t width, uint16_t height,
- uint16_t h_start_width,
- uint16_t h_end_width,
- uint16_t v_start_width,
- uint16_t *v_end_width)
-{
- if (*v_end_width < 2) {
- uint16_t total_width = width + h_start_width + h_end_width;
- uint16_t total_height_old = height + v_start_width +
- (*v_end_width);
- uint16_t total_height_new = height + v_start_width + 2;
- *v_end_width = 2;
- *pixel_clk = (*pixel_clk) * total_width * total_height_new /
- (total_width * total_height_old);
- printf("WARNING: adapt panel end blank lines\n");
- }
-}
-
-/*
* This function is called to initialize a synchronous LCD panel.
*
* @param disp The DI the panel is attached to.
@@ -880,14 +847,17 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
if ((v_sync_width == 0) || (h_sync_width == 0))
return -EINVAL;
- adapt_panel_to_ipu_restricitions(&pixel_clk, width, height,
- h_start_width, h_end_width,
- v_start_width, &v_end_width);
+ /* adapt panel to ipu restricitions */
+ if (v_end_width < 2) {
+ v_end_width = 2;
+ puts("WARNING: v_end_width (lower_margin) must be >= 2, adjusted\n");
+ }
+
h_total = width + h_sync_width + h_start_width + h_end_width;
v_total = height + v_sync_width + v_start_width + v_end_width;
/* Init clocking */
- debug("pixel clk = %d\n", pixel_clk);
+ debug("pixel clk = %dHz\n", pixel_clk);
if (sig.ext_clk) {
if (!(g_di1_tvout && (disp == 1))) { /*not round div for tvout*/
diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c
index f75d770..1fa9531 100644
--- a/drivers/video/mxc_ipuv3_fb.c
+++ b/drivers/video/mxc_ipuv3_fb.c
@@ -36,7 +36,7 @@ static struct fb_videomode const *gmode;
static uint8_t gdisp;
static uint32_t gpixfmt;
-void fb_videomode_to_var(struct fb_var_screeninfo *var,
+static void fb_videomode_to_var(struct fb_var_screeninfo *var,
const struct fb_videomode *mode)
{
var->xres = mode->xres;
@@ -258,8 +258,7 @@ static int mxcfb_set_par(struct fb_info *fbi)
if (fbi->var.sync & FB_SYNC_CLK_IDLE_EN)
sig_cfg.clkidle_en = 1;
- debug("pixclock = %ul Hz\n",
- (u32) (PICOS2KHZ(fbi->var.pixclock) * 1000UL));
+ debug("pixclock = %lu Hz\n", PICOS2KHZ(fbi->var.pixclock) * 1000UL);
if (ipu_init_sync_panel(mxc_fbi->ipu_di,
(PICOS2KHZ(fbi->var.pixclock)) * 1000UL,
@@ -486,7 +485,7 @@ static struct fb_info *mxcfb_init_fbinfo(void)
/*
* Probe routine for the framebuffer driver. It is called during the
- * driver binding process. The following functions are performed in
+ * driver binding process. The following functions are performed in
* this routine: Framebuffer initialization, Memory allocation and
* mapping, Framebuffer registration, IPU initialization.
*
@@ -542,7 +541,7 @@ static int mxcfb_probe(u32 interface_pix_fmt, uint8_t disp,
mxcfb_set_fix(fbi);
- /* alocate fb first */
+ /* allocate fb first */
if (mxcfb_map_video_memory(fbi) < 0)
return -ENOMEM;