Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
7589563e
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看板
提交
7589563e
编写于
10月 03, 2013
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nv50-/sw: share engine/channel constructor between implementations
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
c46c3ddf
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
37 addition
and
51 deletion
+37
-51
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
+13
-8
drivers/gpu/drm/nouveau/core/engine/software/nv50.h
drivers/gpu/drm/nouveau/core/engine/software/nv50.h
+16
-0
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
+8
-43
未找到文件。
drivers/gpu/drm/nouveau/core/engine/software/nv50.c
浏览文件 @
7589563e
...
...
@@ -147,12 +147,13 @@ nv50_software_vblsem_release(struct nouveau_eventh *event, int head)
return
NVKM_EVENT_DROP
;
}
static
int
int
nv50_software_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv50_software_cclass
*
pclass
=
(
void
*
)
oclass
;
struct
nv50_software_chan
*
chan
;
int
ret
;
...
...
@@ -162,30 +163,32 @@ nv50_software_context_ctor(struct nouveau_object *parent,
return
ret
;
chan
->
vblank
.
channel
=
nv_gpuobj
(
parent
->
parent
)
->
addr
>>
12
;
chan
->
vblank
.
event
.
func
=
nv50_software_vblsem_release
;
chan
->
vblank
.
event
.
func
=
pclass
->
vblank
;
return
0
;
}
static
struct
n
ouveau_o
class
static
struct
n
v50_software_c
class
nv50_software_cclass
=
{
.
handle
=
NV_ENGCTX
(
SW
,
0x50
),
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
base
.
handle
=
NV_ENGCTX
(
SW
,
0x50
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv50_software_context_ctor
,
.
dtor
=
_nouveau_software_context_dtor
,
.
init
=
_nouveau_software_context_init
,
.
fini
=
_nouveau_software_context_fini
,
},
.
vblank
=
nv50_software_vblsem_release
,
};
/*******************************************************************************
* software engine/subdev functions
******************************************************************************/
static
int
int
nv50_software_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv50_software_oclass
*
pclass
=
(
void
*
)
oclass
;
struct
nv50_software_priv
*
priv
;
int
ret
;
...
...
@@ -194,8 +197,8 @@ nv50_software_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if
(
ret
)
return
ret
;
nv_engine
(
priv
)
->
cclass
=
&
nv50_software_
cclass
;
nv_engine
(
priv
)
->
sclass
=
nv50_software_
sclass
;
nv_engine
(
priv
)
->
cclass
=
pclass
->
cclass
;
nv_engine
(
priv
)
->
sclass
=
pclass
->
sclass
;
nv_subdev
(
priv
)
->
intr
=
nv04_software_intr
;
return
0
;
}
...
...
@@ -209,4 +212,6 @@ nv50_software_oclass = &(struct nv50_software_oclass) {
.
init
=
_nouveau_software_init
,
.
fini
=
_nouveau_software_fini
,
},
.
cclass
=
&
nv50_software_cclass
.
base
,
.
sclass
=
nv50_software_sclass
,
}.
base
;
drivers/gpu/drm/nouveau/core/engine/software/nv50.h
浏览文件 @
7589563e
...
...
@@ -5,12 +5,23 @@
struct
nv50_software_oclass
{
struct
nouveau_oclass
base
;
struct
nouveau_oclass
*
cclass
;
struct
nouveau_oclass
*
sclass
;
};
struct
nv50_software_priv
{
struct
nouveau_software
base
;
};
int
nv50_software_ctor
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
struct
nouveau_oclass
*
,
void
*
,
u32
,
struct
nouveau_object
**
);
struct
nv50_software_cclass
{
struct
nouveau_oclass
base
;
int
(
*
vblank
)(
struct
nouveau_eventh
*
,
int
);
};
struct
nv50_software_chan
{
struct
nouveau_software_chan
base
;
struct
{
...
...
@@ -22,4 +33,9 @@ struct nv50_software_chan {
}
vblank
;
};
int
nv50_software_context_ctor
(
struct
nouveau_object
*
,
struct
nouveau_object
*
,
struct
nouveau_oclass
*
,
void
*
,
u32
,
struct
nouveau_object
**
);
#endif
drivers/gpu/drm/nouveau/core/engine/software/nvc0.c
浏览文件 @
7589563e
...
...
@@ -154,66 +154,31 @@ nvc0_software_vblsem_release(struct nouveau_eventh *event, int head)
return
NVKM_EVENT_DROP
;
}
static
int
nvc0_software_context_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv50_software_chan
*
chan
;
int
ret
;
ret
=
nouveau_software_context_create
(
parent
,
engine
,
oclass
,
&
chan
);
*
pobject
=
nv_object
(
chan
);
if
(
ret
)
return
ret
;
chan
->
vblank
.
channel
=
nv_gpuobj
(
parent
->
parent
)
->
addr
>>
12
;
chan
->
vblank
.
event
.
func
=
nvc0_software_vblsem_release
;
return
0
;
}
static
struct
nouveau_oclass
static
struct
nv50_software_cclass
nvc0_software_cclass
=
{
.
handle
=
NV_ENGCTX
(
SW
,
0xc0
),
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
c
0_software_context_ctor
,
.
base
.
handle
=
NV_ENGCTX
(
SW
,
0xc0
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
5
0_software_context_ctor
,
.
dtor
=
_nouveau_software_context_dtor
,
.
init
=
_nouveau_software_context_init
,
.
fini
=
_nouveau_software_context_fini
,
},
.
vblank
=
nvc0_software_vblsem_release
,
};
/*******************************************************************************
* software engine/subdev functions
******************************************************************************/
static
int
nvc0_software_ctor
(
struct
nouveau_object
*
parent
,
struct
nouveau_object
*
engine
,
struct
nouveau_oclass
*
oclass
,
void
*
data
,
u32
size
,
struct
nouveau_object
**
pobject
)
{
struct
nv50_software_priv
*
priv
;
int
ret
;
ret
=
nouveau_software_create
(
parent
,
engine
,
oclass
,
&
priv
);
*
pobject
=
nv_object
(
priv
);
if
(
ret
)
return
ret
;
nv_engine
(
priv
)
->
cclass
=
&
nvc0_software_cclass
;
nv_engine
(
priv
)
->
sclass
=
nvc0_software_sclass
;
nv_subdev
(
priv
)
->
intr
=
nv04_software_intr
;
return
0
;
}
struct
nouveau_oclass
*
nvc0_software_oclass
=
&
(
struct
nv50_software_oclass
)
{
.
base
.
handle
=
NV_ENGINE
(
SW
,
0xc0
),
.
base
.
ofuncs
=
&
(
struct
nouveau_ofuncs
)
{
.
ctor
=
nv
c
0_software_ctor
,
.
ctor
=
nv
5
0_software_ctor
,
.
dtor
=
_nouveau_software_dtor
,
.
init
=
_nouveau_software_init
,
.
fini
=
_nouveau_software_fini
,
},
.
cclass
=
&
nvc0_software_cclass
.
base
,
.
sclass
=
nvc0_software_sclass
,
}.
base
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录