coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
gma.c File Reference
#include <device/mmio.h>
#include <console/console.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <drivers/intel/gma/edid.h>
#include <drivers/intel/gma/opregion.h>
#include <drivers/intel/gma/libgfxinit.h>
#include <string.h>
#include <device/pci_ops.h>
#include <commonlib/helpers.h>
#include <types.h>
#include "drivers/intel/gma/i915_reg.h"
#include "chip.h"
#include "gm45.h"
Include dependency graph for gma.c:

Go to the source code of this file.

Functions

u32 gtt_read (u32 reg)
 
void gtt_write (u32 reg, u32 data)
 
static u32 get_cdclk (struct device *const dev)
 
static u32 freq_to_blc_pwm_ctl (struct device *const dev, u16 pwm_freq, u8 duty_perc)
 
u16 get_blc_pwm_freq_value (const char *edid_ascii_string)
 
static void gma_pm_init_post_vbios (struct device *const dev, const char *edid_ascii_string)
 
static void gma_func0_init (struct device *dev)
 
static void gma_generate_ssdt (const struct device *device)
 
static const char * gma_acpi_name (const struct device *dev)
 

Variables

static struct resourcegtt_res = NULL
 
static struct device_operations gma_func0_ops
 
static const unsigned short pci_device_ids []
 
static const struct pci_driver gma __pci_driver
 

Function Documentation

◆ freq_to_blc_pwm_ctl()

static u32 freq_to_blc_pwm_ctl ( struct device *const  dev,
u16  pwm_freq,
u8  duty_perc 
)
static

Definition at line 50 of file gma.c.

References get_cdclk().

Referenced by gma_pm_init_post_vbios().

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

◆ get_blc_pwm_freq_value()

u16 get_blc_pwm_freq_value ( const char *  edid_ascii_string)

Definition at line 63 of file gma.c.

References blc_pwm_t::ascii_string, BIOS_DEBUG, BIOS_NOTICE, get_blc_values(), printk, blc_pwm_t::pwm_freq, and strcmp().

Referenced by gma_pm_init_post_vbios(), and mainboard_vbt_filename().

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

◆ get_cdclk()

static u32 get_cdclk ( struct device *const  dev)
static

Definition at line 32 of file gma.c.

References BIOS_WARNING, GCFGC_CD_MASK, GCFGC_OFFSET, HPLLVCO_MCHBAR, mchbar_read8(), pci_read_config16(), printk, VCO_2666, VCO_3200, VCO_4000, and VCO_5333.

Referenced by freq_to_blc_pwm_ctl(), and gma_pm_init_post_vbios().

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

◆ gma_acpi_name()

static const char* gma_acpi_name ( const struct device dev)
static

Definition at line 198 of file gma.c.

◆ gma_func0_init()

◆ gma_generate_ssdt()

static void gma_generate_ssdt ( const struct device device)
static

Definition at line 191 of file gma.c.

References chip, device::chip_info, and drivers_intel_gma_displays_ssdt_generate().

Here is the call graph for this function:

◆ gma_pm_init_post_vbios()

◆ gtt_read()

u32 gtt_read ( u32  reg)

Definition at line 22 of file gma.c.

Referenced by gma_pm_init_post_vbios(), gma_pm_init_pre_vbios(), gma_setup_panel(), gtt_poll(), gtt_rmw(), igd_get_cdclk_broadwell(), and igd_get_cdclk_haswell().

Here is the caller graph for this function:

◆ gtt_write()

void gtt_write ( u32  reg,
u32  data 
)

Variable Documentation

◆ __pci_driver

const struct pci_driver gma __pci_driver
static
Initial value:
= {
.ops = &gma_func0_ops,
.vendor = PCI_VID_INTEL,
.devices = pci_device_ids,
}
static const unsigned short pci_device_ids[]
Definition: gma.c:213
static struct device_operations gma_func0_ops
Definition: gma.c:203
#define PCI_VID_INTEL
Definition: pci_ids.h:2157

Definition at line 213 of file gma.c.

◆ gma_func0_ops

struct device_operations gma_func0_ops
static
Initial value:
= {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.acpi_fill_ssdt = gma_generate_ssdt,
.init = gma_func0_init,
.ops_pci = &pci_dev_ops_pci,
.acpi_name = gma_acpi_name,
}
static const char * gma_acpi_name(const struct device *dev)
Definition: gma.c:198
static void gma_func0_init(struct device *dev)
Definition: gma.c:145
static void gma_generate_ssdt(const struct device *device)
Definition: gma.c:191
void pci_dev_enable_resources(struct device *dev)
Definition: pci_device.c:721
void pci_dev_read_resources(struct device *dev)
Definition: pci_device.c:534
struct pci_operations pci_dev_ops_pci
Default device operation for PCI devices.
Definition: pci_device.c:911
void pci_dev_set_resources(struct device *dev)
Definition: pci_device.c:691

Definition at line 198 of file gma.c.

◆ gtt_res

struct resource* gtt_res = NULL
static

Definition at line 20 of file gma.c.

Referenced by gma_func0_init(), gtt_read(), and gtt_write().

◆ pci_device_ids

const unsigned short pci_device_ids[]
static
Initial value:
=
{
0x2a42, 0
}

Definition at line 213 of file gma.c.