Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
b3c98150
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看板
提交
b3c98150
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/cipher: convert user classes to new-style nvkm_object
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
e5ff1127
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
58 deletion
+38
-58
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+1
-2
drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
+37
-56
未找到文件。
drivers/gpu/drm/nouveau/include/nvif/class.h
浏览文件 @
b3c98150
...
@@ -124,13 +124,12 @@
...
@@ -124,13 +124,12 @@
#define FERMI_COMPUTE_A 0x000090c0
#define FERMI_COMPUTE_A 0x000090c0
#define FERMI_COMPUTE_B 0x000091c0
#define FERMI_COMPUTE_B 0x000091c0
#define KEPLER_COMPUTE_A 0x0000a0c0
#define KEPLER_COMPUTE_A 0x0000a0c0
#define KEPLER_COMPUTE_B 0x0000a1c0
#define KEPLER_COMPUTE_B 0x0000a1c0
#define MAXWELL_COMPUTE_A 0x0000b0c0
#define MAXWELL_COMPUTE_A 0x0000b0c0
#define MAXWELL_COMPUTE_B 0x0000b1c0
#define MAXWELL_COMPUTE_B 0x0000b1c0
#define NV74_CIPHER 0x000074c1
/*******************************************************************************
/*******************************************************************************
* client
* client
...
...
drivers/gpu/drm/nouveau/nvkm/engine/cipher/g84.c
浏览文件 @
b3c98150
...
@@ -25,74 +25,47 @@
...
@@ -25,74 +25,47 @@
#include <engine/fifo.h>
#include <engine/fifo.h>
#include <core/client.h>
#include <core/client.h>
#include <core/engctx.h>
#include <core/enum.h>
#include <core/enum.h>
#include <core/gpuobj.h>
/*******************************************************************************
#include <nvif/class.h>
* Crypt object classes
******************************************************************************/
static
int
static
int
g84_cipher_object_ctor
(
struct
nvkm_object
*
parent
,
g84_cipher_oclass_bind
(
struct
nvkm_object
*
object
,
struct
nvkm_gpuobj
*
parent
,
struct
nvkm_object
*
engine
,
int
align
,
struct
nvkm_gpuobj
**
pgpuobj
)
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
{
{
struct
nvkm_gpuobj
*
obj
;
int
ret
=
nvkm_gpuobj_new
(
object
->
engine
->
subdev
.
device
,
16
,
int
ret
;
align
,
false
,
parent
,
pgpuobj
);
if
(
ret
==
0
)
{
ret
=
nvkm_gpuobj_create
(
parent
,
engine
,
oclass
,
0
,
parent
,
nvkm_kmap
(
*
pgpuobj
);
16
,
16
,
0
,
&
obj
);
nvkm_wo32
(
*
pgpuobj
,
0x00
,
object
->
oclass_name
);
*
pobject
=
nv_object
(
obj
);
nvkm_wo32
(
*
pgpuobj
,
0x04
,
0x00000000
);
if
(
ret
)
nvkm_wo32
(
*
pgpuobj
,
0x08
,
0x00000000
);
return
ret
;
nvkm_wo32
(
*
pgpuobj
,
0x0c
,
0x00000000
);
nvkm_done
(
*
pgpuobj
);
nvkm_kmap
(
obj
);
}
nvkm_wo32
(
obj
,
0x00
,
nv_mclass
(
obj
));
return
ret
;
nvkm_wo32
(
obj
,
0x04
,
0x00000000
);
nvkm_wo32
(
obj
,
0x08
,
0x00000000
);
nvkm_wo32
(
obj
,
0x0c
,
0x00000000
);
nvkm_done
(
obj
);
return
0
;
}
}
static
struct
nvkm_ofuncs
static
const
struct
nvkm_object_func
g84_cipher_ofuncs
=
{
g84_cipher_oclass_func
=
{
.
ctor
=
g84_cipher_object_ctor
,
.
bind
=
g84_cipher_oclass_bind
,
.
dtor
=
_nvkm_gpuobj_dtor
,
.
init
=
_nvkm_gpuobj_init
,
.
fini
=
_nvkm_gpuobj_fini
,
.
rd32
=
_nvkm_gpuobj_rd32
,
.
wr32
=
_nvkm_gpuobj_wr32
,
};
};
static
struct
nvkm_oclass
static
int
g84_cipher_sclass
[]
=
{
g84_cipher_cclass_bind
(
struct
nvkm_object
*
object
,
struct
nvkm_gpuobj
*
parent
,
{
0x74c1
,
&
g84_cipher_ofuncs
},
int
align
,
struct
nvkm_gpuobj
**
pgpuobj
)
{}
{
};
return
nvkm_gpuobj_new
(
object
->
engine
->
subdev
.
device
,
256
,
align
,
true
,
parent
,
pgpuobj
);
/*******************************************************************************
}
* PCIPHER context
******************************************************************************/
static
struct
nvkm_oclass
static
const
struct
nvkm_object_func
g84_cipher_cclass
=
{
g84_cipher_cclass
=
{
.
handle
=
NV_ENGCTX
(
CIPHER
,
0x84
),
.
bind
=
g84_cipher_cclass_bind
,
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_engctx_ctor
,
.
dtor
=
_nvkm_engctx_dtor
,
.
init
=
_nvkm_engctx_init
,
.
fini
=
_nvkm_engctx_fini
,
.
rd32
=
_nvkm_engctx_rd32
,
.
wr32
=
_nvkm_engctx_wr32
,
},
};
};
/*******************************************************************************
* PCIPHER engine/subdev functions
******************************************************************************/
static
const
struct
nvkm_bitfield
static
const
struct
nvkm_bitfield
g84_cipher_intr_mask
[]
=
{
g84_cipher_intr_mask
[]
=
{
{
0x00000001
,
"INVALID_STATE"
},
{
0x00000001
,
"INVALID_STATE"
},
...
@@ -132,6 +105,15 @@ g84_cipher_intr(struct nvkm_subdev *subdev)
...
@@ -132,6 +105,15 @@ g84_cipher_intr(struct nvkm_subdev *subdev)
nvkm_wr32
(
device
,
0x10200c
,
0x10
);
nvkm_wr32
(
device
,
0x10200c
,
0x10
);
}
}
static
const
struct
nvkm_engine_func
g84_cipher
=
{
.
cclass
=
&
g84_cipher_cclass
,
.
sclass
=
{
{
-
1
,
-
1
,
NV74_CIPHER
,
&
g84_cipher_oclass_func
},
{}
}
};
static
int
static
int
g84_cipher_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
g84_cipher_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
@@ -146,10 +128,9 @@ g84_cipher_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
...
@@ -146,10 +128,9 @@ g84_cipher_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
cipher
->
func
=
&
g84_cipher
,
nv_subdev
(
cipher
)
->
unit
=
0x00004000
;
nv_subdev
(
cipher
)
->
unit
=
0x00004000
;
nv_subdev
(
cipher
)
->
intr
=
g84_cipher_intr
;
nv_subdev
(
cipher
)
->
intr
=
g84_cipher_intr
;
nv_engine
(
cipher
)
->
cclass
=
&
g84_cipher_cclass
;
nv_engine
(
cipher
)
->
sclass
=
g84_cipher_sclass
;
return
0
;
return
0
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录