Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
bb7ef1ec
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看板
提交
bb7ef1ec
编写于
5月 19, 2014
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/disp/dp: maintain receiver caps in response to hpd signal
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
b8407c9e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
68 addition
and
8 deletion
+68
-8
drivers/gpu/drm/nouveau/core/engine/disp/outpdp.c
drivers/gpu/drm/nouveau/core/engine/disp/outpdp.c
+64
-8
drivers/gpu/drm/nouveau/core/engine/disp/outpdp.h
drivers/gpu/drm/nouveau/core/engine/disp/outpdp.h
+4
-0
未找到文件。
drivers/gpu/drm/nouveau/core/engine/disp/outpdp.c
浏览文件 @
bb7ef1ec
...
@@ -26,21 +26,73 @@
...
@@ -26,21 +26,73 @@
#include "outpdp.h"
#include "outpdp.h"
#include "conn.h"
#include "conn.h"
#include "dport.h"
static
int
static
void
nvkm_output_dp_
service
(
void
*
data
,
u32
type
,
int
index
)
nvkm_output_dp_
enable
(
struct
nvkm_output_dp
*
outp
,
bool
present
)
{
{
struct
nvkm_output_dp
*
outp
=
data
;
struct
nouveau_i2c_port
*
port
=
outp
->
base
.
edid
;
DBG
(
"IRQ: %d
\n
"
,
type
);
if
(
present
)
{
return
NVKM_EVENT_KEEP
;
if
(
!
outp
->
present
)
{
nouveau_i2c
(
port
)
->
acquire_pad
(
port
,
0
);
DBG
(
"aux power -> always
\n
"
);
outp
->
present
=
true
;
}
}
else
{
if
(
outp
->
present
)
{
nouveau_i2c
(
port
)
->
release_pad
(
port
);
DBG
(
"aux power -> demand
\n
"
);
outp
->
present
=
false
;
}
}
}
static
void
nvkm_output_dp_detect
(
struct
nvkm_output_dp
*
outp
)
{
struct
nouveau_i2c_port
*
port
=
outp
->
base
.
edid
;
int
ret
=
nouveau_i2c
(
port
)
->
acquire_pad
(
port
,
0
);
if
(
ret
==
0
)
{
ret
=
nv_rdaux
(
outp
->
base
.
edid
,
DPCD_RC00_DPCD_REV
,
outp
->
dpcd
,
sizeof
(
outp
->
dpcd
));
nvkm_output_dp_enable
(
outp
,
ret
==
0
);
nouveau_i2c
(
port
)
->
release_pad
(
port
);
}
}
static
void
nvkm_output_dp_service_work
(
struct
work_struct
*
work
)
{
struct
nvkm_output_dp
*
outp
=
container_of
(
work
,
typeof
(
*
outp
),
work
);
struct
nouveau_disp
*
disp
=
nouveau_disp
(
outp
);
int
type
=
atomic_xchg
(
&
outp
->
pending
,
0
);
u32
send
=
0
;
if
(
type
&
(
NVKM_I2C_PLUG
|
NVKM_I2C_UNPLUG
))
{
nvkm_output_dp_detect
(
outp
);
if
(
type
&
NVKM_I2C_UNPLUG
)
send
|=
NVKM_HPD_UNPLUG
;
if
(
type
&
NVKM_I2C_PLUG
)
send
|=
NVKM_HPD_PLUG
;
nouveau_event_get
(
outp
->
base
.
conn
->
hpd
.
event
);
}
if
(
type
&
NVKM_I2C_IRQ
)
{
nouveau_event_get
(
outp
->
irq
);
send
|=
NVKM_HPD_IRQ
;
}
nouveau_event_trigger
(
disp
->
hpd
,
send
,
outp
->
base
.
info
.
connector
);
}
}
static
int
static
int
nvkm_output_dp_
hotplug
(
void
*
data
,
u32
type
,
int
index
)
nvkm_output_dp_
service
(
void
*
data
,
u32
type
,
int
index
)
{
{
struct
nvkm_output_dp
*
outp
=
data
;
struct
nvkm_output_dp
*
outp
=
data
;
DBG
(
"HPD: %d
\n
"
,
type
);
DBG
(
"HPD: %d
\n
"
,
type
);
return
NVKM_EVENT_KEEP
;
atomic_or
(
type
,
&
outp
->
pending
);
schedule_work
(
&
outp
->
work
);
return
NVKM_EVENT_DROP
;
}
}
int
int
...
@@ -48,6 +100,7 @@ _nvkm_output_dp_fini(struct nouveau_object *object, bool suspend)
...
@@ -48,6 +100,7 @@ _nvkm_output_dp_fini(struct nouveau_object *object, bool suspend)
{
{
struct
nvkm_output_dp
*
outp
=
(
void
*
)
object
;
struct
nvkm_output_dp
*
outp
=
(
void
*
)
object
;
nouveau_event_put
(
outp
->
irq
);
nouveau_event_put
(
outp
->
irq
);
nvkm_output_dp_enable
(
outp
,
false
);
return
nvkm_output_fini
(
&
outp
->
base
,
suspend
);
return
nvkm_output_fini
(
&
outp
->
base
,
suspend
);
}
}
...
@@ -55,6 +108,7 @@ int
...
@@ -55,6 +108,7 @@ int
_nvkm_output_dp_init
(
struct
nouveau_object
*
object
)
_nvkm_output_dp_init
(
struct
nouveau_object
*
object
)
{
{
struct
nvkm_output_dp
*
outp
=
(
void
*
)
object
;
struct
nvkm_output_dp
*
outp
=
(
void
*
)
object
;
nvkm_output_dp_detect
(
outp
);
return
nvkm_output_init
(
&
outp
->
base
);
return
nvkm_output_init
(
&
outp
->
base
);
}
}
...
@@ -113,10 +167,12 @@ nvkm_output_dp_create_(struct nouveau_object *parent,
...
@@ -113,10 +167,12 @@ nvkm_output_dp_create_(struct nouveau_object *parent,
return
ret
;
return
ret
;
}
}
INIT_WORK
(
&
outp
->
work
,
nvkm_output_dp_service_work
);
/* hotplug detect, replaces gpio-based mechanism with aux events */
/* hotplug detect, replaces gpio-based mechanism with aux events */
ret
=
nouveau_event_new
(
i2c
->
ntfy
,
NVKM_I2C_PLUG
|
NVKM_I2C_UNPLUG
,
ret
=
nouveau_event_new
(
i2c
->
ntfy
,
NVKM_I2C_PLUG
|
NVKM_I2C_UNPLUG
,
outp
->
base
.
edid
->
index
,
outp
->
base
.
edid
->
index
,
nvkm_output_dp_
hotplug
,
outp
,
nvkm_output_dp_
service
,
outp
,
&
outp
->
base
.
conn
->
hpd
.
event
);
&
outp
->
base
.
conn
->
hpd
.
event
);
if
(
ret
)
{
if
(
ret
)
{
ERR
(
"error monitoring aux hpd events: %d
\n
"
,
ret
);
ERR
(
"error monitoring aux hpd events: %d
\n
"
,
ret
);
...
...
drivers/gpu/drm/nouveau/core/engine/disp/outpdp.h
浏览文件 @
bb7ef1ec
...
@@ -14,6 +14,10 @@ struct nvkm_output_dp {
...
@@ -14,6 +14,10 @@ struct nvkm_output_dp {
struct
nouveau_eventh
*
irq
;
struct
nouveau_eventh
*
irq
;
struct
nouveau_eventh
*
hpd
;
struct
nouveau_eventh
*
hpd
;
struct
work_struct
work
;
atomic_t
pending
;
bool
present
;
u8
dpcd
[
16
];
};
};
#define nvkm_output_dp_create(p,e,c,b,i,d) \
#define nvkm_output_dp_create(p,e,c,b,i,d) \
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录