Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a15d8f58
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看板
提交
a15d8f58
编写于
1月 15, 2020
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/flcn/qmgr: rename remaining nvkm_msgqueue bits to nvkm_falcon_qmgr
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
8e90a98d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
32 addition
and
30 deletion
+32
-30
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
+2
-2
drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
+19
-19
drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.h
drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.h
+10
-8
未找到文件。
drivers/gpu/drm/nouveau/nvkm/falcon/cmdq.c
浏览文件 @
a15d8f58
...
...
@@ -152,7 +152,7 @@ nvkm_msgqueue_post(struct nvkm_msgqueue *priv, enum msgqueue_msg_priority prio,
struct
nvkm_msgqueue_hdr
*
cmd
,
nvkm_falcon_qmgr_callback
cb
,
struct
completion
*
completion
,
bool
wait_init
)
{
struct
nvkm_
msgqueue
_seq
*
seq
;
struct
nvkm_
falcon_qmgr
_seq
*
seq
;
struct
nvkm_msgqueue_queue
*
queue
;
int
ret
;
...
...
drivers/gpu/drm/nouveau/nvkm/falcon/msgq.c
浏览文件 @
a15d8f58
...
...
@@ -139,9 +139,9 @@ msgqueue_msg_handle(struct nvkm_msgqueue *priv,
struct
nv_falcon_msg
*
hdr
)
{
const
struct
nvkm_subdev
*
subdev
=
priv
->
falcon
->
owner
;
struct
nvkm_
msgqueue
_seq
*
seq
;
struct
nvkm_
falcon_qmgr
_seq
*
seq
;
seq
=
&
msgq
->
qmgr
->
seq
[
hdr
->
seq_id
];
seq
=
&
msgq
->
qmgr
->
seq
.
id
[
hdr
->
seq_id
];
if
(
seq
->
state
!=
SEQ_STATE_USED
&&
seq
->
state
!=
SEQ_STATE_CANCELLED
)
{
nvkm_error
(
subdev
,
"msg for unknown sequence %d"
,
seq
->
id
);
return
-
EINVAL
;
...
...
drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.c
浏览文件 @
a15d8f58
...
...
@@ -22,38 +22,38 @@
*/
#include "qmgr.h"
struct
nvkm_
msgqueue
_seq
*
nvkm_falcon_qmgr_seq_acquire
(
struct
nvkm_falcon_qmgr
*
priv
)
struct
nvkm_
falcon_qmgr
_seq
*
nvkm_falcon_qmgr_seq_acquire
(
struct
nvkm_falcon_qmgr
*
qmgr
)
{
const
struct
nvkm_subdev
*
subdev
=
priv
->
falcon
->
owner
;
struct
nvkm_
msgqueue
_seq
*
seq
;
const
struct
nvkm_subdev
*
subdev
=
qmgr
->
falcon
->
owner
;
struct
nvkm_
falcon_qmgr
_seq
*
seq
;
u32
index
;
mutex_lock
(
&
priv
->
seq_lock
);
index
=
find_first_zero_bit
(
priv
->
seq_tbl
,
NVKM_MSGQUEUE_NUM_SEQUENCES
);
if
(
index
>=
NVKM_
MSGQUEUE_NUM_SEQUENCES
)
{
mutex_lock
(
&
qmgr
->
seq
.
mutex
);
index
=
find_first_zero_bit
(
qmgr
->
seq
.
tbl
,
NVKM_FALCON_QMGR_SEQ_NUM
);
if
(
index
>=
NVKM_
FALCON_QMGR_SEQ_NUM
)
{
nvkm_error
(
subdev
,
"no free sequence available
\n
"
);
mutex_unlock
(
&
priv
->
seq_lock
);
mutex_unlock
(
&
qmgr
->
seq
.
mutex
);
return
ERR_PTR
(
-
EAGAIN
);
}
set_bit
(
index
,
priv
->
seq_
tbl
);
mutex_unlock
(
&
priv
->
seq_lock
);
set_bit
(
index
,
qmgr
->
seq
.
tbl
);
mutex_unlock
(
&
qmgr
->
seq
.
mutex
);
seq
=
&
priv
->
seq
[
index
];
seq
=
&
qmgr
->
seq
.
id
[
index
];
seq
->
state
=
SEQ_STATE_PENDING
;
return
seq
;
}
void
nvkm_falcon_qmgr_seq_release
(
struct
nvkm_falcon_qmgr
*
priv
,
struct
nvkm_
msgqueue
_seq
*
seq
)
nvkm_falcon_qmgr_seq_release
(
struct
nvkm_falcon_qmgr
*
qmgr
,
struct
nvkm_
falcon_qmgr
_seq
*
seq
)
{
/* no need to acquire seq
_lock
since clear_bit is atomic */
/* no need to acquire seq
.mutex
since clear_bit is atomic */
seq
->
state
=
SEQ_STATE_FREE
;
seq
->
callback
=
NULL
;
reinit_completion
(
&
seq
->
done
);
clear_bit
(
seq
->
id
,
priv
->
seq_
tbl
);
clear_bit
(
seq
->
id
,
qmgr
->
seq
.
tbl
);
}
void
...
...
@@ -77,10 +77,10 @@ nvkm_falcon_qmgr_new(struct nvkm_falcon *falcon,
return
-
ENOMEM
;
qmgr
->
falcon
=
falcon
;
mutex_init
(
&
qmgr
->
seq
_lock
);
for
(
i
=
0
;
i
<
NVKM_
MSGQUEUE_NUM_SEQUENCES
;
i
++
)
{
qmgr
->
seq
[
i
].
id
=
i
;
init_completion
(
&
qmgr
->
seq
[
i
].
done
);
mutex_init
(
&
qmgr
->
seq
.
mutex
);
for
(
i
=
0
;
i
<
NVKM_
FALCON_QMGR_SEQ_NUM
;
i
++
)
{
qmgr
->
seq
.
id
[
i
].
id
=
i
;
init_completion
(
&
qmgr
->
seq
.
id
[
i
].
done
);
}
return
0
;
...
...
drivers/gpu/drm/nouveau/nvkm/falcon/qmgr.h
浏览文件 @
a15d8f58
...
...
@@ -10,7 +10,7 @@
#define MSG_BUF_SIZE 128
/**
* struct nvkm_
msgqueue
_seq - keep track of ongoing commands
* struct nvkm_
falcon_qmgr
_seq - keep track of ongoing commands
*
* Every time a command is sent, a sequence is assigned to it so the
* corresponding message can be matched. Upon receiving the message, a callback
...
...
@@ -21,7 +21,7 @@
* @callback: callback to call upon receiving matching message
* @completion: completion to signal after callback is called
*/
struct
nvkm_
msgqueue
_seq
{
struct
nvkm_
falcon_qmgr
_seq
{
u16
id
;
enum
{
SEQ_STATE_FREE
=
0
,
...
...
@@ -40,20 +40,22 @@ struct nvkm_msgqueue_seq {
* We can have an arbitrary number of sequences, but realistically we will
* probably not use that much simultaneously.
*/
#define NVKM_
MSGQUEUE_NUM_SEQUENCES
16
#define NVKM_
FALCON_QMGR_SEQ_NUM
16
struct
nvkm_falcon_qmgr
{
struct
nvkm_falcon
*
falcon
;
struct
mutex
seq_lock
;
struct
nvkm_msgqueue_seq
seq
[
NVKM_MSGQUEUE_NUM_SEQUENCES
];
unsigned
long
seq_tbl
[
BITS_TO_LONGS
(
NVKM_MSGQUEUE_NUM_SEQUENCES
)];
struct
{
struct
mutex
mutex
;
struct
nvkm_falcon_qmgr_seq
id
[
NVKM_FALCON_QMGR_SEQ_NUM
];
unsigned
long
tbl
[
BITS_TO_LONGS
(
NVKM_FALCON_QMGR_SEQ_NUM
)];
}
seq
;
};
struct
nvkm_
msgqueue
_seq
*
struct
nvkm_
falcon_qmgr
_seq
*
nvkm_falcon_qmgr_seq_acquire
(
struct
nvkm_falcon_qmgr
*
);
void
nvkm_falcon_qmgr_seq_release
(
struct
nvkm_falcon_qmgr
*
,
struct
nvkm_
msgqueue
_seq
*
);
struct
nvkm_
falcon_qmgr
_seq
*
);
#define FLCNQ_PRINTK(t,q,f,a...) \
FLCN_PRINTK(t, (q)->qmgr->falcon, "%s: "f, (q)->name, ##a)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录