Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
8c4e9f9d
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8c4e9f9d
编写于
5月 08, 2018
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/fifo/gk110-: support writing channel group runlist entries
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
4f2fc25c
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
71 addition
and
11 deletion
+71
-11
drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h
+11
-0
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
+24
-2
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
+8
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c
+20
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c
+1
-1
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/fifo/cgrp.h
0 → 100644
浏览文件 @
8c4e9f9d
#ifndef __NVKM_FIFO_CGRP_H__
#define __NVKM_FIFO_CGRP_H__
#include "priv.h"
struct
nvkm_fifo_cgrp
{
int
id
;
struct
list_head
head
;
struct
list_head
chan
;
int
chan_nr
;
};
#endif
drivers/gpu/drm/nouveau/nvkm/engine/fifo/changk104.h
浏览文件 @
8c4e9f9d
...
...
@@ -10,6 +10,7 @@ struct gk104_fifo_chan {
struct
gk104_fifo
*
fifo
;
int
runl
;
struct
nvkm_fifo_cgrp
*
cgrp
;
struct
list_head
head
;
bool
killed
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c
浏览文件 @
8c4e9f9d
...
...
@@ -22,6 +22,7 @@
* Authors: Ben Skeggs
*/
#include "gk104.h"
#include "cgrp.h"
#include "changk104.h"
#include <core/client.h>
...
...
@@ -145,6 +146,7 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl)
struct
nvkm_subdev
*
subdev
=
&
fifo
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_memory
*
mem
;
struct
nvkm_fifo_cgrp
*
cgrp
;
int
nr
=
0
;
int
target
;
...
...
@@ -156,6 +158,13 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl)
list_for_each_entry
(
chan
,
&
fifo
->
runlist
[
runl
].
chan
,
head
)
{
func
->
chan
(
chan
,
mem
,
nr
++
*
func
->
size
);
}
list_for_each_entry
(
cgrp
,
&
fifo
->
runlist
[
runl
].
cgrp
,
head
)
{
func
->
cgrp
(
cgrp
,
mem
,
nr
++
*
func
->
size
);
list_for_each_entry
(
chan
,
&
cgrp
->
chan
,
head
)
{
func
->
chan
(
chan
,
mem
,
nr
++
*
func
->
size
);
}
}
nvkm_done
(
mem
);
switch
(
nvkm_memory_target
(
mem
))
{
...
...
@@ -182,16 +191,28 @@ gk104_fifo_runlist_commit(struct gk104_fifo *fifo, int runl)
void
gk104_fifo_runlist_remove
(
struct
gk104_fifo
*
fifo
,
struct
gk104_fifo_chan
*
chan
)
{
struct
nvkm_fifo_cgrp
*
cgrp
=
chan
->
cgrp
;
mutex_lock
(
&
fifo
->
base
.
engine
.
subdev
.
mutex
);
list_del_init
(
&
chan
->
head
);
if
(
!
list_empty
(
&
chan
->
head
))
{
list_del_init
(
&
chan
->
head
);
if
(
cgrp
&&
!--
cgrp
->
chan_nr
)
list_del_init
(
&
cgrp
->
head
);
}
mutex_unlock
(
&
fifo
->
base
.
engine
.
subdev
.
mutex
);
}
void
gk104_fifo_runlist_insert
(
struct
gk104_fifo
*
fifo
,
struct
gk104_fifo_chan
*
chan
)
{
struct
nvkm_fifo_cgrp
*
cgrp
=
chan
->
cgrp
;
mutex_lock
(
&
fifo
->
base
.
engine
.
subdev
.
mutex
);
list_add_tail
(
&
chan
->
head
,
&
fifo
->
runlist
[
chan
->
runl
].
chan
);
if
(
cgrp
)
{
if
(
!
cgrp
->
chan_nr
++
)
list_add_tail
(
&
cgrp
->
head
,
&
fifo
->
runlist
[
chan
->
runl
].
cgrp
);
list_add_tail
(
&
chan
->
head
,
&
cgrp
->
chan
);
}
else
{
list_add_tail
(
&
chan
->
head
,
&
fifo
->
runlist
[
chan
->
runl
].
chan
);
}
mutex_unlock
(
&
fifo
->
base
.
engine
.
subdev
.
mutex
);
}
...
...
@@ -898,6 +919,7 @@ gk104_fifo_oneinit(struct nvkm_fifo *base)
}
init_waitqueue_head
(
&
fifo
->
runlist
[
i
].
wait
);
INIT_LIST_HEAD
(
&
fifo
->
runlist
[
i
].
cgrp
);
INIT_LIST_HEAD
(
&
fifo
->
runlist
[
i
].
chan
);
}
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.h
浏览文件 @
8c4e9f9d
...
...
@@ -3,6 +3,7 @@
#define __GK104_FIFO_H__
#define gk104_fifo(p) container_of((p), struct gk104_fifo, base)
#include "priv.h"
struct
nvkm_fifo_cgrp
;
#include <core/enum.h>
#include <subdev/mmu.h>
...
...
@@ -31,6 +32,7 @@ struct gk104_fifo {
struct
nvkm_memory
*
mem
[
2
];
int
next
;
wait_queue_head_t
wait
;
struct
list_head
cgrp
;
struct
list_head
chan
;
u32
engm
;
}
runlist
[
16
];
...
...
@@ -53,6 +55,8 @@ struct gk104_fifo_func {
const
struct
gk104_fifo_runlist_func
{
u8
size
;
void
(
*
cgrp
)(
struct
nvkm_fifo_cgrp
*
,
struct
nvkm_memory
*
,
u32
offset
);
void
(
*
chan
)(
struct
gk104_fifo_chan
*
,
struct
nvkm_memory
*
,
u32
offset
);
}
*
runlist
;
...
...
@@ -71,7 +75,6 @@ void gk104_fifo_runlist_remove(struct gk104_fifo *, struct gk104_fifo_chan *);
void
gk104_fifo_runlist_commit
(
struct
gk104_fifo
*
,
int
runl
);
extern
const
struct
nvkm_enum
gk104_fifo_fault_access
[];
extern
const
struct
nvkm_enum
gk104_fifo_fault_engine
[];
extern
const
struct
nvkm_enum
gk104_fifo_fault_reason
[];
extern
const
struct
nvkm_enum
gk104_fifo_fault_hubclient
[];
...
...
@@ -80,6 +83,10 @@ extern const struct gk104_fifo_runlist_func gk104_fifo_runlist;
void
gk104_fifo_runlist_chan
(
struct
gk104_fifo_chan
*
,
struct
nvkm_memory
*
,
u32
);
extern
const
struct
gk104_fifo_runlist_func
gk110_fifo_runlist
;
void
gk110_fifo_runlist_cgrp
(
struct
nvkm_fifo_cgrp
*
,
struct
nvkm_memory
*
,
u32
);
extern
const
struct
nvkm_enum
gm107_fifo_fault_engine
[];
extern
const
struct
nvkm_enum
gp100_fifo_fault_engine
[];
#endif
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk110.c
浏览文件 @
8c4e9f9d
...
...
@@ -22,10 +22,29 @@
* Authors: Ben Skeggs
*/
#include "gk104.h"
#include "cgrp.h"
#include "changk104.h"
#include <core/memory.h>
#include <nvif/class.h>
void
gk110_fifo_runlist_cgrp
(
struct
nvkm_fifo_cgrp
*
cgrp
,
struct
nvkm_memory
*
memory
,
u32
offset
)
{
nvkm_wo32
(
memory
,
offset
+
0
,
(
cgrp
->
chan_nr
<<
26
)
|
(
128
<<
18
)
|
(
3
<<
14
)
|
0x00002000
|
cgrp
->
id
);
nvkm_wo32
(
memory
,
offset
+
4
,
0x00000000
);
}
const
struct
gk104_fifo_runlist_func
gk110_fifo_runlist
=
{
.
size
=
8
,
.
cgrp
=
gk110_fifo_runlist_cgrp
,
.
chan
=
gk104_fifo_runlist_chan
,
};
static
const
struct
gk104_fifo_func
gk110_fifo
=
{
.
fault
.
access
=
gk104_fifo_fault_access
,
...
...
@@ -33,7 +52,7 @@ gk110_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
KEPLER_CHANNEL_GPFIFO_B
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk208.c
浏览文件 @
8c4e9f9d
...
...
@@ -33,7 +33,7 @@ gk208_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
KEPLER_CHANNEL_GPFIFO_A
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk20a.c
浏览文件 @
8c4e9f9d
...
...
@@ -31,7 +31,7 @@ gk20a_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
KEPLER_CHANNEL_GPFIFO_A
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm107.c
浏览文件 @
8c4e9f9d
...
...
@@ -56,7 +56,7 @@ gm107_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
KEPLER_CHANNEL_GPFIFO_B
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm200.c
浏览文件 @
8c4e9f9d
...
...
@@ -33,7 +33,7 @@ gm200_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
MAXWELL_CHANNEL_GPFIFO_A
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gm20b.c
浏览文件 @
8c4e9f9d
...
...
@@ -31,7 +31,7 @@ gm20b_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
MAXWELL_CHANNEL_GPFIFO_A
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp100.c
浏览文件 @
8c4e9f9d
...
...
@@ -57,7 +57,7 @@ gp100_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
PASCAL_CHANNEL_GPFIFO_A
},
gk104_fifo_gpfifo_new
},
};
...
...
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gp10b.c
浏览文件 @
8c4e9f9d
...
...
@@ -31,7 +31,7 @@ gp10b_fifo = {
.
fault
.
reason
=
gk104_fifo_fault_reason
,
.
fault
.
hubclient
=
gk104_fifo_fault_hubclient
,
.
fault
.
gpcclient
=
gk104_fifo_fault_gpcclient
,
.
runlist
=
&
gk1
04
_fifo_runlist
,
.
runlist
=
&
gk1
10
_fifo_runlist
,
.
chan
=
{{
0
,
0
,
PASCAL_CHANNEL_GPFIFO_A
},
gk104_fifo_gpfifo_new
},
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录