Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
12fb9525
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,发现更多精彩内容 >>
提交
12fb9525
编写于
11月 19, 2010
作者:
B
Ben Skeggs
提交者:
Francisco Jerez
12月 08, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: introduce a util function to wait on reg != val
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
ceac3099
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
35 addition
and
13 deletion
+35
-13
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+7
-3
drivers/gpu/drm/nouveau/nouveau_hw.c
drivers/gpu/drm/nouveau/nouveau_hw.c
+2
-2
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+20
-2
drivers/gpu/drm/nouveau/nv04_dac.c
drivers/gpu/drm/nouveau/nv04_dac.c
+6
-6
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
12fb9525
...
@@ -795,8 +795,10 @@ extern int nouveau_ioctl_getparam(struct drm_device *, void *data,
...
@@ -795,8 +795,10 @@ extern int nouveau_ioctl_getparam(struct drm_device *, void *data,
struct
drm_file
*
);
struct
drm_file
*
);
extern
int
nouveau_ioctl_setparam
(
struct
drm_device
*
,
void
*
data
,
extern
int
nouveau_ioctl_setparam
(
struct
drm_device
*
,
void
*
data
,
struct
drm_file
*
);
struct
drm_file
*
);
extern
bool
nouveau_wait_until
(
struct
drm_device
*
,
uint64_t
timeout
,
extern
bool
nouveau_wait_eq
(
struct
drm_device
*
,
uint64_t
timeout
,
uint32_t
reg
,
uint32_t
mask
,
uint32_t
val
);
uint32_t
reg
,
uint32_t
mask
,
uint32_t
val
);
extern
bool
nouveau_wait_ne
(
struct
drm_device
*
,
uint64_t
timeout
,
uint32_t
reg
,
uint32_t
mask
,
uint32_t
val
);
extern
bool
nouveau_wait_for_idle
(
struct
drm_device
*
);
extern
bool
nouveau_wait_for_idle
(
struct
drm_device
*
);
extern
int
nouveau_card_init
(
struct
drm_device
*
);
extern
int
nouveau_card_init
(
struct
drm_device
*
);
...
@@ -1434,7 +1436,9 @@ static inline void nv_wr08(struct drm_device *dev, unsigned reg, u8 val)
...
@@ -1434,7 +1436,9 @@ static inline void nv_wr08(struct drm_device *dev, unsigned reg, u8 val)
}
}
#define nv_wait(dev, reg, mask, val) \
#define nv_wait(dev, reg, mask, val) \
nouveau_wait_until(dev, 2000000000ULL, (reg), (mask), (val))
nouveau_wait_eq(dev, 2000000000ULL, (reg), (mask), (val))
#define nv_wait_ne(dev, reg, mask, val) \
nouveau_wait_ne(dev, 2000000000ULL, (reg), (mask), (val))
/* PRAMIN access */
/* PRAMIN access */
static
inline
u32
nv_ri32
(
struct
drm_device
*
dev
,
unsigned
offset
)
static
inline
u32
nv_ri32
(
struct
drm_device
*
dev
,
unsigned
offset
)
...
...
drivers/gpu/drm/nouveau/nouveau_hw.c
浏览文件 @
12fb9525
...
@@ -999,8 +999,8 @@ nv_load_state_ext(struct drm_device *dev, int head,
...
@@ -999,8 +999,8 @@ nv_load_state_ext(struct drm_device *dev, int head,
if
(
dev_priv
->
card_type
==
NV_10
)
{
if
(
dev_priv
->
card_type
==
NV_10
)
{
/* Not waiting for vertical retrace before modifying
/* Not waiting for vertical retrace before modifying
CRE_53/CRE_54 causes lockups. */
CRE_53/CRE_54 causes lockups. */
nouveau_wait_
until
(
dev
,
650000000
,
NV_PRMCIO_INP0__COLOR
,
0x8
,
0x8
);
nouveau_wait_
eq
(
dev
,
650000000
,
NV_PRMCIO_INP0__COLOR
,
0x8
,
0x8
);
nouveau_wait_
until
(
dev
,
650000000
,
NV_PRMCIO_INP0__COLOR
,
0x8
,
0x0
);
nouveau_wait_
eq
(
dev
,
650000000
,
NV_PRMCIO_INP0__COLOR
,
0x8
,
0x0
);
}
}
wr_cio_state
(
dev
,
head
,
regp
,
NV_CIO_CRE_53
);
wr_cio_state
(
dev
,
head
,
regp
,
NV_CIO_CRE_53
);
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
浏览文件 @
12fb9525
...
@@ -1126,8 +1126,9 @@ nouveau_ioctl_setparam(struct drm_device *dev, void *data,
...
@@ -1126,8 +1126,9 @@ nouveau_ioctl_setparam(struct drm_device *dev, void *data,
}
}
/* Wait until (value(reg) & mask) == val, up until timeout has hit */
/* Wait until (value(reg) & mask) == val, up until timeout has hit */
bool
nouveau_wait_until
(
struct
drm_device
*
dev
,
uint64_t
timeout
,
bool
uint32_t
reg
,
uint32_t
mask
,
uint32_t
val
)
nouveau_wait_eq
(
struct
drm_device
*
dev
,
uint64_t
timeout
,
uint32_t
reg
,
uint32_t
mask
,
uint32_t
val
)
{
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_timer_engine
*
ptimer
=
&
dev_priv
->
engine
.
timer
;
struct
nouveau_timer_engine
*
ptimer
=
&
dev_priv
->
engine
.
timer
;
...
@@ -1141,6 +1142,23 @@ bool nouveau_wait_until(struct drm_device *dev, uint64_t timeout,
...
@@ -1141,6 +1142,23 @@ bool nouveau_wait_until(struct drm_device *dev, uint64_t timeout,
return
false
;
return
false
;
}
}
/* Wait until (value(reg) & mask) != val, up until timeout has hit */
bool
nouveau_wait_ne
(
struct
drm_device
*
dev
,
uint64_t
timeout
,
uint32_t
reg
,
uint32_t
mask
,
uint32_t
val
)
{
struct
drm_nouveau_private
*
dev_priv
=
dev
->
dev_private
;
struct
nouveau_timer_engine
*
ptimer
=
&
dev_priv
->
engine
.
timer
;
uint64_t
start
=
ptimer
->
read
(
dev
);
do
{
if
((
nv_rd32
(
dev
,
reg
)
&
mask
)
!=
val
)
return
true
;
}
while
(
ptimer
->
read
(
dev
)
-
start
<
timeout
);
return
false
;
}
/* Waits for PGRAPH to go completely idle */
/* Waits for PGRAPH to go completely idle */
bool
nouveau_wait_for_idle
(
struct
drm_device
*
dev
)
bool
nouveau_wait_for_idle
(
struct
drm_device
*
dev
)
{
{
...
...
drivers/gpu/drm/nouveau/nv04_dac.c
浏览文件 @
12fb9525
...
@@ -74,14 +74,14 @@ static int sample_load_twice(struct drm_device *dev, bool sense[2])
...
@@ -74,14 +74,14 @@ static int sample_load_twice(struct drm_device *dev, bool sense[2])
* use a 10ms timeout (guards against crtc being inactive, in
* use a 10ms timeout (guards against crtc being inactive, in
* which case blank state would never change)
* which case blank state would never change)
*/
*/
if
(
!
nouveau_wait_
until
(
dev
,
10000000
,
NV_PRMCIO_INP0__COLOR
,
if
(
!
nouveau_wait_
eq
(
dev
,
10000000
,
NV_PRMCIO_INP0__COLOR
,
0x00000001
,
0x00000000
))
0x00000001
,
0x00000000
))
return
-
EBUSY
;
return
-
EBUSY
;
if
(
!
nouveau_wait_
until
(
dev
,
10000000
,
NV_PRMCIO_INP0__COLOR
,
if
(
!
nouveau_wait_
eq
(
dev
,
10000000
,
NV_PRMCIO_INP0__COLOR
,
0x00000001
,
0x00000001
))
0x00000001
,
0x00000001
))
return
-
EBUSY
;
return
-
EBUSY
;
if
(
!
nouveau_wait_
until
(
dev
,
10000000
,
NV_PRMCIO_INP0__COLOR
,
if
(
!
nouveau_wait_
eq
(
dev
,
10000000
,
NV_PRMCIO_INP0__COLOR
,
0x00000001
,
0x00000000
))
0x00000001
,
0x00000000
))
return
-
EBUSY
;
return
-
EBUSY
;
udelay
(
100
);
udelay
(
100
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录