Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
f66fa771
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
153
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f66fa771
编写于
2月 24, 2010
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: check for known dcb connector types
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
54abb5dd
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
62 addition
and
0 deletion
+62
-0
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+61
-0
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_bios.h
+1
-0
未找到文件。
drivers/gpu/drm/nouveau/nouveau_bios.c
浏览文件 @
f66fa771
...
...
@@ -5173,6 +5173,43 @@ nouveau_bios_connector_entry(struct drm_device *dev, int index)
return
cte
;
}
static
enum
dcb_connector_type
divine_connector_type
(
struct
nvbios
*
bios
,
int
index
)
{
struct
dcb_table
*
dcb
=
&
bios
->
dcb
;
unsigned
encoders
=
0
,
type
=
DCB_CONNECTOR_NONE
;
int
i
;
for
(
i
=
0
;
i
<
dcb
->
entries
;
i
++
)
{
if
(
dcb
->
entry
[
i
].
connector
==
index
)
encoders
|=
(
1
<<
dcb
->
entry
[
i
].
type
);
}
if
(
encoders
&
(
1
<<
OUTPUT_DP
))
{
if
(
encoders
&
(
1
<<
OUTPUT_TMDS
))
type
=
DCB_CONNECTOR_DP
;
else
type
=
DCB_CONNECTOR_eDP
;
}
else
if
(
encoders
&
(
1
<<
OUTPUT_TMDS
))
{
if
(
encoders
&
(
1
<<
OUTPUT_ANALOG
))
type
=
DCB_CONNECTOR_DVI_I
;
else
type
=
DCB_CONNECTOR_DVI_D
;
}
else
if
(
encoders
&
(
1
<<
OUTPUT_ANALOG
))
{
type
=
DCB_CONNECTOR_VGA
;
}
else
if
(
encoders
&
(
1
<<
OUTPUT_LVDS
))
{
type
=
DCB_CONNECTOR_LVDS
;
}
else
if
(
encoders
&
(
1
<<
OUTPUT_TV
))
{
type
=
DCB_CONNECTOR_TV_0
;
}
return
type
;
}
static
void
parse_dcb_connector_table
(
struct
nvbios
*
bios
)
{
...
...
@@ -5205,6 +5242,7 @@ parse_dcb_connector_table(struct nvbios *bios)
cte
->
entry
=
ROM16
(
entry
[
0
]);
else
cte
->
entry
=
ROM32
(
entry
[
0
]);
cte
->
type
=
(
cte
->
entry
&
0x000000ff
)
>>
0
;
cte
->
index
=
(
cte
->
entry
&
0x00000f00
)
>>
8
;
switch
(
cte
->
entry
&
0x00033000
)
{
...
...
@@ -5230,6 +5268,29 @@ parse_dcb_connector_table(struct nvbios *bios)
NV_INFO
(
dev
,
" %d: 0x%08x: type 0x%02x idx %d tag 0x%02x
\n
"
,
i
,
cte
->
entry
,
cte
->
type
,
cte
->
index
,
cte
->
gpio_tag
);
/* check for known types, fallback to guessing the type
* from attached encoders if we hit an unknown.
*/
switch
(
cte
->
type
)
{
case
DCB_CONNECTOR_VGA
:
case
DCB_CONNECTOR_TV_0
:
case
DCB_CONNECTOR_TV_1
:
case
DCB_CONNECTOR_TV_3
:
case
DCB_CONNECTOR_DVI_I
:
case
DCB_CONNECTOR_DVI_D
:
case
DCB_CONNECTOR_LVDS
:
case
DCB_CONNECTOR_DP
:
case
DCB_CONNECTOR_eDP
:
case
DCB_CONNECTOR_HDMI_0
:
case
DCB_CONNECTOR_HDMI_1
:
break
;
default:
cte
->
type
=
divine_connector_type
(
bios
,
cte
->
index
);
NV_WARN
(
dev
,
"unknown type, using 0x%02x"
,
cte
->
type
);
break
;
}
}
}
...
...
drivers/gpu/drm/nouveau/nouveau_bios.h
浏览文件 @
f66fa771
...
...
@@ -68,6 +68,7 @@ enum dcb_connector_type {
DCB_CONNECTOR_eDP
=
0x47
,
DCB_CONNECTOR_HDMI_0
=
0x60
,
DCB_CONNECTOR_HDMI_1
=
0x61
,
DCB_CONNECTOR_NONE
=
0xff
};
struct
dcb_connector_table_entry
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录