Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
7e0f992b
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7e0f992b
编写于
10月 10, 2012
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau: replace some open-coded mm_initialised checks
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
6d338081
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
18 addition
and
13 deletion
+18
-13
drivers/gpu/drm/nouveau/core/core/mm.c
drivers/gpu/drm/nouveau/core/core/mm.c
+10
-7
drivers/gpu/drm/nouveau/core/include/core/mm.h
drivers/gpu/drm/nouveau/core/include/core/mm.h
+6
-0
drivers/gpu/drm/nouveau/core/subdev/fb/base.c
drivers/gpu/drm/nouveau/core/subdev/fb/base.c
+2
-6
未找到文件。
drivers/gpu/drm/nouveau/core/core/mm.c
浏览文件 @
7e0f992b
...
...
@@ -234,15 +234,18 @@ nouveau_mm_init(struct nouveau_mm *mm, u32 offset, u32 length, u32 block)
int
nouveau_mm_fini
(
struct
nouveau_mm
*
mm
)
{
struct
nouveau_mm_node
*
node
,
*
heap
=
list_first_entry
(
&
mm
->
nodes
,
struct
nouveau_mm_node
,
nl_entry
);
int
nodes
=
0
;
if
(
nouveau_mm_initialised
(
mm
))
{
struct
nouveau_mm_node
*
node
,
*
heap
=
list_first_entry
(
&
mm
->
nodes
,
typeof
(
*
heap
),
nl_entry
);
int
nodes
=
0
;
list_for_each_entry
(
node
,
&
mm
->
nodes
,
nl_entry
)
{
if
(
WARN_ON
(
nodes
++
==
mm
->
heap_nodes
))
return
-
EBUSY
;
}
list_for_each_entry
(
node
,
&
mm
->
nodes
,
nl_entry
)
{
if
(
WARN_ON
(
nodes
++
==
mm
->
heap_nodes
))
return
-
EBUSY
;
kfree
(
heap
);
}
kfree
(
heap
);
return
0
;
}
drivers/gpu/drm/nouveau/core/include/core/mm.h
浏览文件 @
7e0f992b
...
...
@@ -21,6 +21,12 @@ struct nouveau_mm {
int
heap_nodes
;
};
static
inline
bool
nouveau_mm_initialised
(
struct
nouveau_mm
*
mm
)
{
return
mm
->
block_size
!=
0
;
}
int
nouveau_mm_init
(
struct
nouveau_mm
*
,
u32
offset
,
u32
length
,
u32
block
);
int
nouveau_mm_fini
(
struct
nouveau_mm
*
);
int
nouveau_mm_head
(
struct
nouveau_mm
*
,
u8
type
,
u32
size_max
,
u32
size_min
,
...
...
drivers/gpu/drm/nouveau/core/subdev/fb/base.c
浏览文件 @
7e0f992b
...
...
@@ -85,12 +85,8 @@ nouveau_fb_destroy(struct nouveau_fb *pfb)
for
(
i
=
0
;
i
<
pfb
->
tile
.
regions
;
i
++
)
pfb
->
tile
.
fini
(
pfb
,
i
,
&
pfb
->
tile
.
region
[
i
]);
if
(
pfb
->
tags
.
block_size
)
nouveau_mm_fini
(
&
pfb
->
tags
);
if
(
pfb
->
vram
.
block_size
)
nouveau_mm_fini
(
&
pfb
->
vram
);
nouveau_mm_fini
(
&
pfb
->
tags
);
nouveau_mm_fini
(
&
pfb
->
vram
);
nouveau_subdev_destroy
(
&
pfb
->
base
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录