Linux Kernel
3.7.1
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
drivers
gpu
drm
nouveau
core
include
subdev
bios
dcb.h
Go to the documentation of this file.
1
#ifndef __NVBIOS_DCB_H__
2
#define __NVBIOS_DCB_H__
3
4
struct
nouveau_bios
;
5
6
enum
dcb_output_type
{
7
DCB_OUTPUT_ANALOG
= 0x0,
8
DCB_OUTPUT_TV
= 0x1,
9
DCB_OUTPUT_TMDS
= 0x2,
10
DCB_OUTPUT_LVDS
= 0x3,
11
DCB_OUTPUT_DP
= 0x6,
12
DCB_OUTPUT_EOL
= 0xe,
13
DCB_OUTPUT_UNUSED
= 0xf,
14
DCB_OUTPUT_ANY
= -1,
15
};
16
17
struct
dcb_output
{
18
int
index
;
/* may not be raw dcb index if merging has happened */
19
enum
dcb_output_type
type
;
20
uint8_t
i2c_index
;
21
uint8_t
heads
;
22
uint8_t
connector
;
23
uint8_t
bus
;
24
uint8_t
location
;
25
uint8_t
or
;
26
bool
duallink_possible
;
27
union
{
28
struct
sor_conf {
29
int
link
;
30
}
sorconf
;
31
struct
{
32
int
maxfreq
;
33
}
crtconf
;
34
struct
{
35
struct
sor_conf
sor
;
36
bool
use_straps_for_mode
;
37
bool
use_acpi_for_edid
;
38
bool
use_power_scripts
;
39
}
lvdsconf
;
40
struct
{
41
bool
has_component_output
;
42
}
tvconf
;
43
struct
{
44
struct
sor_conf sor;
45
int
link_nr
;
46
int
link_bw
;
47
}
dpconf
;
48
struct
{
49
struct
sor_conf sor;
50
int
slave_addr
;
51
}
tmdsconf
;
52
};
53
bool
i2c_upper_default
;
54
};
55
56
u16
dcb_table
(
struct
nouveau_bios
*,
u8
*
ver
,
u8
*
hdr
,
u8
*
ent
,
u8
*len);
57
u16
dcb_outp
(
struct
nouveau_bios
*,
u8
idx
,
u8
*
ver
,
u8
*len);
58
int
dcb_outp_foreach
(
struct
nouveau_bios
*,
void
*
data
,
int
(*
exec
)
59
(
struct
nouveau_bios
*,
void
*,
int
index
,
u16
entry
));
60
61
62
/* BIT 'U'/'d' table encoder subtables have hashes matching them to
63
* a particular set of encoders.
64
*
65
* This function returns true if a particular DCB entry matches.
66
*/
67
static
inline
bool
68
dcb_hash_match(
struct
dcb_output
*dcb,
u32
hash
)
69
{
70
if
((hash & 0x000000f0) != (dcb->
location
<< 4))
71
return
false
;
72
if
((hash & 0x0000000f) != dcb->
type
)
73
return
false
;
74
if
(!(hash & (dcb->
or
<< 16)))
75
return
false
;
76
77
switch
(dcb->
type
) {
78
case
DCB_OUTPUT_TMDS
:
79
case
DCB_OUTPUT_LVDS
:
80
case
DCB_OUTPUT_DP
:
81
if
(hash & 0x00c00000) {
82
if
(!(hash & (dcb->
sorconf
.link << 22)))
83
return
false
;
84
}
85
default
:
86
return
true
;
87
}
88
}
89
90
#endif
Generated on Thu Jan 10 2013 13:32:42 for Linux Kernel by
1.8.2