Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
c79a191b
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c79a191b
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/xtensa: convert user classes to new-style nvkm_object
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
9d498e0f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
63 addition
and
87 deletion
+63
-87
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+4
-0
drivers/gpu/drm/nouveau/include/nvkm/engine/bsp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/bsp.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/engine/vp.h
drivers/gpu/drm/nouveau/include/nvkm/engine/vp.h
+1
-1
drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h
drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h
+7
-6
drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
+8
-33
drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c
drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c
+8
-33
drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
+34
-13
未找到文件。
drivers/gpu/drm/nouveau/include/nvif/class.h
浏览文件 @
c79a191b
...
...
@@ -45,6 +45,8 @@
#define GM107_DISP 0x00009470
#define GM204_DISP 0x00009570
#define NV74_VP2 0x00007476
#define NV50_DISP_CURSOR 0x0000507a
#define G82_DISP_CURSOR 0x0000827a
#define GT214_DISP_CURSOR 0x0000857a
...
...
@@ -94,6 +96,8 @@
#define MAXWELL_A 0x0000b097
#define MAXWELL_B 0x0000b197
#define NV74_BSP 0x000074b0
#define GT212_MSVLD 0x000085b1
#define IGT21A_MSVLD 0x000086b1
#define G98_MSVLD 0x000088b1
...
...
drivers/gpu/drm/nouveau/include/nvkm/engine/bsp.h
浏览文件 @
c79a191b
#ifndef __NVKM_BSP_H__
#define __NVKM_BSP_H__
#include <
core/engine
.h>
#include <
engine/xtensa
.h>
extern
struct
nvkm_oclass
g84_bsp_oclass
;
#endif
drivers/gpu/drm/nouveau/include/nvkm/engine/vp.h
浏览文件 @
c79a191b
#ifndef __NVKM_VP_H__
#define __NVKM_VP_H__
#include <
core/engine
.h>
#include <
engine/xtensa
.h>
extern
struct
nvkm_oclass
g84_vp_oclass
;
#endif
drivers/gpu/drm/nouveau/include/nvkm/engine/xtensa.h
浏览文件 @
c79a191b
#ifndef __NVKM_XTENSA_H__
#define __NVKM_XTENSA_H__
#define nvkm_xtensa(p) container_of((p), struct nvkm_xtensa, engine)
#include <core/engine.h>
struct
nvkm_xtensa
{
struct
nvkm_engine
engine
;
const
struct
nvkm_xtensa_func
*
func
;
u32
addr
;
struct
nvkm_memory
*
gpu_fw
;
...
...
@@ -11,16 +13,15 @@ struct nvkm_xtensa {
u32
unkd28
;
};
struct
nvkm_xtensa_func
{
void
(
*
init
)(
struct
nvkm_xtensa
*
);
struct
nvkm_sclass
sclass
[];
};
#define nvkm_xtensa_create(p,e,c,b,d,i,f,r) \
nvkm_xtensa_create_((p), (e), (c), (b), (d), (i), (f), \
sizeof(**r),(void **)r)
int
_nvkm_xtensa_engctx_ctor
(
struct
nvkm_object
*
,
struct
nvkm_object
*
,
struct
nvkm_oclass
*
,
void
*
,
u32
,
struct
nvkm_object
**
);
void
_nvkm_xtensa_intr
(
struct
nvkm_subdev
*
);
int
nvkm_xtensa_create_
(
struct
nvkm_object
*
,
struct
nvkm_object
*
,
struct
nvkm_oclass
*
,
u32
,
bool
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/bsp/g84.c
浏览文件 @
c79a191b
...
...
@@ -22,41 +22,17 @@
* Authors: Ben Skeggs, Ilia Mirkin
*/
#include <engine/bsp.h>
#include <engine/xtensa.h>
#include <
core/engctx
.h>
#include <
nvif/class
.h>
/*******************************************************************************
* BSP object classes
******************************************************************************/
static
struct
nvkm_oclass
g84_bsp_sclass
[]
=
{
{
0x74b0
,
&
nvkm_object_ofuncs
},
{},
static
const
struct
nvkm_xtensa_func
g84_bsp_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
NV74_BSP
},
{}
}
};
/*******************************************************************************
* BSP context
******************************************************************************/
static
struct
nvkm_oclass
g84_bsp_cclass
=
{
.
handle
=
NV_ENGCTX
(
BSP
,
0x84
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_xtensa_engctx_ctor
,
.
dtor
=
_nvkm_engctx_dtor
,
.
init
=
_nvkm_engctx_init
,
.
fini
=
_nvkm_engctx_fini
,
.
rd32
=
_nvkm_engctx_rd32
,
.
wr32
=
_nvkm_engctx_wr32
,
},
};
/*******************************************************************************
* BSP engine/subdev functions
******************************************************************************/
static
int
g84_bsp_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -71,9 +47,8 @@ g84_bsp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
bsp
->
func
=
&
g84_bsp_func
;
nv_subdev
(
bsp
)
->
unit
=
0x04008000
;
nv_engine
(
bsp
)
->
cclass
=
&
g84_bsp_cclass
;
nv_engine
(
bsp
)
->
sclass
=
g84_bsp_sclass
;
bsp
->
fifo_val
=
0x1111
;
bsp
->
unkd28
=
0x90044
;
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/vp/g84.c
浏览文件 @
c79a191b
...
...
@@ -22,41 +22,17 @@
* Authors: Ben Skeggs, Ilia Mirkin
*/
#include <engine/vp.h>
#include <engine/xtensa.h>
#include <
core/engctx
.h>
#include <
nvif/class
.h>
/*******************************************************************************
* VP object classes
******************************************************************************/
static
struct
nvkm_oclass
g84_vp_sclass
[]
=
{
{
0x7476
,
&
nvkm_object_ofuncs
},
{},
static
const
struct
nvkm_xtensa_func
g84_vp_func
=
{
.
sclass
=
{
{
-
1
,
-
1
,
NV74_VP2
},
{}
}
};
/*******************************************************************************
* PVP context
******************************************************************************/
static
struct
nvkm_oclass
g84_vp_cclass
=
{
.
handle
=
NV_ENGCTX
(
VP
,
0x84
),
.
ofuncs
=
&
(
struct
nvkm_ofuncs
)
{
.
ctor
=
_nvkm_xtensa_engctx_ctor
,
.
dtor
=
_nvkm_engctx_dtor
,
.
init
=
_nvkm_engctx_init
,
.
fini
=
_nvkm_engctx_fini
,
.
rd32
=
_nvkm_engctx_rd32
,
.
wr32
=
_nvkm_engctx_wr32
,
},
};
/*******************************************************************************
* PVP engine/subdev functions
******************************************************************************/
static
int
g84_vp_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
...
...
@@ -71,9 +47,8 @@ g84_vp_ctor(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
vp
->
func
=
&
g84_vp_func
;
nv_subdev
(
vp
)
->
unit
=
0x01020000
;
nv_engine
(
vp
)
->
cclass
=
&
g84_vp_cclass
;
nv_engine
(
vp
)
->
sclass
=
g84_vp_sclass
;
vp
->
fifo_val
=
0x111
;
vp
->
unkd28
=
0x9c544
;
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/xtensa.c
浏览文件 @
c79a191b
...
...
@@ -20,23 +20,37 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include <engine/xtensa.h>
#include <engine/fifo.h>
#include <core/engctx.h>
int
_nvkm_xtensa_engctx_ctor
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nvkm_object
**
pobject
)
static
int
nvkm_xtensa_oclass_get
(
struct
nvkm_oclass
*
oclass
,
int
index
)
{
struct
nvkm_engctx
*
engctx
;
int
ret
;
struct
nvkm_xtensa
*
xtensa
=
nvkm_xtensa
(
oclass
->
engine
);
int
c
=
0
;
while
(
xtensa
->
func
->
sclass
[
c
].
oclass
)
{
if
(
c
++
==
index
)
{
oclass
->
base
=
xtensa
->
func
->
sclass
[
index
];
return
index
;
}
}
ret
=
nvkm_engctx_create
(
parent
,
engine
,
oclass
,
NULL
,
0x10000
,
0x1000
,
NVOBJ_FLAG_ZERO_ALLOC
,
&
engctx
);
*
pobject
=
nv_object
(
engctx
);
return
ret
;
return
c
;
}
static
int
nvkm_xtensa_cclass_bind
(
struct
nvkm_object
*
object
,
struct
nvkm_gpuobj
*
parent
,
int
align
,
struct
nvkm_gpuobj
**
pgpuobj
)
{
return
nvkm_gpuobj_new
(
object
->
engine
->
subdev
.
device
,
0x10000
,
align
,
true
,
parent
,
pgpuobj
);
}
static
const
struct
nvkm_object_func
nvkm_xtensa_cclass
=
{
.
bind
=
nvkm_xtensa_cclass_bind
,
};
void
_nvkm_xtensa_intr
(
struct
nvkm_subdev
*
subdev
)
{
...
...
@@ -58,6 +72,12 @@ _nvkm_xtensa_intr(struct nvkm_subdev *subdev)
}
}
static
const
struct
nvkm_engine_func
nvkm_xtensa
=
{
.
fifo
.
sclass
=
nvkm_xtensa_oclass_get
,
.
cclass
=
&
nvkm_xtensa_cclass
,
};
int
nvkm_xtensa_create_
(
struct
nvkm_object
*
parent
,
struct
nvkm_object
*
engine
,
struct
nvkm_oclass
*
oclass
,
u32
addr
,
bool
enable
,
...
...
@@ -73,7 +93,8 @@ nvkm_xtensa_create_(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
return
ret
;
nv_subdev
(
xtensa
)
->
intr
=
_nvkm_xtensa_intr
;
xtensa
->
engine
.
subdev
.
intr
=
_nvkm_xtensa_intr
;
xtensa
->
engine
.
func
=
&
nvkm_xtensa
;
xtensa
->
addr
=
addr
;
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录