Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
617e234b
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看板
提交
617e234b
编写于
12月 13, 2009
作者:
F
Francisco Jerez
提交者:
Dave Airlie
1月 11, 2010
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: Add cache_flush/pull fifo engine functions.
Signed-off-by:
N
Francisco Jerez
<
currojerez@riseup.net
>
上级
94fd163d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
48 addition
and
0 deletion
+48
-0
drivers/gpu/drm/nouveau/nouveau_drv.h
drivers/gpu/drm/nouveau/nouveau_drv.h
+4
-0
drivers/gpu/drm/nouveau/nouveau_state.c
drivers/gpu/drm/nouveau/nouveau_state.c
+10
-0
drivers/gpu/drm/nouveau/nv04_fifo.c
drivers/gpu/drm/nouveau/nv04_fifo.c
+34
-0
未找到文件。
drivers/gpu/drm/nouveau/nouveau_drv.h
浏览文件 @
617e234b
...
...
@@ -292,6 +292,8 @@ struct nouveau_fifo_engine {
void
(
*
disable
)(
struct
drm_device
*
);
void
(
*
enable
)(
struct
drm_device
*
);
bool
(
*
reassign
)(
struct
drm_device
*
,
bool
enable
);
bool
(
*
cache_flush
)(
struct
drm_device
*
dev
);
bool
(
*
cache_pull
)(
struct
drm_device
*
dev
,
bool
enable
);
int
(
*
channel_id
)(
struct
drm_device
*
);
...
...
@@ -889,6 +891,8 @@ extern int nv04_fifo_init(struct drm_device *);
extern
void
nv04_fifo_disable
(
struct
drm_device
*
);
extern
void
nv04_fifo_enable
(
struct
drm_device
*
);
extern
bool
nv04_fifo_reassign
(
struct
drm_device
*
,
bool
);
extern
bool
nv04_fifo_cache_flush
(
struct
drm_device
*
);
extern
bool
nv04_fifo_cache_pull
(
struct
drm_device
*
,
bool
);
extern
int
nv04_fifo_channel_id
(
struct
drm_device
*
);
extern
int
nv04_fifo_create_context
(
struct
nouveau_channel
*
);
extern
void
nv04_fifo_destroy_context
(
struct
nouveau_channel
*
);
...
...
drivers/gpu/drm/nouveau/nouveau_state.c
浏览文件 @
617e234b
...
...
@@ -76,6 +76,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fifo
.
disable
=
nv04_fifo_disable
;
engine
->
fifo
.
enable
=
nv04_fifo_enable
;
engine
->
fifo
.
reassign
=
nv04_fifo_reassign
;
engine
->
fifo
.
cache_flush
=
nv04_fifo_cache_flush
;
engine
->
fifo
.
cache_pull
=
nv04_fifo_cache_pull
;
engine
->
fifo
.
channel_id
=
nv04_fifo_channel_id
;
engine
->
fifo
.
create_context
=
nv04_fifo_create_context
;
engine
->
fifo
.
destroy_context
=
nv04_fifo_destroy_context
;
...
...
@@ -115,6 +117,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fifo
.
disable
=
nv04_fifo_disable
;
engine
->
fifo
.
enable
=
nv04_fifo_enable
;
engine
->
fifo
.
reassign
=
nv04_fifo_reassign
;
engine
->
fifo
.
cache_flush
=
nv04_fifo_cache_flush
;
engine
->
fifo
.
cache_pull
=
nv04_fifo_cache_pull
;
engine
->
fifo
.
channel_id
=
nv10_fifo_channel_id
;
engine
->
fifo
.
create_context
=
nv10_fifo_create_context
;
engine
->
fifo
.
destroy_context
=
nv10_fifo_destroy_context
;
...
...
@@ -154,6 +158,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fifo
.
disable
=
nv04_fifo_disable
;
engine
->
fifo
.
enable
=
nv04_fifo_enable
;
engine
->
fifo
.
reassign
=
nv04_fifo_reassign
;
engine
->
fifo
.
cache_flush
=
nv04_fifo_cache_flush
;
engine
->
fifo
.
cache_pull
=
nv04_fifo_cache_pull
;
engine
->
fifo
.
channel_id
=
nv10_fifo_channel_id
;
engine
->
fifo
.
create_context
=
nv10_fifo_create_context
;
engine
->
fifo
.
destroy_context
=
nv10_fifo_destroy_context
;
...
...
@@ -193,6 +199,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fifo
.
disable
=
nv04_fifo_disable
;
engine
->
fifo
.
enable
=
nv04_fifo_enable
;
engine
->
fifo
.
reassign
=
nv04_fifo_reassign
;
engine
->
fifo
.
cache_flush
=
nv04_fifo_cache_flush
;
engine
->
fifo
.
cache_pull
=
nv04_fifo_cache_pull
;
engine
->
fifo
.
channel_id
=
nv10_fifo_channel_id
;
engine
->
fifo
.
create_context
=
nv10_fifo_create_context
;
engine
->
fifo
.
destroy_context
=
nv10_fifo_destroy_context
;
...
...
@@ -233,6 +241,8 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev)
engine
->
fifo
.
disable
=
nv04_fifo_disable
;
engine
->
fifo
.
enable
=
nv04_fifo_enable
;
engine
->
fifo
.
reassign
=
nv04_fifo_reassign
;
engine
->
fifo
.
cache_flush
=
nv04_fifo_cache_flush
;
engine
->
fifo
.
cache_pull
=
nv04_fifo_cache_pull
;
engine
->
fifo
.
channel_id
=
nv10_fifo_channel_id
;
engine
->
fifo
.
create_context
=
nv40_fifo_create_context
;
engine
->
fifo
.
destroy_context
=
nv40_fifo_destroy_context
;
...
...
drivers/gpu/drm/nouveau/nv04_fifo.c
浏览文件 @
617e234b
...
...
@@ -71,6 +71,40 @@ nv04_fifo_reassign(struct drm_device *dev, bool enable)
return
(
reassign
==
1
);
}
bool
nv04_fifo_cache_flush
(
struct
drm_device
*
dev
)
{
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
,
NV03_PFIFO_CACHE1_GET
)
==
nv_rd32
(
dev
,
NV03_PFIFO_CACHE1_PUT
))
return
true
;
}
while
(
ptimer
->
read
(
dev
)
-
start
<
100000000
);
NV_ERROR
(
dev
,
"Timeout flushing the PFIFO cache.
\n
"
);
return
false
;
}
bool
nv04_fifo_cache_pull
(
struct
drm_device
*
dev
,
bool
enable
)
{
uint32_t
pull
=
nv_rd32
(
dev
,
NV04_PFIFO_CACHE1_PULL0
);
if
(
enable
)
{
nv_wr32
(
dev
,
NV04_PFIFO_CACHE1_PULL0
,
pull
|
1
);
}
else
{
nv_wr32
(
dev
,
NV04_PFIFO_CACHE1_PULL0
,
pull
&
~
1
);
nv_wr32
(
dev
,
NV04_PFIFO_CACHE1_HASH
,
0
);
}
return
!!
(
pull
&
1
);
}
int
nv04_fifo_channel_id
(
struct
drm_device
*
dev
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录