Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7ebb38b5
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
7ebb38b5
编写于
11月 09, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50/disp: call into core for dac load detection
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
ef22c8bb
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
22 addition
and
51 deletion
+22
-51
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
+3
-3
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
+1
-0
drivers/gpu/drm/nouveau/core/engine/disp/nv50.h
drivers/gpu/drm/nouveau/core/engine/disp/nv50.h
+2
-2
drivers/gpu/drm/nouveau/core/engine/disp/nv84.c
drivers/gpu/drm/nouveau/core/engine/disp/nv84.c
+1
-0
drivers/gpu/drm/nouveau/core/engine/disp/nv94.c
drivers/gpu/drm/nouveau/core/engine/disp/nv94.c
+1
-0
drivers/gpu/drm/nouveau/core/engine/disp/nva0.c
drivers/gpu/drm/nouveau/core/engine/disp/nva0.c
+1
-0
drivers/gpu/drm/nouveau/core/engine/disp/nva3.c
drivers/gpu/drm/nouveau/core/engine/disp/nva3.c
+1
-0
drivers/gpu/drm/nouveau/nv50_dac.c
drivers/gpu/drm/nouveau/nv50_dac.c
+11
-45
drivers/gpu/drm/nouveau/nvd0_display.c
drivers/gpu/drm/nouveau/nvd0_display.c
+1
-1
未找到文件。
drivers/gpu/drm/nouveau/core/engine/disp/dacnv50.c
浏览文件 @
7ebb38b5
...
...
@@ -46,11 +46,11 @@ nv50_dac_power(struct nv50_disp_priv *priv, int or, u32 data)
}
int
nv50_dac_sense
(
struct
nv50_disp_priv
*
priv
,
int
or
)
nv50_dac_sense
(
struct
nv50_disp_priv
*
priv
,
int
or
,
u32
loadval
)
{
const
u32
doff
=
(
or
*
0x800
);
int
load
=
-
EINVAL
;
nv_wr32
(
priv
,
0x61a00c
+
doff
,
0x00100000
);
nv_wr32
(
priv
,
0x61a00c
+
doff
,
0x00100000
|
loadval
);
udelay
(
9500
);
nv_wr32
(
priv
,
0x61a00c
+
doff
,
0x80000000
);
load
=
(
nv_rd32
(
priv
,
0x61a00c
+
doff
)
&
0x38000000
)
>>
27
;
...
...
@@ -74,7 +74,7 @@ nv50_dac_mthd(struct nouveau_object *object, u32 mthd, void *args, u32 size)
ret
=
priv
->
dac
.
power
(
priv
,
or
,
data
[
0
]);
break
;
case
NV50_DISP_DAC_LOAD
:
ret
=
priv
->
dac
.
sense
(
priv
,
or
);
ret
=
priv
->
dac
.
sense
(
priv
,
or
,
data
[
0
]
);
if
(
ret
>=
0
)
{
data
[
0
]
=
ret
;
ret
=
0
;
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nv50.c
浏览文件 @
7ebb38b5
...
...
@@ -807,6 +807,7 @@ nv50_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
dac
.
nr
=
3
;
priv
->
sor
.
nr
=
2
;
priv
->
dac
.
power
=
nv50_dac_power
;
priv
->
dac
.
sense
=
nv50_dac_sense
;
priv
->
sor
.
power
=
nv50_sor_power
;
INIT_LIST_HEAD
(
&
priv
->
base
.
vblank
.
list
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nv50.h
浏览文件 @
7ebb38b5
...
...
@@ -19,7 +19,7 @@ struct nv50_disp_priv {
struct
{
int
nr
;
int
(
*
power
)(
struct
nv50_disp_priv
*
,
int
dac
,
u32
data
);
int
(
*
sense
)(
struct
nv50_disp_priv
*
,
int
dac
);
int
(
*
sense
)(
struct
nv50_disp_priv
*
,
int
dac
,
u32
load
);
}
dac
;
struct
{
int
nr
;
...
...
@@ -42,7 +42,7 @@ struct nv50_disp_priv {
int
nv50_dac_mthd
(
struct
nouveau_object
*
,
u32
,
void
*
,
u32
);
int
nv50_dac_power
(
struct
nv50_disp_priv
*
,
int
,
u32
);
int
nv50_dac_sense
(
struct
nv50_disp_priv
*
,
int
);
int
nv50_dac_sense
(
struct
nv50_disp_priv
*
,
int
,
u32
);
#define SOR_MTHD(n) (n), (n) + 0x3f
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nv84.c
浏览文件 @
7ebb38b5
...
...
@@ -76,6 +76,7 @@ nv84_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
dac
.
nr
=
3
;
priv
->
sor
.
nr
=
2
;
priv
->
dac
.
power
=
nv50_dac_power
;
priv
->
dac
.
sense
=
nv50_dac_sense
;
priv
->
sor
.
power
=
nv50_sor_power
;
INIT_LIST_HEAD
(
&
priv
->
base
.
vblank
.
list
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nv94.c
浏览文件 @
7ebb38b5
...
...
@@ -82,6 +82,7 @@ nv94_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
dac
.
nr
=
3
;
priv
->
sor
.
nr
=
4
;
priv
->
dac
.
power
=
nv50_dac_power
;
priv
->
dac
.
sense
=
nv50_dac_sense
;
priv
->
sor
.
power
=
nv50_sor_power
;
INIT_LIST_HEAD
(
&
priv
->
base
.
vblank
.
list
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nva0.c
浏览文件 @
7ebb38b5
...
...
@@ -67,6 +67,7 @@ nva0_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
dac
.
nr
=
3
;
priv
->
sor
.
nr
=
2
;
priv
->
dac
.
power
=
nv50_dac_power
;
priv
->
dac
.
sense
=
nv50_dac_sense
;
priv
->
sor
.
power
=
nv50_sor_power
;
INIT_LIST_HEAD
(
&
priv
->
base
.
vblank
.
list
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/nva3.c
浏览文件 @
7ebb38b5
...
...
@@ -83,6 +83,7 @@ nva3_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
priv
->
dac
.
nr
=
3
;
priv
->
sor
.
nr
=
4
;
priv
->
dac
.
power
=
nv50_dac_power
;
priv
->
dac
.
sense
=
nv50_dac_sense
;
priv
->
sor
.
power
=
nv50_sor_power
;
INIT_LIST_HEAD
(
&
priv
->
base
.
vblank
.
list
);
...
...
drivers/gpu/drm/nouveau/nv50_dac.c
浏览文件 @
7ebb38b5
...
...
@@ -71,56 +71,22 @@ nv50_dac_disconnect(struct drm_encoder *encoder)
static
enum
drm_connector_status
nv50_dac_detect
(
struct
drm_encoder
*
encoder
,
struct
drm_connector
*
connector
)
{
struct
nv50_display
*
priv
=
nv50_display
(
encoder
->
dev
);
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
nouveau_device
*
device
=
nouveau_dev
(
encoder
->
dev
);
struct
nouveau_drm
*
drm
=
nouveau_drm
(
encoder
->
dev
);
enum
drm_connector_status
status
=
connector_status_disconnected
;
uint32_t
dpms_state
,
load_pattern
,
load_state
;
int
or
=
nv_encoder
->
or
;
nv_wr32
(
device
,
NV50_PDISPLAY_DAC_CLK_CTRL1
(
or
),
0x00000001
);
dpms_state
=
nv_rd32
(
device
,
NV50_PDISPLAY_DAC_DPMS_CTRL
(
or
));
nv_wr32
(
device
,
NV50_PDISPLAY_DAC_DPMS_CTRL
(
or
),
0x00150000
|
NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING
);
if
(
!
nv_wait
(
device
,
NV50_PDISPLAY_DAC_DPMS_CTRL
(
or
),
NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING
,
0
))
{
NV_ERROR
(
drm
,
"timeout: DAC_DPMS_CTRL_PENDING(%d) == 0
\n
"
,
or
);
NV_ERROR
(
drm
,
"DAC_DPMS_CTRL(%d) = 0x%08x
\n
"
,
or
,
nv_rd32
(
device
,
NV50_PDISPLAY_DAC_DPMS_CTRL
(
or
)));
return
status
;
}
/* Use bios provided value if possible. */
if
(
drm
->
vbios
.
dactestval
)
{
load_pattern
=
drm
->
vbios
.
dactestval
;
NV_DEBUG
(
drm
,
"Using bios provided load_pattern of %d
\n
"
,
load_pattern
);
}
else
{
load_pattern
=
340
;
NV_DEBUG
(
drm
,
"Using default load_pattern of %d
\n
"
,
load_pattern
);
}
nv_wr32
(
device
,
NV50_PDISPLAY_DAC_LOAD_CTRL
(
or
),
NV50_PDISPLAY_DAC_LOAD_CTRL_ACTIVE
|
load_pattern
);
mdelay
(
45
);
/* give it some time to process */
load_state
=
nv_rd32
(
device
,
NV50_PDISPLAY_DAC_LOAD_CTRL
(
or
));
nv_wr32
(
device
,
NV50_PDISPLAY_DAC_LOAD_CTRL
(
or
),
0
);
nv_wr32
(
device
,
NV50_PDISPLAY_DAC_DPMS_CTRL
(
or
),
dpms_state
|
NV50_PDISPLAY_DAC_DPMS_CTRL_PENDING
);
int
or
=
nv_encoder
->
or
,
ret
;
u32
load
;
if
((
load_state
&
NV50_PDISPLAY_DAC_LOAD_CTRL_PRESENT
)
==
NV50_PDISPLAY_DAC_LOAD_CTRL_PRESENT
)
status
=
connector_status_connected
;
if
(
status
==
connector_status_connected
)
NV_DEBUG
(
drm
,
"Load was detected on output with or %d
\n
"
,
or
);
if
(
drm
->
vbios
.
dactestval
)
load
=
drm
->
vbios
.
dactestval
;
else
NV_DEBUG
(
drm
,
"Load was not detected on output with or %d
\n
"
,
or
);
load
=
340
;
ret
=
nv_exec
(
priv
->
core
,
NV50_DISP_DAC_LOAD
+
or
,
&
load
,
sizeof
(
load
));
if
(
ret
||
load
!=
7
)
return
connector_status_disconnected
;
return
status
;
return
connector_status_connected
;
}
static
void
...
...
drivers/gpu/drm/nouveau/nvd0_display.c
浏览文件 @
7ebb38b5
...
...
@@ -1176,7 +1176,7 @@ nvd0_dac_detect(struct drm_encoder *encoder, struct drm_connector *connector)
{
struct
nvd0_disp
*
disp
=
nvd0_disp
(
encoder
->
dev
);
int
ret
,
or
=
nouveau_encoder
(
encoder
)
->
or
;
u32
load
;
u32
load
=
0
;
ret
=
nv_exec
(
disp
->
core
,
NV50_DISP_DAC_LOAD
+
or
,
&
load
,
sizeof
(
load
));
if
(
ret
||
load
!=
7
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录