Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
102b49da
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看板
提交
102b49da
编写于
8月 20, 2015
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/parent: remove some (now) unnecessary special-case handling
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
493f189d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
49 deletion
+14
-49
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
+1
-7
drivers/gpu/drm/nouveau/nvkm/core/parent.c
drivers/gpu/drm/nouveau/nvkm/core/parent.c
+13
-42
未找到文件。
drivers/gpu/drm/nouveau/include/nvkm/core/parent.h
浏览文件 @
102b49da
...
@@ -2,16 +2,10 @@
...
@@ -2,16 +2,10 @@
#define __NVKM_PARENT_H__
#define __NVKM_PARENT_H__
#include <core/object.h>
#include <core/object.h>
struct
nvkm_sclass
{
struct
nvkm_sclass
*
sclass
;
struct
nvkm_engine
*
engine
;
struct
nvkm_oclass
*
oclass
;
};
struct
nvkm_parent
{
struct
nvkm_parent
{
struct
nvkm_object
object
;
struct
nvkm_object
object
;
struct
nvkm_
s
class
*
sclass
;
struct
nvkm_
o
class
*
sclass
;
u64
engine
;
u64
engine
;
int
(
*
context_attach
)(
struct
nvkm_object
*
,
struct
nvkm_object
*
);
int
(
*
context_attach
)(
struct
nvkm_object
*
,
struct
nvkm_object
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/core/parent.c
浏览文件 @
102b49da
...
@@ -30,35 +30,27 @@ nvkm_parent_sclass(struct nvkm_object *parent, u16 handle,
...
@@ -30,35 +30,27 @@ nvkm_parent_sclass(struct nvkm_object *parent, u16 handle,
struct
nvkm_object
**
pengine
,
struct
nvkm_object
**
pengine
,
struct
nvkm_oclass
**
poclass
)
struct
nvkm_oclass
**
poclass
)
{
{
struct
nvkm_
sclass
*
s
class
;
struct
nvkm_
oclass
*
sclass
,
*
o
class
;
struct
nvkm_engine
*
engine
;
struct
nvkm_engine
*
engine
;
struct
nvkm_oclass
*
oclass
;
u64
mask
;
u64
mask
;
int
i
;
sclass
=
nv_parent
(
parent
)
->
sclass
;
sclass
=
nv_parent
(
parent
)
->
sclass
;
while
(
sclas
s
)
{
while
(
(
oclass
=
sclass
++
)
&&
oclass
->
ofunc
s
)
{
if
(
(
sclass
->
oclass
->
handle
&
0xffff
)
==
handle
)
{
if
(
oclass
->
handle
==
handle
)
{
*
pengine
=
&
parent
->
engine
->
subdev
.
object
;
*
pengine
=
&
parent
->
engine
->
subdev
.
object
;
*
poclass
=
sclass
->
oclass
;
*
poclass
=
oclass
;
return
0
;
return
0
;
}
}
sclass
=
sclass
->
sclass
;
}
}
mask
=
nv_parent
(
parent
)
->
engine
;
mask
=
nv_parent
(
parent
)
->
engine
;
while
(
mask
)
{
while
(
i
=
__ffs64
(
mask
),
mask
)
{
int
i
=
__ffs64
(
mask
);
engine
=
nvkm_engine
(
parent
,
i
);
if
(
nv_iclass
(
parent
,
NV_CLIENT_CLASS
))
engine
=
nv_engine
(
nv_client
(
parent
)
->
device
);
else
engine
=
nvkm_engine
(
parent
,
i
);
if
(
engine
)
{
if
(
engine
)
{
oclass
=
engine
->
sclass
;
oclass
=
engine
->
sclass
;
while
(
oclass
->
ofuncs
)
{
while
(
oclass
->
ofuncs
)
{
if
(
(
oclass
->
handle
&
0xffff
)
==
handle
)
{
if
(
oclass
->
handle
==
handle
)
{
*
pengine
=
nv_object
(
engine
);
*
pengine
=
nv_object
(
engine
);
*
poclass
=
oclass
;
*
poclass
=
oclass
;
return
0
;
return
0
;
...
@@ -76,17 +68,15 @@ nvkm_parent_sclass(struct nvkm_object *parent, u16 handle,
...
@@ -76,17 +68,15 @@ nvkm_parent_sclass(struct nvkm_object *parent, u16 handle,
int
int
nvkm_parent_lclass
(
struct
nvkm_object
*
parent
,
u32
*
lclass
,
int
size
)
nvkm_parent_lclass
(
struct
nvkm_object
*
parent
,
u32
*
lclass
,
int
size
)
{
{
struct
nvkm_
sclass
*
s
class
;
struct
nvkm_
oclass
*
sclass
,
*
o
class
;
struct
nvkm_engine
*
engine
;
struct
nvkm_engine
*
engine
;
struct
nvkm_oclass
*
oclass
;
int
nr
=
-
1
,
i
;
int
nr
=
-
1
,
i
;
u64
mask
;
u64
mask
;
sclass
=
nv_parent
(
parent
)
->
sclass
;
sclass
=
nv_parent
(
parent
)
->
sclass
;
while
(
sclas
s
)
{
while
(
(
oclass
=
sclass
++
)
&&
oclass
->
ofunc
s
)
{
if
(
++
nr
<
size
)
if
(
++
nr
<
size
)
lclass
[
nr
]
=
sclass
->
oclass
->
handle
&
0xffff
;
lclass
[
nr
]
=
oclass
->
handle
;
sclass
=
sclass
->
sclass
;
}
}
mask
=
nv_parent
(
parent
)
->
engine
;
mask
=
nv_parent
(
parent
)
->
engine
;
...
@@ -95,7 +85,7 @@ nvkm_parent_lclass(struct nvkm_object *parent, u32 *lclass, int size)
...
@@ -95,7 +85,7 @@ nvkm_parent_lclass(struct nvkm_object *parent, u32 *lclass, int size)
if
(
engine
&&
(
oclass
=
engine
->
sclass
))
{
if
(
engine
&&
(
oclass
=
engine
->
sclass
))
{
while
(
oclass
->
ofuncs
)
{
while
(
oclass
->
ofuncs
)
{
if
(
++
nr
<
size
)
if
(
++
nr
<
size
)
lclass
[
nr
]
=
oclass
->
handle
&
0xffff
;
lclass
[
nr
]
=
oclass
->
handle
;
oclass
++
;
oclass
++
;
}
}
}
}
...
@@ -113,7 +103,6 @@ nvkm_parent_create_(struct nvkm_object *parent, struct nvkm_object *engine,
...
@@ -113,7 +103,6 @@ nvkm_parent_create_(struct nvkm_object *parent, struct nvkm_object *engine,
int
size
,
void
**
pobject
)
int
size
,
void
**
pobject
)
{
{
struct
nvkm_parent
*
object
;
struct
nvkm_parent
*
object
;
struct
nvkm_sclass
*
nclass
;
int
ret
;
int
ret
;
ret
=
nvkm_object_create_
(
parent
,
engine
,
oclass
,
pclass
|
ret
=
nvkm_object_create_
(
parent
,
engine
,
oclass
,
pclass
|
...
@@ -122,18 +111,7 @@ nvkm_parent_create_(struct nvkm_object *parent, struct nvkm_object *engine,
...
@@ -122,18 +111,7 @@ nvkm_parent_create_(struct nvkm_object *parent, struct nvkm_object *engine,
if
(
ret
)
if
(
ret
)
return
ret
;
return
ret
;
while
(
sclass
&&
sclass
->
ofuncs
)
{
object
->
sclass
=
sclass
;
nclass
=
kzalloc
(
sizeof
(
*
nclass
),
GFP_KERNEL
);
if
(
!
nclass
)
return
-
ENOMEM
;
nclass
->
sclass
=
object
->
sclass
;
object
->
sclass
=
nclass
;
nclass
->
engine
=
engine
?
nv_engine
(
engine
)
:
NULL
;
nclass
->
oclass
=
sclass
;
sclass
++
;
}
object
->
engine
=
engcls
;
object
->
engine
=
engcls
;
return
0
;
return
0
;
}
}
...
@@ -141,13 +119,6 @@ nvkm_parent_create_(struct nvkm_object *parent, struct nvkm_object *engine,
...
@@ -141,13 +119,6 @@ nvkm_parent_create_(struct nvkm_object *parent, struct nvkm_object *engine,
void
void
nvkm_parent_destroy
(
struct
nvkm_parent
*
parent
)
nvkm_parent_destroy
(
struct
nvkm_parent
*
parent
)
{
{
struct
nvkm_sclass
*
sclass
;
while
((
sclass
=
parent
->
sclass
))
{
parent
->
sclass
=
sclass
->
sclass
;
kfree
(
sclass
);
}
nvkm_object_destroy
(
&
parent
->
object
);
nvkm_object_destroy
(
&
parent
->
object
);
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录