Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
75f8693f
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
75f8693f
编写于
11月 08, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/bios: implement some dcb output entry parsing/matching functions
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
ed58aee9
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
77 addition
and
48 deletion
+77
-48
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
+5
-25
drivers/gpu/drm/nouveau/core/engine/disp/sornv50.c
drivers/gpu/drm/nouveau/core/engine/disp/sornv50.c
+4
-23
drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
+5
-0
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
+63
-0
未找到文件。
drivers/gpu/drm/nouveau/core/engine/disp/nvd0.c
浏览文件 @
75f8693f
...
...
@@ -576,8 +576,7 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int outp, u32 ctrl,
struct
nvbios_outp
*
info
)
{
struct
nouveau_bios
*
bios
=
nouveau_bios
(
priv
);
u16
data
,
idx
=
0
;
u16
mask
,
type
;
u16
mask
,
type
,
data
;
if
(
outp
<
4
)
{
type
=
DCB_OUTPUT_ANALOG
;
...
...
@@ -602,30 +601,11 @@ exec_lookup(struct nv50_disp_priv *priv, int head, int outp, u32 ctrl,
mask
|=
0x0001
<<
outp
;
mask
|=
0x0100
<<
head
;
/* this is a tad special, but for the moment its needed to get
* all the dcb data required by the vbios scripts.. will be cleaned
* up later as more bits are moved to the core..
*/
while
((
data
=
dcb_outp
(
bios
,
idx
++
,
ver
,
hdr
)))
{
u32
conn
=
nv_ro32
(
bios
,
data
+
0
);
u32
conf
=
nv_ro32
(
bios
,
data
+
4
);
if
((
conn
&
0x00300000
)
||
(
conn
&
0x0000000f
)
!=
type
||
(
conn
&
0x0f000000
)
!=
(
0x01000000
<<
outp
))
continue
;
if
(
(
mask
&
0x00c0
)
&&
(
mask
&
0x00c0
)
!=
((
mask
&
0x00c0
)
&
((
conf
&
0x00000030
)
<<
2
)))
continue
;
dcb
->
type
=
type
;
dcb
->
or
=
1
<<
outp
;
dcb
->
connector
=
(
conn
&
0x0000f000
)
>>
12
;
return
nvbios_outp_match
(
bios
,
type
,
mask
,
ver
,
hdr
,
cnt
,
len
,
info
);
}
data
=
dcb_outp_match
(
bios
,
type
,
mask
,
ver
,
hdr
,
dcb
);
if
(
!
data
)
return
0x0000
;
return
0x0000
;
return
nvbios_outp_match
(
bios
,
type
,
mask
,
ver
,
hdr
,
cnt
,
len
,
info
)
;
}
static
bool
...
...
drivers/gpu/drm/nouveau/core/engine/disp/sornv50.c
浏览文件 @
75f8693f
...
...
@@ -53,37 +53,18 @@ nv50_sor_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size)
const
u8
link
=
(
mthd
&
NV50_DISP_SOR_MTHD_LINK
)
>>
2
;
const
u8
or
=
(
mthd
&
NV50_DISP_SOR_MTHD_OR
);
const
u16
mask
=
(
0x0100
<<
head
)
|
(
0x0040
<<
link
)
|
(
0x0001
<<
or
);
struct
dcb_output
outp
=
{
.
type
=
type
,
.
or
=
(
1
<<
or
),
.
sorconf
.
link
=
(
1
<<
link
),
};
u8
ver
,
hdr
,
idx
=
0
;
struct
dcb_output
outp
;
u8
ver
,
hdr
;
u32
data
;
int
ret
=
-
EINVAL
;
if
(
size
<
sizeof
(
u32
))
return
-
EINVAL
;
data
=
*
(
u32
*
)
args
;
while
(
type
&&
(
data
=
dcb_outp
(
bios
,
idx
++
,
&
ver
,
&
hdr
)))
{
u32
conn
=
nv_ro32
(
bios
,
data
+
0
);
u32
conf
=
nv_ro32
(
bios
,
data
+
4
);
if
((
conn
&
0x00300000
)
||
(
conn
&
0x0000000f
)
!=
type
||
(
conn
&
0x0f000000
)
!=
(
0x01000000
<<
or
))
continue
;
if
(
(
mask
&
0x00c0
)
&&
(
mask
&
0x00c0
)
!=
((
mask
&
0x00c0
)
&
((
conf
&
0x00000030
)
<<
2
)))
continue
;
outp
.
connector
=
(
conn
&
0x0000f000
)
>>
12
;
}
if
(
data
==
0x0000
)
if
(
type
&&
!
dcb_outp_match
(
bios
,
type
,
mask
,
&
ver
,
&
hdr
,
&
outp
))
return
-
ENODEV
;
data
=
*
(
u32
*
)
args
;
switch
(
mthd
&
~
0x3f
)
{
case
NV50_DISP_SOR_PWR
:
ret
=
priv
->
sor
.
power
(
priv
,
or
,
data
);
...
...
drivers/gpu/drm/nouveau/core/include/subdev/bios/dcb.h
浏览文件 @
75f8693f
...
...
@@ -23,6 +23,7 @@ struct dcb_output {
uint8_t
bus
;
uint8_t
location
;
uint8_t
or
;
uint8_t
link
;
bool
duallink_possible
;
union
{
struct
sor_conf
{
...
...
@@ -55,6 +56,10 @@ struct dcb_output {
u16
dcb_table
(
struct
nouveau_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
ent
,
u8
*
len
);
u16
dcb_outp
(
struct
nouveau_bios
*
,
u8
idx
,
u8
*
ver
,
u8
*
len
);
u16
dcb_outp_parse
(
struct
nouveau_bios
*
,
u8
idx
,
u8
*
,
u8
*
,
struct
dcb_output
*
);
u16
dcb_outp_match
(
struct
nouveau_bios
*
,
u16
type
,
u16
mask
,
u8
*
,
u8
*
,
struct
dcb_output
*
);
int
dcb_outp_foreach
(
struct
nouveau_bios
*
,
void
*
data
,
int
(
*
exec
)
(
struct
nouveau_bios
*
,
void
*
,
int
index
,
u16
entry
));
...
...
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
浏览文件 @
75f8693f
...
...
@@ -107,6 +107,69 @@ dcb_outp(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len)
return
0x0000
;
}
u16
dcb_outp_parse
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
len
,
struct
dcb_output
*
outp
)
{
u16
dcb
=
dcb_outp
(
bios
,
idx
,
ver
,
len
);
if
(
dcb
)
{
if
(
*
ver
>=
0x20
)
{
u32
conn
=
nv_ro32
(
bios
,
dcb
+
0x00
);
outp
->
or
=
(
conn
&
0x0f000000
)
>>
24
;
outp
->
location
=
(
conn
&
0x00300000
)
>>
20
;
outp
->
bus
=
(
conn
&
0x000f0000
)
>>
16
;
outp
->
connector
=
(
conn
&
0x0000f000
)
>>
12
;
outp
->
heads
=
(
conn
&
0x00000f00
)
>>
8
;
outp
->
i2c_index
=
(
conn
&
0x000000f0
)
>>
4
;
outp
->
type
=
(
conn
&
0x0000000f
);
outp
->
link
=
0
;
}
else
{
dcb
=
0x0000
;
}
if
(
*
ver
>=
0x40
)
{
u32
conf
=
nv_ro32
(
bios
,
dcb
+
0x04
);
switch
(
outp
->
type
)
{
case
DCB_OUTPUT_TMDS
:
case
DCB_OUTPUT_LVDS
:
case
DCB_OUTPUT_DP
:
outp
->
link
=
(
conf
&
0x00000030
)
>>
4
;
outp
->
sorconf
.
link
=
outp
->
link
;
/*XXX*/
break
;
default:
break
;
}
}
}
return
dcb
;
}
static
inline
u16
dcb_outp_hasht
(
struct
dcb_output
*
outp
)
{
return
outp
->
type
;
}
static
inline
u16
dcb_outp_hashm
(
struct
dcb_output
*
outp
)
{
return
(
outp
->
heads
<<
8
)
|
(
outp
->
link
<<
6
)
|
outp
->
or
;
}
u16
dcb_outp_match
(
struct
nouveau_bios
*
bios
,
u16
type
,
u16
mask
,
u8
*
ver
,
u8
*
len
,
struct
dcb_output
*
outp
)
{
u16
dcb
,
idx
=
0
;
while
((
dcb
=
dcb_outp_parse
(
bios
,
idx
++
,
ver
,
len
,
outp
)))
{
if
(
dcb_outp_hasht
(
outp
)
==
type
)
{
if
((
dcb_outp_hashm
(
outp
)
&
mask
)
==
mask
)
break
;
}
}
return
dcb
;
}
int
dcb_outp_foreach
(
struct
nouveau_bios
*
bios
,
void
*
data
,
int
(
*
exec
)(
struct
nouveau_bios
*
,
void
*
,
int
,
u16
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录