summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/common/block/include/intelblocks/graphics.h
blob: 378fdd05673b947c7c1785d245acbc4e74250225 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#ifndef SOC_INTEL_COMMON_BLOCK_GRAPHICS_H
#define SOC_INTEL_COMMON_BLOCK_GRAPHICS_H

#include <device/device.h>

/*
 * SoC overrides
 *
 * All new SoC must implement below functionality.
 */

/*
 * Perform Graphics Initialization in ramstage
 * Input:
 * struct device *dev: device structure
 */
void graphics_soc_init(struct device *dev);

/*
 * Write ASL entry for Graphics opregion
 * Input:
 * struct device *device: device structure
 * current: start address of graphics opregion
 * rsdp: pointer to RSDT (and XSDT) structure
 *
 * Output:
 * End address of graphics opregion so that the called
 * can use the same for future calls to write_acpi_tables
 */
uintptr_t graphics_soc_write_acpi_opregion(const struct device *device,
		uintptr_t current, struct acpi_rsdp *rsdp);

/* i915 controller info for ACPI backlight controls */
const struct i915_gpu_controller_info *
intel_igd_get_controller_info(const struct device *device);

/* Graphics MMIO register read/write APIs */
uint32_t graphics_gtt_read(unsigned long reg);
void graphics_gtt_write(unsigned long reg, uint32_t data);
void graphics_gtt_rmw(unsigned long reg, uint32_t andmask, uint32_t ormask);
uintptr_t graphics_get_memory_base(void);

#endif	/* SOC_INTEL_COMMON_BLOCK_GRAPHICS_H */