Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
43598875
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
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,发现更多精彩内容 >>
提交
43598875
编写于
11月 22, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/core: implement shortcut for simple engctx construction
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
e5e454f9
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
24 addition
and
115 deletion
+24
-115
drivers/gpu/drm/nouveau/core/core/engctx.c
drivers/gpu/drm/nouveau/core/core/engctx.c
+15
-0
drivers/gpu/drm/nouveau/core/engine/copy/nva3.c
drivers/gpu/drm/nouveau/core/engine/copy/nva3.c
+1
-23
drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c
drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c
+1
-23
drivers/gpu/drm/nouveau/core/engine/copy/nve0.c
drivers/gpu/drm/nouveau/core/engine/copy/nve0.c
+1
-23
drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
+1
-23
drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
+1
-23
drivers/gpu/drm/nouveau/core/include/core/engctx.h
drivers/gpu/drm/nouveau/core/include/core/engctx.h
+3
-0
drivers/gpu/drm/nouveau/core/include/core/falcon.h
drivers/gpu/drm/nouveau/core/include/core/falcon.h
+1
-0
未找到文件。
drivers/gpu/drm/nouveau/core/core/engctx.c
浏览文件 @
43598875
...
...
@@ -189,6 +189,21 @@ nouveau_engctx_fini(struct nouveau_engctx *engctx, bool suspend)
return
nouveau_gpuobj_fini
(
&
engctx
->
base
,
suspend
);
}
int
_nouveau_engctx_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nouveau_engctx
*
engctx
;
int
ret
;
ret
=
nouveau_engctx_create
(
parent
,
engine
,
oclass
,
NULL
,
256
,
256
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
engctx
);
*
pobject
=
nv_object
(
engctx
);
return
ret
;
}
void
_nouveau_engctx_dtor
(
struct
nouveau_object
*
object
)
{
...
...
drivers/gpu/drm/nouveau/core/engine/copy/nva3.c
浏览文件 @
43598875
...
...
@@ -38,10 +38,6 @@ struct nva3_copy_priv {
struct
nouveau_falcon
base
;
};
struct
nva3_copy_chan
{
struct
nouveau_falcon_chan
base
;
};
/*******************************************************************************
* Copy object classes
******************************************************************************/
...
...
@@ -56,29 +52,11 @@ nva3_copy_sclass[] = {
* PCOPY context
******************************************************************************/
static
int
nva3_copy_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nva3_copy_chan
*
priv
;
int
ret
;
ret
=
nouveau_falcon_context_create
(
parent
,
engine
,
oclass
,
NULL
,
256
,
0
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
return
0
;
}
static
struct
nouveau_oclass
nva3_copy_cclass
=
{
.
handle
=
NV_ENGCTX
(
COPY0
,
0xa3
),
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nva3_copy
_context_ctor
,
.
ctor
=
_nouveau_falcon
_context_ctor
,
.
dtor
=
_nouveau_falcon_context_dtor
,
.
init
=
_nouveau_falcon_context_init
,
.
fini
=
_nouveau_falcon_context_fini
,
...
...
drivers/gpu/drm/nouveau/core/engine/copy/nvc0.c
浏览文件 @
43598875
...
...
@@ -35,10 +35,6 @@ struct nvc0_copy_priv {
struct
nouveau_falcon
base
;
};
struct
nvc0_copy_chan
{
struct
nouveau_falcon_chan
base
;
};
/*******************************************************************************
* Copy object classes
******************************************************************************/
...
...
@@ -59,27 +55,9 @@ nvc0_copy1_sclass[] = {
* PCOPY context
******************************************************************************/
static
int
nvc0_copy_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nvc0_copy_chan
*
priv
;
int
ret
;
ret
=
nouveau_falcon_context_create
(
parent
,
engine
,
oclass
,
NULL
,
256
,
256
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
return
0
;
}
static
struct
nouveau_ofuncs
nvc0_copy_context_ofuncs
=
{
.
ctor
=
nvc0_copy
_context_ctor
,
.
ctor
=
_nouveau_falcon
_context_ctor
,
.
dtor
=
_nouveau_falcon_context_dtor
,
.
init
=
_nouveau_falcon_context_init
,
.
fini
=
_nouveau_falcon_context_fini
,
...
...
drivers/gpu/drm/nouveau/core/engine/copy/nve0.c
浏览文件 @
43598875
...
...
@@ -33,10 +33,6 @@ struct nve0_copy_priv {
struct
nouveau_engine
base
;
};
struct
nve0_copy_chan
{
struct
nouveau_engctx
base
;
};
/*******************************************************************************
* Copy object classes
******************************************************************************/
...
...
@@ -51,27 +47,9 @@ nve0_copy_sclass[] = {
* PCOPY context
******************************************************************************/
static
int
nve0_copy_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nve0_copy_chan
*
priv
;
int
ret
;
ret
=
nouveau_engctx_create
(
parent
,
engine
,
oclass
,
NULL
,
256
,
256
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
return
0
;
}
static
struct
nouveau_ofuncs
nve0_copy_context_ofuncs
=
{
.
ctor
=
nve0_copy_context
_ctor
,
.
ctor
=
_nouveau_engctx
_ctor
,
.
dtor
=
_nouveau_engctx_dtor
,
.
init
=
_nouveau_engctx_init
,
.
fini
=
_nouveau_engctx_fini
,
...
...
drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
浏览文件 @
43598875
...
...
@@ -37,10 +37,6 @@ struct nv84_crypt_priv {
struct
nouveau_engine
base
;
};
struct
nv84_crypt_chan
{
struct
nouveau_engctx
base
;
};
/*******************************************************************************
* Crypt object classes
******************************************************************************/
...
...
@@ -87,29 +83,11 @@ nv84_crypt_sclass[] = {
* PCRYPT context
******************************************************************************/
static
int
nv84_crypt_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv84_crypt_chan
*
priv
;
int
ret
;
ret
=
nouveau_engctx_create
(
parent
,
engine
,
oclass
,
NULL
,
256
,
0
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
return
0
;
}
static
struct
nouveau_oclass
nv84_crypt_cclass
=
{
.
handle
=
NV_ENGCTX
(
CRYPT
,
0x84
),
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv84_crypt_context
_ctor
,
.
ctor
=
_nouveau_engctx
_ctor
,
.
dtor
=
_nouveau_engctx_dtor
,
.
init
=
_nouveau_engctx_init
,
.
fini
=
_nouveau_engctx_fini
,
...
...
drivers/gpu/drm/nouveau/core/engine/crypt/nv98.c
浏览文件 @
43598875
...
...
@@ -40,10 +40,6 @@ struct nv98_crypt_priv {
struct
nouveau_falcon
base
;
};
struct
nv98_crypt_chan
{
struct
nouveau_falcon_chan
base
;
};
/*******************************************************************************
* Crypt object classes
******************************************************************************/
...
...
@@ -58,29 +54,11 @@ nv98_crypt_sclass[] = {
* PCRYPT context
******************************************************************************/
static
int
nv98_crypt_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv98_crypt_chan
*
priv
;
int
ret
;
ret
=
nouveau_falcon_context_create
(
parent
,
engine
,
oclass
,
NULL
,
256
,
256
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
return
0
;
}
static
struct
nouveau_oclass
nv98_crypt_cclass
=
{
.
handle
=
NV_ENGCTX
(
CRYPT
,
0x98
),
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv98_crypt
_context_ctor
,
.
ctor
=
_nouveau_falcon
_context_ctor
,
.
dtor
=
_nouveau_falcon_context_dtor
,
.
init
=
_nouveau_falcon_context_init
,
.
fini
=
_nouveau_falcon_context_fini
,
...
...
drivers/gpu/drm/nouveau/core/include/core/engctx.h
浏览文件 @
43598875
...
...
@@ -39,6 +39,9 @@ void nouveau_engctx_destroy(struct nouveau_engctx *);
int
nouveau_engctx_init
(
struct
nouveau_engctx
*
);
int
nouveau_engctx_fini
(
struct
nouveau_engctx
*
,
bool
suspend
);
int
_nouveau_engctx_ctor
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
struct
nouveau_oclass
*
,
void
*
,
u32
,
struct
nouveau_object
**
);
void
_nouveau_engctx_dtor
(
struct
nouveau_object
*
);
int
_nouveau_engctx_init
(
struct
nouveau_object
*
);
int
_nouveau_engctx_fini
(
struct
nouveau_object
*
,
bool
suspend
);
...
...
drivers/gpu/drm/nouveau/core/include/core/falcon.h
浏览文件 @
43598875
...
...
@@ -18,6 +18,7 @@ struct nouveau_falcon_chan {
#define nouveau_falcon_context_fini(d,s) \
nouveau_engctx_fini(&(d)->base, (s))
#define _nouveau_falcon_context_ctor _nouveau_engctx_ctor
#define _nouveau_falcon_context_dtor _nouveau_engctx_dtor
#define _nouveau_falcon_context_init _nouveau_engctx_init
#define _nouveau_falcon_context_fini _nouveau_engctx_fini
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录