Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8df1d0c0
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
8df1d0c0
编写于
11月 04, 2013
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/disp: semi-complete link training sequence even if display disappears
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
4767fae8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
32 addition
and
16 deletion
+32
-16
drivers/gpu/drm/nouveau/core/engine/disp/dport.c
drivers/gpu/drm/nouveau/core/engine/disp/dport.c
+32
-16
未找到文件。
drivers/gpu/drm/nouveau/core/engine/disp/dport.c
浏览文件 @
8df1d0c0
...
...
@@ -70,17 +70,10 @@ dp_set_link_config(struct dp_state *dp)
};
u32
lnkcmp
;
u8
sink
[
2
];
int
ret
;
DBG
(
"%d lanes at %d KB/s
\n
"
,
dp
->
link_nr
,
dp
->
link_bw
);
/* set desired link configuration on the sink */
sink
[
0
]
=
dp
->
link_bw
/
27000
;
sink
[
1
]
=
dp
->
link_nr
;
if
(
dp
->
dpcd
[
DPCD_RC02
]
&
DPCD_RC02_ENHANCED_FRAME_CAP
)
sink
[
1
]
|=
DPCD_LC01_ENHANCED_FRAME_EN
;
nv_wraux
(
dp
->
aux
,
DPCD_LC00
,
sink
,
2
);
/* set desired link configuration on the source */
if
((
lnkcmp
=
dp
->
info
.
lnkcmp
))
{
if
(
dp
->
version
<
0x30
)
{
...
...
@@ -96,10 +89,22 @@ dp_set_link_config(struct dp_state *dp)
nvbios_exec
(
&
init
);
}
return
dp
->
func
->
lnk_ctl
(
dp
->
disp
,
dp
->
outp
,
dp
->
head
,
dp
->
link_nr
,
dp
->
link_bw
/
27000
,
dp
->
dpcd
[
DPCD_RC02
]
&
DPCD_RC02_ENHANCED_FRAME_CAP
);
ret
=
dp
->
func
->
lnk_ctl
(
dp
->
disp
,
dp
->
outp
,
dp
->
head
,
dp
->
link_nr
,
dp
->
link_bw
/
27000
,
dp
->
dpcd
[
DPCD_RC02
]
&
DPCD_RC02_ENHANCED_FRAME_CAP
);
if
(
ret
)
{
ERR
(
"lnk_ctl failed with %d
\n
"
,
ret
);
return
ret
;
}
/* set desired link configuration on the sink */
sink
[
0
]
=
dp
->
link_bw
/
27000
;
sink
[
1
]
=
dp
->
link_nr
;
if
(
dp
->
dpcd
[
DPCD_RC02
]
&
DPCD_RC02_ENHANCED_FRAME_CAP
)
sink
[
1
]
|=
DPCD_LC01_ENHANCED_FRAME_EN
;
return
nv_wraux
(
dp
->
aux
,
DPCD_LC00
,
sink
,
2
);
}
static
void
...
...
@@ -294,8 +299,17 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
ret
=
nv_rdaux
(
dp
->
aux
,
0x00000
,
dp
->
dpcd
,
sizeof
(
dp
->
dpcd
));
if
(
ret
)
{
/* it's possible the display has been unplugged before we
* get here. we still need to execute the full set of
* vbios scripts, and program the OR at a high enough
* frequency to satisfy the target mode. failure to do
* so results at best in an UPDATE hanging, and at worst
* with PDISP running away to join the circus.
*/
dp
->
dpcd
[
1
]
=
link_bw
[
0
]
/
27000
;
dp
->
dpcd
[
2
]
=
4
;
dp
->
dpcd
[
3
]
=
0x00
;
ERR
(
"failed to read DPCD
\n
"
);
return
ret
;
}
/* adjust required bandwidth for 8B/10B coding overhead */
...
...
@@ -328,8 +342,10 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
!
dp_link_train_eq
(
dp
))
break
;
}
else
if
(
ret
>=
1
)
{
/* dp_set_link_config() handled training */
if
(
ret
)
{
/* dp_set_link_config() handled training, or
* we failed to communicate with the sink.
*/
break
;
}
...
...
@@ -344,5 +360,5 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
/* execute post-train script from vbios */
dp_link_train_fini
(
dp
);
return
true
;
return
(
ret
<
0
)
?
false
:
true
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录