coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
fb.c File Reference
#include <device/mmio.h>
#include <console/console.h>
#include <delay.h>
#include <soc/dp.h>
#include <soc/dp-core.h>
#include <soc/fimd.h>
#include <soc/i2c.h>
#include <soc/power.h>
#include <soc/sysreg.h>
#include <timer.h>
Include dependency graph for fb.c:

Go to the source code of this file.

Enumerations

enum  {
  ERR_PLL_NOT_UNLOCKED = 2 , ERR_VIDEO_CLOCK_BAD , ERR_VIDEO_STREAM_BAD , ERR_DPCD_READ_ERROR1 ,
  ERR_DPCD_WRITE_ERROR1 , ERR_DPCD_READ_ERROR2 , ERR_DPCD_WRITE_ERROR2 , ERR_INVALID_LANE ,
  ERR_PLL_NOT_LOCKED , ERR_PRE_EMPHASIS_LEVELS , ERR_LINK_RATE_ABNORMAL , ERR_MAX_LANE_COUNT_ABNORMAL ,
  ERR_LINK_TRAINING_FAILURE , ERR_MISSING_DP_BASE , ERR_NO_FDT_NODE
}
 
enum  stage_t {
  STAGE_START = 0 , STAGE_LCD_VDD , STAGE_BRIDGE_SETUP , STAGE_BRIDGE_INIT ,
  STAGE_BRIDGE_RESET , STAGE_HOTPLUG , STAGE_DP_CONTROLLER , STAGE_BACKLIGHT_VDD ,
  STAGE_BACKLIGHT_PWM , STAGE_BACKLIGHT_EN , STAGE_DONE
}
 

Functions

static void fimd_bypass (void)
 
void fb_init (unsigned long int fb_size, void *lcdbase, struct exynos5_fimd_panel *pd)
 
static int s5p_dp_config_video (struct s5p_dp_device *dp, struct video_info *video_info)
 
static int s5p_dp_enable_rx_to_enhanced_mode (struct s5p_dp_device *dp)
 
static int s5p_dp_enable_scramble (struct s5p_dp_device *dp)
 
static int s5p_dp_init_dp (struct s5p_dp_device *dp)
 
static int s5p_dp_set_lane_lane_pre_emphasis (struct s5p_dp_device *dp, int pre_emphasis, int lane)
 
static void s5p_dp_get_max_rx_bandwidth (struct s5p_dp_device *dp, u8 *bandwidth)
 
static void s5p_dp_get_max_rx_lane_count (struct s5p_dp_device *dp, u8 *lane_count)
 
static int s5p_dp_hw_link_training (struct s5p_dp_device *dp, unsigned int max_lane, unsigned int max_rate)
 
int dp_controller_init (struct s5p_dp_device *dp_device)
 
int lcd_ctrl_init (unsigned long int fb_size, struct exynos5_fimd_panel *panel_data, void *lcdbase)
 Init the LCD controller. More...
 

Variables

int lcd_line_length
 
int lcd_color_fg
 
int lcd_color_bg
 
voidlcd_console_address
 
short console_col
 
short console_row
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
ERR_PLL_NOT_UNLOCKED 
ERR_VIDEO_CLOCK_BAD 
ERR_VIDEO_STREAM_BAD 
ERR_DPCD_READ_ERROR1 
ERR_DPCD_WRITE_ERROR1 
ERR_DPCD_READ_ERROR2 
ERR_DPCD_WRITE_ERROR2 
ERR_INVALID_LANE 
ERR_PLL_NOT_LOCKED 
ERR_PRE_EMPHASIS_LEVELS 
ERR_LINK_RATE_ABNORMAL 
ERR_MAX_LANE_COUNT_ABNORMAL 
ERR_LINK_TRAINING_FAILURE 
ERR_MISSING_DP_BASE 
ERR_NO_FDT_NODE 

Definition at line 39 of file fb.c.

◆ stage_t

enum stage_t
Enumerator
STAGE_START 
STAGE_LCD_VDD 
STAGE_BRIDGE_SETUP 
STAGE_BRIDGE_INIT 
STAGE_BRIDGE_RESET 
STAGE_HOTPLUG 
STAGE_DP_CONTROLLER 
STAGE_BACKLIGHT_VDD 
STAGE_BACKLIGHT_PWM 
STAGE_BACKLIGHT_EN 
STAGE_DONE 

Definition at line 62 of file fb.c.

Function Documentation

◆ dp_controller_init()

◆ fb_init()

◆ fimd_bypass()

static void fimd_bypass ( void  )
static

Definition at line 86 of file fb.c.

References exynos5_sysreg::disp1blk_cfg, exynos_sysreg, FIMDBYPASS_DISP1, and setbits32.

Referenced by lcd_ctrl_init().

Here is the caller graph for this function:

◆ lcd_ctrl_init()

int lcd_ctrl_init ( unsigned long int  fb_size,
struct exynos5_fimd_panel panel_data,
void lcdbase 
)

Init the LCD controller.

Parameters
panel_data
lcdbaseBase address of LCD frame buffer
Returns
0 if ok, -ve error code on error

Definition at line 535 of file fb.c.

References fb_init(), and fimd_bypass().

Referenced by exynos_displayport_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s5p_dp_config_video()

◆ s5p_dp_enable_rx_to_enhanced_mode()

static int s5p_dp_enable_rx_to_enhanced_mode ( struct s5p_dp_device dp)
static

Definition at line 210 of file fb.c.

References BIOS_DEBUG, DPCD_ADDR_LANE_COUNT_SET, DPCD_ENHANCED_FRAME_EN, DPCD_LANE_COUNT_SET_MASK, ERR_DPCD_READ_ERROR1, ERR_DPCD_WRITE_ERROR1, printk, s5p_dp_read_byte_from_dpcd(), and s5p_dp_write_byte_to_dpcd().

Referenced by dp_controller_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s5p_dp_enable_scramble()

static int s5p_dp_enable_scramble ( struct s5p_dp_device dp)
static

Definition at line 233 of file fb.c.

References base, s5p_dp_device::base, BIOS_DEBUG, clrbits32, DPCD_ADDR_TRAINING_PATTERN_SET, DPCD_SCRAMBLING_DISABLED, ERR_DPCD_READ_ERROR2, ERR_DPCD_WRITE_ERROR2, printk, s5p_dp_read_byte_from_dpcd(), s5p_dp_write_byte_to_dpcd(), and SCRAMBLING_DISABLE.

Referenced by dp_controller_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s5p_dp_get_max_rx_bandwidth()

static void s5p_dp_get_max_rx_bandwidth ( struct s5p_dp_device dp,
u8 bandwidth 
)
static

Definition at line 328 of file fb.c.

References DPCD_ADDR_MAX_LINK_RATE, and s5p_dp_read_byte_from_dpcd().

Referenced by s5p_dp_hw_link_training().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s5p_dp_get_max_rx_lane_count()

static void s5p_dp_get_max_rx_lane_count ( struct s5p_dp_device dp,
u8 lane_count 
)
static

Definition at line 346 of file fb.c.

References DPCD_ADDR_MAX_LANE_COUNT, DPCD_MAX_LANE_COUNT_MASK, and s5p_dp_read_byte_from_dpcd().

Referenced by s5p_dp_hw_link_training().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s5p_dp_hw_link_training()

◆ s5p_dp_init_dp()

static int s5p_dp_init_dp ( struct s5p_dp_device dp)
static

Definition at line 259 of file fb.c.

References base, s5p_dp_device::base, BIOS_DEBUG, clrbits32, DP_INIT_TRIES, printk, s5p_dp_init_analog_func(), s5p_dp_init_aux(), s5p_dp_reset(), SW_FUNC_EN_N, and udelay().

Referenced by dp_controller_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ s5p_dp_set_lane_lane_pre_emphasis()

static int s5p_dp_set_lane_lane_pre_emphasis ( struct s5p_dp_device dp,
int  pre_emphasis,
int  lane 
)
static

Definition at line 294 of file fb.c.

References base, s5p_dp_device::base, BIOS_DEBUG, ERR_INVALID_LANE, PRE_EMPHASIS_SET_SHIFT, printk, and write32().

Referenced by s5p_dp_hw_link_training().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ console_col

short console_col

Definition at line 82 of file fb.c.

◆ console_row

short console_row

Definition at line 83 of file fb.c.

◆ lcd_color_bg

int lcd_color_bg

Definition at line 78 of file fb.c.

◆ lcd_color_fg

int lcd_color_fg

Definition at line 77 of file fb.c.

◆ lcd_console_address

void* lcd_console_address

Definition at line 80 of file fb.c.

◆ lcd_line_length

int lcd_line_length

Definition at line 76 of file fb.c.