Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
307b9c02
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
307b9c02
编写于
5月 03, 2013
作者:
D
Dave Airlie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qxl: update to new idr interfaces.
Signed-off-by:
N
Dave Airlie
<
airlied@redhat.com
>
上级
d2dbaaf6
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
24 deletion
+16
-24
drivers/gpu/drm/qxl/qxl_cmd.c
drivers/gpu/drm/qxl/qxl_cmd.c
+7
-12
drivers/gpu/drm/qxl/qxl_release.c
drivers/gpu/drm/qxl/qxl_release.c
+9
-12
未找到文件。
drivers/gpu/drm/qxl/qxl_cmd.c
浏览文件 @
307b9c02
...
...
@@ -435,22 +435,18 @@ void qxl_io_monitors_config(struct qxl_device *qdev)
int
qxl_surface_id_alloc
(
struct
qxl_device
*
qdev
,
struct
qxl_bo
*
surf
)
{
uint32_t
handle
=
-
ENOMEM
;
uint32_t
handle
;
int
idr_ret
;
int
count
=
0
;
again:
if
(
idr_pre_get
(
&
qdev
->
surf_id_idr
,
GFP_ATOMIC
)
==
0
)
{
DRM_ERROR
(
"Out of memory for surf idr
\n
"
);
kfree
(
surf
);
goto
alloc_fail
;
}
idr_preload
(
GFP_ATOMIC
);
spin_lock
(
&
qdev
->
surf_id_idr_lock
);
idr_ret
=
idr_
get_new_above
(
&
qdev
->
surf_id_idr
,
NULL
,
1
,
&
handle
);
idr_ret
=
idr_
alloc
(
&
qdev
->
surf_id_idr
,
NULL
,
1
,
0
,
GFP_NOWAIT
);
spin_unlock
(
&
qdev
->
surf_id_idr_lock
);
if
(
idr_ret
==
-
EAGAIN
)
goto
again
;
idr_preload_end
();
if
(
idr_ret
<
0
)
return
idr_ret
;
handle
=
idr_ret
;
if
(
handle
>=
qdev
->
rom
->
n_surfaces
)
{
count
++
;
...
...
@@ -465,7 +461,6 @@ int qxl_surface_id_alloc(struct qxl_device *qdev,
spin_lock
(
&
qdev
->
surf_id_idr_lock
);
qdev
->
last_alloced_surf_id
=
handle
;
spin_unlock
(
&
qdev
->
surf_id_idr_lock
);
alloc_fail:
return
0
;
}
...
...
drivers/gpu/drm/qxl/qxl_release.c
浏览文件 @
307b9c02
...
...
@@ -43,7 +43,7 @@ qxl_release_alloc(struct qxl_device *qdev, int type,
struct
qxl_release
**
ret
)
{
struct
qxl_release
*
release
;
int
handle
=
0
;
int
handle
;
size_t
size
=
sizeof
(
*
release
);
int
idr_ret
;
...
...
@@ -56,19 +56,16 @@ qxl_release_alloc(struct qxl_device *qdev, int type,
release
->
bo_count
=
0
;
release
->
release_offset
=
0
;
release
->
surface_release_id
=
0
;
again:
if
(
idr_pre_get
(
&
qdev
->
release_idr
,
GFP_KERNEL
)
==
0
)
{
DRM_ERROR
(
"Out of memory for release idr
\n
"
);
kfree
(
release
);
goto
release_fail
;
}
idr_preload
(
GFP_KERNEL
);
spin_lock
(
&
qdev
->
release_idr_lock
);
idr_ret
=
idr_
get_new_above
(
&
qdev
->
release_idr
,
release
,
1
,
&
handle
);
idr_ret
=
idr_
alloc
(
&
qdev
->
release_idr
,
release
,
1
,
0
,
GFP_NOWAIT
);
spin_unlock
(
&
qdev
->
release_idr_lock
);
if
(
idr_ret
==
-
EAGAIN
)
goto
again
;
if
(
ret
)
*
ret
=
release
;
idr_preload_end
();
handle
=
idr_ret
;
if
(
idr_ret
<
0
)
goto
release_fail
;
*
ret
=
release
;
QXL_INFO
(
qdev
,
"allocated release %lld
\n
"
,
handle
);
release
->
id
=
handle
;
release_fail:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录