Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
223eaf4b
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看板
提交
223eaf4b
编写于
11月 01, 2017
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/gr/gf100-gk208: make use of init_gpc_mmu() hook to share setup
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
2854ab8d
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
29 addition
and
20 deletion
+29
-20
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+18
-9
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c
+2
-11
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c
+1
-0
未找到文件。
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
浏览文件 @
223eaf4b
...
@@ -1903,25 +1903,33 @@ gf100_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device,
...
@@ -1903,25 +1903,33 @@ gf100_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device,
return
0
;
return
0
;
}
}
void
gf100_gr_init_gpc_mmu
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_fb
*
fb
=
device
->
fb
;
nvkm_wr32
(
device
,
0x418880
,
0x00000000
);
nvkm_wr32
(
device
,
0x4188a4
,
0x00000000
);
nvkm_wr32
(
device
,
0x418888
,
0x00000000
);
nvkm_wr32
(
device
,
0x41888c
,
0x00000000
);
nvkm_wr32
(
device
,
0x418890
,
0x00000000
);
nvkm_wr32
(
device
,
0x418894
,
0x00000000
);
nvkm_wr32
(
device
,
0x4188b4
,
nvkm_memory_addr
(
fb
->
mmu_wr
)
>>
8
);
nvkm_wr32
(
device
,
0x4188b8
,
nvkm_memory_addr
(
fb
->
mmu_rd
)
>>
8
);
}
int
int
gf100_gr_init
(
struct
gf100_gr
*
gr
)
gf100_gr_init
(
struct
gf100_gr
*
gr
)
{
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_fb
*
fb
=
device
->
fb
;
const
u32
magicgpc918
=
DIV_ROUND_UP
(
0x00800000
,
gr
->
tpc_total
);
const
u32
magicgpc918
=
DIV_ROUND_UP
(
0x00800000
,
gr
->
tpc_total
);
u32
data
[
TPC_MAX
/
8
]
=
{};
u32
data
[
TPC_MAX
/
8
]
=
{};
u8
tpcnr
[
GPC_MAX
];
u8
tpcnr
[
GPC_MAX
];
int
gpc
,
tpc
,
rop
;
int
gpc
,
tpc
,
rop
;
int
i
;
int
i
;
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0880
),
0x00000000
);
gr
->
func
->
init_gpc_mmu
(
gr
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x08a4
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0888
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x088c
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0890
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0894
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x08b4
),
nvkm_memory_addr
(
fb
->
mmu_wr
)
>>
8
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x08b8
),
nvkm_memory_addr
(
fb
->
mmu_rd
)
>>
8
);
gf100_gr_mmio
(
gr
,
gr
->
func
->
mmio
);
gf100_gr_mmio
(
gr
,
gr
->
func
->
mmio
);
...
@@ -2036,6 +2044,7 @@ gf100_gr_gpccs_ucode = {
...
@@ -2036,6 +2044,7 @@ gf100_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gf100_gr
=
{
gf100_gr
=
{
.
init
=
gf100_gr_init
,
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf100_gr_pack_mmio
,
.
mmio
=
gf100_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
浏览文件 @
223eaf4b
...
@@ -254,6 +254,7 @@ extern const struct gf100_gr_init gf100_gr_init_mpc_0[];
...
@@ -254,6 +254,7 @@ extern const struct gf100_gr_init gf100_gr_init_mpc_0[];
extern
const
struct
gf100_gr_init
gf100_gr_init_be_0
[];
extern
const
struct
gf100_gr_init
gf100_gr_init_be_0
[];
extern
const
struct
gf100_gr_init
gf100_gr_init_fe_1
[];
extern
const
struct
gf100_gr_init
gf100_gr_init_fe_1
[];
extern
const
struct
gf100_gr_init
gf100_gr_init_pe_1
[];
extern
const
struct
gf100_gr_init
gf100_gr_init_pe_1
[];
void
gf100_gr_init_gpc_mmu
(
struct
gf100_gr
*
);
extern
const
struct
gf100_gr_init
gf104_gr_init_ds_0
[];
extern
const
struct
gf100_gr_init
gf104_gr_init_ds_0
[];
extern
const
struct
gf100_gr_init
gf104_gr_init_tex_0
[];
extern
const
struct
gf100_gr_init
gf104_gr_init_tex_0
[];
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c
浏览文件 @
223eaf4b
...
@@ -115,6 +115,7 @@ gf104_gr_pack_mmio[] = {
...
@@ -115,6 +115,7 @@ gf104_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gf104_gr
=
{
gf104_gr
=
{
.
init
=
gf100_gr_init
,
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf104_gr_pack_mmio
,
.
mmio
=
gf104_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c
浏览文件 @
223eaf4b
...
@@ -106,6 +106,7 @@ gf108_gr_pack_mmio[] = {
...
@@ -106,6 +106,7 @@ gf108_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gf108_gr
=
{
gf108_gr
=
{
.
init
=
gf100_gr_init
,
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf108_gr_pack_mmio
,
.
mmio
=
gf108_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c
浏览文件 @
223eaf4b
...
@@ -87,6 +87,7 @@ gf110_gr_pack_mmio[] = {
...
@@ -87,6 +87,7 @@ gf110_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gf110_gr
=
{
gf110_gr
=
{
.
init
=
gf100_gr_init
,
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf110_gr_pack_mmio
,
.
mmio
=
gf110_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
浏览文件 @
223eaf4b
...
@@ -123,6 +123,7 @@ gf117_gr_gpccs_ucode = {
...
@@ -123,6 +123,7 @@ gf117_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gf117_gr
=
{
gf117_gr
=
{
.
init
=
gf100_gr_init
,
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf117_gr_pack_mmio
,
.
mmio
=
gf117_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf117_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gf117_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf117_gr_gpccs_ucode
,
.
gpccs
.
ucode
=
&
gf117_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c
浏览文件 @
223eaf4b
...
@@ -178,6 +178,7 @@ gf119_gr_pack_mmio[] = {
...
@@ -178,6 +178,7 @@ gf119_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gf119_gr
=
{
gf119_gr
=
{
.
init
=
gf100_gr_init
,
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf119_gr_pack_mmio
,
.
mmio
=
gf119_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c
浏览文件 @
223eaf4b
...
@@ -24,8 +24,6 @@
...
@@ -24,8 +24,6 @@
#include "gf100.h"
#include "gf100.h"
#include "ctxgf100.h"
#include "ctxgf100.h"
#include <subdev/fb.h>
#include <nvif/class.h>
#include <nvif/class.h>
/*******************************************************************************
/*******************************************************************************
...
@@ -207,21 +205,13 @@ int
...
@@ -207,21 +205,13 @@ int
gk104_gr_init
(
struct
gf100_gr
*
gr
)
gk104_gr_init
(
struct
gf100_gr
*
gr
)
{
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
struct
nvkm_fb
*
fb
=
device
->
fb
;
const
u32
magicgpc918
=
DIV_ROUND_UP
(
0x00800000
,
gr
->
tpc_total
);
const
u32
magicgpc918
=
DIV_ROUND_UP
(
0x00800000
,
gr
->
tpc_total
);
u32
data
[
TPC_MAX
/
8
]
=
{};
u32
data
[
TPC_MAX
/
8
]
=
{};
u8
tpcnr
[
GPC_MAX
];
u8
tpcnr
[
GPC_MAX
];
int
gpc
,
tpc
,
rop
;
int
gpc
,
tpc
,
rop
;
int
i
;
int
i
;
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0880
),
0x00000000
);
gr
->
func
->
init_gpc_mmu
(
gr
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x08a4
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0888
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x088c
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0890
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0894
),
0x00000000
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x08b4
),
nvkm_memory_addr
(
fb
->
mmu_wr
)
>>
8
);
nvkm_wr32
(
device
,
GPC_BCAST
(
0x08b8
),
nvkm_memory_addr
(
fb
->
mmu_rd
)
>>
8
);
gf100_gr_mmio
(
gr
,
gr
->
func
->
mmio
);
gf100_gr_mmio
(
gr
,
gr
->
func
->
mmio
);
...
@@ -339,6 +329,7 @@ gk104_gr_gpccs_ucode = {
...
@@ -339,6 +329,7 @@ gk104_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gk104_gr
=
{
gk104_gr
=
{
.
init
=
gk104_gr_init
,
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk104_gr_pack_mmio
,
.
mmio
=
gk104_gr_pack_mmio
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
浏览文件 @
223eaf4b
...
@@ -183,6 +183,7 @@ gk110_gr_gpccs_ucode = {
...
@@ -183,6 +183,7 @@ gk110_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gk110_gr
=
{
gk110_gr
=
{
.
init
=
gk104_gr_init
,
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk110_gr_pack_mmio
,
.
mmio
=
gk110_gr_pack_mmio
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c
浏览文件 @
223eaf4b
...
@@ -103,6 +103,7 @@ gk110b_gr_pack_mmio[] = {
...
@@ -103,6 +103,7 @@ gk110b_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gk110b_gr
=
{
gk110b_gr
=
{
.
init
=
gk104_gr_init
,
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk110b_gr_pack_mmio
,
.
mmio
=
gk110b_gr_pack_mmio
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c
浏览文件 @
223eaf4b
...
@@ -162,6 +162,7 @@ gk208_gr_gpccs_ucode = {
...
@@ -162,6 +162,7 @@ gk208_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
static
const
struct
gf100_gr_func
gk208_gr
=
{
gk208_gr
=
{
.
init
=
gk104_gr_init
,
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk208_gr_pack_mmio
,
.
mmio
=
gk208_gr_pack_mmio
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录