coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
display.c File Reference
#include <device/mmio.h>
#include <boot/tables.h>
#include <console/console.h>
#include <delay.h>
#include <device/device.h>
#include <edid.h>
#include <soc/addressmap.h>
#include <soc/clock.h>
#include <soc/display.h>
#include <soc/sdram.h>
#include <soc/nvidia/tegra/dc.h>
#include <soc/nvidia/tegra/pwm.h>
#include <stdint.h>
#include <string.h>
#include <framebuffer_info.h>
#include "chip.h"
Include dependency graph for display.c:

Go to the source code of this file.

Functions

unsigned long READL (void *p)
 
void WRITEL (unsigned long value, void *p)
 
static int tegra_dc_calc_refresh (const struct soc_nvidia_tegra124_config *config)
 
static void print_mode (const struct soc_nvidia_tegra124_config *config)
 
static int update_display_mode (struct display_controller *disp_ctrl, struct soc_nvidia_tegra124_config *config)
 
static void update_window (struct display_controller *disp_ctrl, struct soc_nvidia_tegra124_config *config)
 
static int tegra_dc_init (struct display_controller *disp_ctrl)
 
uint32_t fb_base_mb (void)
 
void display_startup (struct device *dev)
 

Variables

struct tegra_dc dc_data
 
int dump = 0
 

Function Documentation

◆ display_startup()

◆ fb_base_mb()

uint32_t fb_base_mb ( void  )

Definition at line 190 of file display.c.

References FB_SIZE_MB, and sdram_max_addressable_mb().

Referenced by display_startup(), and soc_read_resources().

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

◆ print_mode()

static void print_mode ( const struct soc_nvidia_tegra124_config config)
static

Definition at line 66 of file display.c.

References BIOS_ERR, config, printk, refresh, and tegra_dc_calc_refresh().

Referenced by update_display_mode().

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

◆ READL()

unsigned long READL ( void p)

Definition at line 24 of file display.c.

Referenced by update_window().

Here is the caller graph for this function:

◆ tegra_dc_calc_refresh()

static int tegra_dc_calc_refresh ( const struct soc_nvidia_tegra124_config config)
static

Definition at line 49 of file display.c.

References config, and refresh.

Referenced by print_mode().

Here is the caller graph for this function:

◆ tegra_dc_init()

◆ update_display_mode()

static int update_display_mode ( struct display_controller disp_ctrl,
struct soc_nvidia_tegra124_config config 
)
static

We want to use PLLD_out0, which is PLLD / 2: PixelClock = (PLLD / 2) / ShiftClockDiv / PixelClockDiv.

Currently most panels work inside clock range 50MHz~100MHz, and PLLD has some requirements to have VCO in range 500MHz~1000MHz (see clock.c for more detail). To simplify calculation, we set PixelClockDiv to 1 and ShiftClockDiv to 1. In future these values may be calculated by clock_display, to allow wider frequency range.

Note ShiftClockDiv is a 7.1 format value.

Definition at line 78 of file display.c.

References dc_disp_reg::back_porch, BIOS_DEBUG, config, display_controller::disp, dc_disp_reg::disp_active, dc_disp_reg::disp_clk_ctrl, dc_disp_reg::disp_timing_opt, dc_disp_reg::front_porch, PIXEL_CLK_DIVIDER_PCD1, PIXEL_CLK_DIVIDER_SHIFT, print_mode(), printk, dc_disp_reg::ref_to_sync, SHIFT_CLK_DIVIDER_SHIFT, dc_disp_reg::sync_width, and WRITEL().

Referenced by display_startup(), dp_display_startup(), and dsi_display_startup().

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

◆ update_window()

◆ WRITEL()

void WRITEL ( unsigned long  value,
void p 
)

Definition at line 41 of file display.c.

Referenced by display_startup(), tegra_dc_init(), update_display_mode(), and update_window().

Here is the caller graph for this function:

Variable Documentation

◆ dc_data

struct tegra_dc dc_data

Definition at line 1 of file display.c.

Referenced by display_startup().

◆ dump

int dump = 0