coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
i915.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #ifndef INTEL_I915_H
4 #define INTEL_I915_H 1
5 
8 #include <edid.h>
9 
10 /* port types. We stick with the same defines as the kernel */
11 #define INTEL_OUTPUT_UNUSED 0
12 #define INTEL_OUTPUT_ANALOG 1
13 #define INTEL_OUTPUT_DVO 2
14 #define INTEL_OUTPUT_SDVO 3
15 #define INTEL_OUTPUT_LVDS 4
16 #define INTEL_OUTPUT_TVOUT 5
17 #define INTEL_OUTPUT_HDMI 6
18 #define INTEL_OUTPUT_DISPLAYPORT 7
19 #define INTEL_OUTPUT_EDP 8
20 
21 /* things that are, strangely, not defined anywhere? */
22 #define PCH_PP_UNLOCK 0xabcd0000
23 #define WMx_LP_SR_EN (1UL<<31)
24 #define PRB0_TAIL 0x02030
25 #define PRB0_HEAD 0x02034
26 #define PRB0_START 0x02038
27 #define PRB0_CTL 0x0203c
28 
29 enum port {
30  PORT_A = 0,
36 };
37 
38 enum pipe {
39  PIPE_A = 0,
43 };
44 
45 enum transcoder {
50 };
51 
52 enum plane {
53  PLANE_A = 0,
56 };
57 
58 /* debug enums. These are for printks that, due to their place in the
59  * middle of graphics device IO, might change timing. Use with care
60  * or not at all.
61  */
62 enum {
63  vio = 2, /* dump every IO */
64  vspin = 4, /* print # of times we spun on a register value */
65 };
66 
67 /* The mainboard must provide these functions. */
68 unsigned long io_i915_read32(unsigned long addr);
69 void io_i915_write32(unsigned long val, unsigned long addr);
70 
71 void intel_prepare_ddi(void);
72 
73 int gtt_poll(u32 reg, u32 mask, u32 value);
74 void gtt_write(u32 reg, u32 data);
75 u32 gtt_read(u32 reg);
76 
77 /* vbt.c */
78 struct device;
79 void
81  struct device *dev, const char *idstr);
82 
83 #endif
pte_t value
Definition: mmu.c:91
static u32 addr
Definition: cirrus.c:14
@ vio
Definition: i915.h:63
@ vspin
Definition: i915.h:64
plane
Definition: i915.h:52
@ PLANE_B
Definition: i915.h:54
@ PLANE_A
Definition: i915.h:53
@ PLANE_C
Definition: i915.h:55
void io_i915_write32(unsigned long val, unsigned long addr)
u32 gtt_read(u32 reg)
Definition: gma.c:22
pipe
Definition: i915.h:38
@ I915_NUM_PIPES
Definition: i915.h:42
@ PIPE_C
Definition: i915.h:41
@ PIPE_B
Definition: i915.h:40
@ PIPE_A
Definition: i915.h:39
unsigned long io_i915_read32(unsigned long addr)
transcoder
Definition: i915.h:45
@ TRANSCODER_EDP
Definition: i915.h:49
@ TRANSCODER_A
Definition: i915.h:46
@ TRANSCODER_C
Definition: i915.h:48
@ TRANSCODER_B
Definition: i915.h:47
void gtt_write(u32 reg, u32 data)
Definition: gma.c:27
int gtt_poll(u32 reg, u32 mask, u32 value)
Definition: gma.c:154
void generate_fake_intel_oprom(const struct i915_gpu_controller_info *conf, struct device *dev, const char *idstr)
Definition: vbt.c:62
port
Definition: i915.h:29
@ PORT_B
Definition: i915.h:31
@ PORT_C
Definition: i915.h:32
@ I915_NUM_PORTS
Definition: i915.h:35
@ PORT_E
Definition: i915.h:34
@ PORT_A
Definition: i915.h:30
@ PORT_D
Definition: i915.h:33
void intel_prepare_ddi(void)
Definition: intel_ddi.c:61
static const int mask[4]
Definition: gpio.c:308
uint32_t u32
Definition: stdint.h:51
Definition: device.h:107
u8 val
Definition: sys.c:300