Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
472db7ab
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看板
提交
472db7ab
编写于
5月 14, 2014
作者:
M
Maarten Lankhorst
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/ttm: use rcu in core ttm
Signed-off-by:
N
Maarten Lankhorst
<
maarten.lankhorst@canonical.com
>
上级
5fbad992
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
63 deletion
+13
-63
drivers/gpu/drm/ttm/ttm_bo.c
drivers/gpu/drm/ttm/ttm_bo.c
+13
-63
未找到文件。
drivers/gpu/drm/ttm/ttm_bo.c
浏览文件 @
472db7ab
...
...
@@ -467,66 +467,6 @@ static void ttm_bo_cleanup_refs_or_queue(struct ttm_buffer_object *bo)
((
HZ
/
100
)
<
1
)
?
1
:
HZ
/
100
);
}
static
int
ttm_bo_unreserve_and_wait
(
struct
ttm_buffer_object
*
bo
,
bool
interruptible
)
{
struct
ttm_bo_global
*
glob
=
bo
->
glob
;
struct
reservation_object_list
*
fobj
;
struct
fence
*
excl
=
NULL
;
struct
fence
**
shared
=
NULL
;
u32
shared_count
=
0
,
i
;
int
ret
=
0
;
fobj
=
reservation_object_get_list
(
bo
->
resv
);
if
(
fobj
&&
fobj
->
shared_count
)
{
shared
=
kmalloc
(
sizeof
(
*
shared
)
*
fobj
->
shared_count
,
GFP_KERNEL
);
if
(
!
shared
)
{
ret
=
-
ENOMEM
;
__ttm_bo_unreserve
(
bo
);
spin_unlock
(
&
glob
->
lru_lock
);
return
ret
;
}
for
(
i
=
0
;
i
<
fobj
->
shared_count
;
++
i
)
{
if
(
!
fence_is_signaled
(
fobj
->
shared
[
i
]))
{
fence_get
(
fobj
->
shared
[
i
]);
shared
[
shared_count
++
]
=
fobj
->
shared
[
i
];
}
}
if
(
!
shared_count
)
{
kfree
(
shared
);
shared
=
NULL
;
}
}
excl
=
reservation_object_get_excl
(
bo
->
resv
);
if
(
excl
&&
!
fence_is_signaled
(
excl
))
fence_get
(
excl
);
else
excl
=
NULL
;
__ttm_bo_unreserve
(
bo
);
spin_unlock
(
&
glob
->
lru_lock
);
if
(
excl
)
{
ret
=
fence_wait
(
excl
,
interruptible
);
fence_put
(
excl
);
}
if
(
shared_count
>
0
)
{
for
(
i
=
0
;
i
<
shared_count
;
++
i
)
{
if
(
!
ret
)
ret
=
fence_wait
(
shared
[
i
],
interruptible
);
fence_put
(
shared
[
i
]);
}
kfree
(
shared
);
}
return
ret
;
}
/**
* function ttm_bo_cleanup_refs_and_unlock
* If bo idle, remove from delayed- and lru lists, and unref.
...
...
@@ -550,9 +490,19 @@ static int ttm_bo_cleanup_refs_and_unlock(struct ttm_buffer_object *bo,
ret
=
ttm_bo_wait
(
bo
,
false
,
false
,
true
);
if
(
ret
&&
!
no_wait_gpu
)
{
ret
=
ttm_bo_unreserve_and_wait
(
bo
,
interruptible
);
if
(
ret
)
return
ret
;
long
lret
;
ww_mutex_unlock
(
&
bo
->
resv
->
lock
);
spin_unlock
(
&
glob
->
lru_lock
);
lret
=
reservation_object_wait_timeout_rcu
(
bo
->
resv
,
true
,
interruptible
,
30
*
HZ
);
if
(
lret
<
0
)
return
lret
;
else
if
(
lret
==
0
)
return
-
EBUSY
;
spin_lock
(
&
glob
->
lru_lock
);
ret
=
__ttm_bo_reserve
(
bo
,
false
,
true
,
false
,
NULL
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录