13 #include <soc/pci_devs.h>
14 #include <soc/ramstage.h>
19 #define GFX_TIMEOUT 100000
28 const u16 gms_size_map[17] = { 0,32,64,96,128,160,192,224,256,
29 288,320,352,384,416,448,480,512 };
30 u32 pcsize = 24 << 10;
31 u32 wopcmsz = 0x100000;
32 u32 gms, gmsize, pcbase;
38 gmsize = gms_size_map[gms];
42 pcbase += (gmsize-1) * wopcmsz - pcsize;
292 divider = 25 * 1000 * 1000 / (16 * req_hz);
307 ((
u32)
config->gpu_pipea_port_select << 30 |
308 (
u32)
config->gpu_pipea_power_on_delay << 16 |
312 ((
u32)
config->gpu_pipea_power_off_delay << 16 |
313 (
u32)
config->gpu_pipea_light_off_delay)),
316 ~0x1f,
config->gpu_pipea_power_cycle_delay),
325 ((
u32)
config->gpu_pipeb_port_select << 30 |
326 (
u32)
config->gpu_pipeb_power_on_delay << 16 |
330 ((
u32)
config->gpu_pipeb_power_off_delay << 16 |
331 (
u32)
config->gpu_pipeb_light_off_delay)),
334 ~0x1f,
config->gpu_pipeb_power_cycle_delay),
338 if (
config->gpu_pipea_port_select) {
342 config->gpu_pipea_pwm_freq_hz);
345 if (
config->gpu_pipeb_port_select) {
349 config->gpu_pipeb_pwm_freq_hz);
388 static const struct pci_driver gfx_driver
__pci_driver = {
static void write32(void *addr, uint32_t val)
static void gfx_lock_pcbase(struct device *dev)
static void gfx_run_script(struct device *dev, const struct reg_script *ops)
static const struct reg_script gpu_pre_vbios_script[]
static void gfx_panel_setup(struct device *dev)
static void gma_generate_ssdt(const struct device *dev)
static void gfx_post_vbios_init(struct device *dev)
static void gfx_pm_init(struct device *dev)
static void gfx_init(struct device *dev)
static const struct reg_script gfx_init_script[]
static void gfx_pre_vbios_init(struct device *dev)
static void set_backlight_pwm(struct device *dev, uint32_t bklt_reg, int req_hz)
static struct device_operations gfx_device_ops
static const struct pci_driver gfx_driver __pci_driver
static const struct reg_script gfx_post_vbios_script[]
#define GGC_GSM_SIZE_MASK
#define PP_CONTROL_EDP_FORCE_VDD
#define PP_CONTROL_UNLOCK
#define PUNIT_GPU_EC_VIRUS
#define SB_BIOS_CONFIG_GFX_TURBO_DIS
#define PUNIT_PWRGT_STATUS
#define PUNIT_PWRGT_CONTROL
#define printk(level,...)
struct resource * probe_resource(const struct device *dev, unsigned int index)
See if a resource structure already exists for a given index.
struct resource * find_resource(const struct device *dev, unsigned int index)
Return an existing resource structure for a given index.
void drivers_intel_gma_displays_ssdt_generate(const struct i915_gpu_controller_info *conf)
static struct tpm_chip chip
static DEVTREE_CONST void * config_of(const struct device *dev)
static __always_inline u32 pci_read_config32(const struct device *dev, u16 reg)
static struct device_operations ops
#define BIOS_INFO
BIOS_INFO - Expected events.
enum cb_err intel_gma_init_igd_opregion(void)
#define PCI_COMMAND_MASTER
#define PCI_COMMAND_MEMORY
#define PCI_BASE_ADDRESS_0
void pci_dev_init(struct device *dev)
Default handler: only runs the relevant PCI BIOS.
void pci_dev_enable_resources(struct device *dev)
void pci_dev_read_resources(struct device *dev)
void pci_dev_set_resources(struct device *dev)
#define REG_RES_RMW32(bar_, reg_, mask_, value_)
#define REG_RES_POLL32(bar_, reg_, mask_, value_, timeout_)
#define REG_PCI_OR32(reg_, value_)
#define REG_RES_WRITE32(bar_, reg_, value_)
void reg_script_run_on_dev(struct device *dev, const struct reg_script *step)
#define REG_RES_OR32(bar_, reg_, value_)
#define REG_PCI_RMW32(reg_, mask_, value_)
struct pci_operations soc_pci_ops
void(* read_resources)(struct device *dev)
DEVTREE_CONST void * chip_info