Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
98ac3f06
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看板
提交
98ac3f06
编写于
4月 08, 2016
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fifo/gk104-: subclass func
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
e93e198d
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
65 addition
and
73 deletion
+65
-73
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
+11
-0
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+38
-17
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
+7
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c
+1
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c
+1
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c
+1
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
+1
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
+1
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
+1
-8
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
+3
-0
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/fifo/base.c
浏览文件 @
98ac3f06
...
...
@@ -178,6 +178,17 @@ nvkm_fifo_class_get(struct nvkm_oclass *oclass, int index,
const
struct
nvkm_fifo_chan_oclass
*
sclass
;
int
c
=
0
;
if
(
fifo
->
func
->
class_get
)
{
int
ret
=
fifo
->
func
->
class_get
(
fifo
,
index
,
&
sclass
);
if
(
ret
==
0
)
{
oclass
->
base
=
sclass
->
base
;
oclass
->
engn
=
sclass
;
*
class
=
&
nvkm_fifo_class
;
return
0
;
}
return
ret
;
}
while
((
sclass
=
fifo
->
func
->
chan
[
c
]))
{
if
(
c
++
==
index
)
{
oclass
->
base
=
sclass
->
base
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
98ac3f06
...
...
@@ -33,14 +33,29 @@
#include <nvif/class.h>
void
static
int
gk104_fifo_class_get
(
struct
nvkm_fifo
*
base
,
int
index
,
const
struct
nvkm_fifo_chan_oclass
**
psclass
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
int
c
=
0
;
while
((
*
psclass
=
fifo
->
func
->
chan
[
c
]))
{
if
(
c
++
==
index
)
return
0
;
}
return
c
;
}
static
void
gk104_fifo_uevent_fini
(
struct
nvkm_fifo
*
fifo
)
{
struct
nvkm_device
*
device
=
fifo
->
engine
.
subdev
.
device
;
nvkm_mask
(
device
,
0x002140
,
0x80000000
,
0x00000000
);
}
void
static
void
gk104_fifo_uevent_init
(
struct
nvkm_fifo
*
fifo
)
{
struct
nvkm_device
*
device
=
fifo
->
engine
.
subdev
.
device
;
...
...
@@ -558,7 +573,7 @@ gk104_fifo_intr_engine(struct gk104_fifo *fifo)
nvkm_fifo_uevent
(
&
fifo
->
base
);
}
void
static
void
gk104_fifo_intr
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
...
...
@@ -650,7 +665,7 @@ gk104_fifo_intr(struct nvkm_fifo *base)
}
}
void
static
void
gk104_fifo_fini
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
...
...
@@ -660,7 +675,7 @@ gk104_fifo_fini(struct nvkm_fifo *base)
nvkm_mask
(
device
,
0x002140
,
0x10000000
,
0x10000000
);
}
int
static
int
gk104_fifo_oneinit
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
...
...
@@ -739,7 +754,7 @@ gk104_fifo_oneinit(struct nvkm_fifo *base)
return
0
;
}
void
static
void
gk104_fifo_init
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
...
...
@@ -768,7 +783,7 @@ gk104_fifo_init(struct nvkm_fifo *base)
nvkm_wr32
(
device
,
0x002140
,
0x7fffffff
);
}
void
*
static
void
*
gk104_fifo_dtor
(
struct
nvkm_fifo
*
base
)
{
struct
gk104_fifo
*
fifo
=
gk104_fifo
(
base
);
...
...
@@ -785,29 +800,35 @@ gk104_fifo_dtor(struct nvkm_fifo *base)
return
fifo
;
}
static
const
struct
nvkm_fifo_func
gk104_fifo_
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
class_get
=
gk104_fifo_class_get
,
};
int
gk104_fifo_new_
(
const
struct
nvkm
_fifo_func
*
func
,
struct
nvkm_device
*
device
,
gk104_fifo_new_
(
const
struct
gk104
_fifo_func
*
func
,
struct
nvkm_device
*
device
,
int
index
,
int
nr
,
struct
nvkm_fifo
**
pfifo
)
{
struct
gk104_fifo
*
fifo
;
if
(
!
(
fifo
=
kzalloc
(
sizeof
(
*
fifo
),
GFP_KERNEL
)))
return
-
ENOMEM
;
fifo
->
func
=
func
;
INIT_WORK
(
&
fifo
->
recover
.
work
,
gk104_fifo_recover_work
);
*
pfifo
=
&
fifo
->
base
;
return
nvkm_fifo_ctor
(
func
,
device
,
index
,
nr
,
&
fifo
->
base
);
return
nvkm_fifo_ctor
(
&
gk104_fifo_
,
device
,
index
,
nr
,
&
fifo
->
base
);
}
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gk104_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gk104_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
浏览文件 @
98ac3f06
...
...
@@ -7,6 +7,7 @@
struct
gk104_fifo_chan
;
struct
gk104_fifo
{
const
struct
gk104_fifo_func
*
func
;
struct
nvkm_fifo
base
;
struct
{
...
...
@@ -39,15 +40,13 @@ struct gk104_fifo {
}
user
;
};
int
gk104_fifo_new_
(
const
struct
nvkm_fifo_func
*
,
struct
nvkm_device
*
,
struct
gk104_fifo_func
{
int
dummy
;
const
struct
nvkm_fifo_chan_oclass
*
chan
[];
};
int
gk104_fifo_new_
(
const
struct
gk104_fifo_func
*
,
struct
nvkm_device
*
,
int
index
,
int
nr
,
struct
nvkm_fifo
**
);
void
*
gk104_fifo_dtor
(
struct
nvkm_fifo
*
);
int
gk104_fifo_oneinit
(
struct
nvkm_fifo
*
);
void
gk104_fifo_init
(
struct
nvkm_fifo
*
);
void
gk104_fifo_fini
(
struct
nvkm_fifo
*
);
void
gk104_fifo_intr
(
struct
nvkm_fifo
*
);
void
gk104_fifo_uevent_init
(
struct
nvkm_fifo
*
);
void
gk104_fifo_uevent_fini
(
struct
nvkm_fifo
*
);
void
gk104_fifo_runlist_insert
(
struct
gk104_fifo
*
,
struct
gk104_fifo_chan
*
);
void
gk104_fifo_runlist_remove
(
struct
gk104_fifo
*
,
struct
gk104_fifo_chan
*
);
void
gk104_fifo_runlist_commit
(
struct
gk104_fifo
*
,
int
runl
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c
浏览文件 @
98ac3f06
...
...
@@ -24,15 +24,8 @@
#include "gk104.h"
#include "changk104.h"
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gk110_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gk110_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c
浏览文件 @
98ac3f06
...
...
@@ -24,15 +24,8 @@
#include "gk104.h"
#include "changk104.h"
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gk208_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gk104_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c
浏览文件 @
98ac3f06
...
...
@@ -22,15 +22,8 @@
#include "gk104.h"
#include "changk104.h"
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gk20a_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gk104_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
浏览文件 @
98ac3f06
...
...
@@ -24,15 +24,8 @@
#include "gk104.h"
#include "changk104.h"
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gm107_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gk110_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
浏览文件 @
98ac3f06
...
...
@@ -24,15 +24,8 @@
#include "gk104.h"
#include "changk104.h"
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gm200_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gm200_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
浏览文件 @
98ac3f06
...
...
@@ -22,15 +22,8 @@
#include "gk104.h"
#include "changk104.h"
static
const
struct
nvkm
_fifo_func
static
const
struct
gk104
_fifo_func
gm20b_fifo
=
{
.
dtor
=
gk104_fifo_dtor
,
.
oneinit
=
gk104_fifo_oneinit
,
.
init
=
gk104_fifo_init
,
.
fini
=
gk104_fifo_fini
,
.
intr
=
gk104_fifo_intr
,
.
uevent_init
=
gk104_fifo_uevent_init
,
.
uevent_fini
=
gk104_fifo_uevent_fini
,
.
chan
=
{
&
gm200_fifo_gpfifo_oclass
,
NULL
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/priv.h
浏览文件 @
98ac3f06
...
...
@@ -7,6 +7,7 @@ int nvkm_fifo_ctor(const struct nvkm_fifo_func *, struct nvkm_device *,
int
index
,
int
nr
,
struct
nvkm_fifo
*
);
void
nvkm_fifo_uevent
(
struct
nvkm_fifo
*
);
struct
nvkm_fifo_chan_oclass
;
struct
nvkm_fifo_func
{
void
*
(
*
dtor
)(
struct
nvkm_fifo
*
);
int
(
*
oneinit
)(
struct
nvkm_fifo
*
);
...
...
@@ -17,6 +18,8 @@ struct nvkm_fifo_func {
void
(
*
start
)(
struct
nvkm_fifo
*
,
unsigned
long
*
);
void
(
*
uevent_init
)(
struct
nvkm_fifo
*
);
void
(
*
uevent_fini
)(
struct
nvkm_fifo
*
);
int
(
*
class_get
)(
struct
nvkm_fifo
*
,
int
index
,
const
struct
nvkm_fifo_chan_oclass
**
);
const
struct
nvkm_fifo_chan_oclass
*
chan
[];
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录