Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
4cd09459
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看板
提交
4cd09459
编写于
6月 16, 2016
作者:
R
Rob Clark
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/msm: submit support for out-fences
Signed-off-by:
N
Rob Clark
<
robdclark@gmail.com
>
上级
f44d32c7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
28 addition
and
1 deletion
+28
-1
drivers/gpu/drm/msm/msm_gem_submit.c
drivers/gpu/drm/msm/msm_gem_submit.c
+25
-0
include/uapi/drm/msm_drm.h
include/uapi/drm/msm_drm.h
+3
-1
未找到文件。
drivers/gpu/drm/msm/msm_gem_submit.c
浏览文件 @
4cd09459
...
...
@@ -364,6 +364,8 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
struct
msm_gem_submit
*
submit
;
struct
msm_gpu
*
gpu
=
priv
->
gpu
;
struct
fence
*
in_fence
=
NULL
;
struct
sync_file
*
sync_file
=
NULL
;
int
out_fence_fd
=
-
1
;
unsigned
i
;
int
ret
;
...
...
@@ -383,6 +385,14 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
if
(
ret
)
return
ret
;
if
(
args
->
flags
&
MSM_SUBMIT_FENCE_FD_OUT
)
{
out_fence_fd
=
get_unused_fd_flags
(
O_CLOEXEC
);
if
(
out_fence_fd
<
0
)
{
ret
=
out_fence_fd
;
goto
out_unlock
;
}
}
submit
=
submit_create
(
dev
,
gpu
,
args
->
nr_bos
,
args
->
nr_cmds
);
if
(
!
submit
)
{
ret
=
-
ENOMEM
;
...
...
@@ -495,10 +505,23 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
goto
out
;
}
if
(
args
->
flags
&
MSM_SUBMIT_FENCE_FD_OUT
)
{
sync_file
=
sync_file_create
(
submit
->
fence
);
if
(
!
sync_file
)
{
ret
=
-
ENOMEM
;
goto
out
;
}
}
msm_gpu_submit
(
gpu
,
submit
,
ctx
);
args
->
fence
=
submit
->
fence
->
seqno
;
if
(
args
->
flags
&
MSM_SUBMIT_FENCE_FD_OUT
)
{
fd_install
(
out_fence_fd
,
sync_file
->
file
);
args
->
fence_fd
=
out_fence_fd
;
}
out:
if
(
in_fence
)
fence_put
(
in_fence
);
...
...
@@ -506,6 +529,8 @@ int msm_ioctl_gem_submit(struct drm_device *dev, void *data,
if
(
ret
)
msm_gem_submit_free
(
submit
);
out_unlock:
if
(
ret
&&
(
out_fence_fd
>=
0
))
put_unused_fd
(
out_fence_fd
);
mutex_unlock
(
&
dev
->
struct_mutex
);
return
ret
;
}
include/uapi/drm/msm_drm.h
浏览文件 @
4cd09459
...
...
@@ -187,9 +187,11 @@ struct drm_msm_gem_submit_bo {
/* Valid submit ioctl flags: */
#define MSM_SUBMIT_NO_IMPLICIT 0x80000000
/* disable implicit sync */
#define MSM_SUBMIT_FENCE_FD_IN 0x40000000
/* enable input fence_fd */
#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000
/* enable output fence_fd */
#define MSM_SUBMIT_FLAGS ( \
MSM_SUBMIT_NO_IMPLICIT | \
MSM_SUBMIT_FENCE_FD_IN | \
MSM_SUBMIT_FENCE_FD_OUT | \
0)
/* Each cmdstream submit consists of a table of buffers involved, and
...
...
@@ -203,7 +205,7 @@ struct drm_msm_gem_submit {
__u32
nr_cmds
;
/* in, number of submit_cmd's */
__u64
__user
bos
;
/* in, ptr to array of submit_bo's */
__u64
__user
cmds
;
/* in, ptr to array of submit_cmd's */
__s32
fence_fd
;
/* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN) */
__s32
fence_fd
;
/* in/out fence fd (see MSM_SUBMIT_FENCE_FD_IN
/OUT
) */
};
/* The normal way to synchronize with the GPU is just to CPU_PREP on
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录