Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
afa3b96b
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看板
提交
afa3b96b
编写于
1月 15, 2020
作者:
B
Ben Skeggs
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
drm/nouveau/gr/tu10x: initial support
Signed-off-by:
N
Ben Skeggs
<
bskeggs@redhat.com
>
上级
3fa8fe15
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
313 addition
and
11 deletion
+313
-11
drivers/gpu/drm/nouveau/include/nvif/class.h
drivers/gpu/drm/nouveau/include/nvif/class.h
+3
-0
drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h
drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
+3
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild
drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild
+2
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c
+4
-1
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
+10
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c
+6
-6
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c
+95
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
+2
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
+6
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c
+4
-4
drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c
+177
-0
未找到文件。
drivers/gpu/drm/nouveau/include/nvif/class.h
浏览文件 @
afa3b96b
...
...
@@ -166,6 +166,8 @@
#define VOLTA_A
/* cl9097.h */
0x0000c397
#define TURING_A
/* cl9097.h */
0x0000c597
#define NV74_BSP 0x000074b0
#define GT212_MSVLD 0x000085b1
...
...
@@ -207,6 +209,7 @@
#define PASCAL_COMPUTE_A 0x0000c0c0
#define PASCAL_COMPUTE_B 0x0000c1c0
#define VOLTA_COMPUTE_A 0x0000c3c0
#define TURING_COMPUTE_A 0x0000c5c0
#define NV74_CIPHER 0x000074c1
#endif
drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h
浏览文件 @
afa3b96b
...
...
@@ -53,4 +53,5 @@ int gp107_gr_new(struct nvkm_device *, int, struct nvkm_gr **);
int
gp108_gr_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_gr
**
);
int
gp10b_gr_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_gr
**
);
int
gv100_gr_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_gr
**
);
int
tu102_gr_new
(
struct
nvkm_device
*
,
int
,
struct
nvkm_gr
**
);
#endif
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c
浏览文件 @
afa3b96b
...
...
@@ -2491,6 +2491,7 @@ nv162_chipset = {
.
disp
=
tu102_disp_new
,
.
dma
=
gv100_dma_new
,
.
fifo
=
tu102_fifo_new
,
.
gr
=
tu102_gr_new
,
.
nvdec
[
0
]
=
gm107_nvdec_new
,
.
nvenc
[
0
]
=
gm107_nvenc_new
,
.
sec2
=
tu102_sec2_new
,
...
...
@@ -2528,6 +2529,7 @@ nv164_chipset = {
.
disp
=
tu102_disp_new
,
.
dma
=
gv100_dma_new
,
.
fifo
=
tu102_fifo_new
,
.
gr
=
tu102_gr_new
,
.
nvdec
[
0
]
=
gm107_nvdec_new
,
.
nvdec
[
1
]
=
gm107_nvdec_new
,
.
nvenc
[
0
]
=
gm107_nvenc_new
,
...
...
@@ -2566,6 +2568,7 @@ nv166_chipset = {
.
disp
=
tu102_disp_new
,
.
dma
=
gv100_dma_new
,
.
fifo
=
tu102_fifo_new
,
.
gr
=
tu102_gr_new
,
.
nvdec
[
0
]
=
gm107_nvdec_new
,
.
nvdec
[
1
]
=
gm107_nvdec_new
,
.
nvdec
[
2
]
=
gm107_nvdec_new
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild
浏览文件 @
afa3b96b
...
...
@@ -39,6 +39,7 @@ nvkm-y += nvkm/engine/gr/gp107.o
nvkm-y += nvkm/engine/gr/gp108.o
nvkm-y += nvkm/engine/gr/gp10b.o
nvkm-y += nvkm/engine/gr/gv100.o
nvkm-y += nvkm/engine/gr/tu102.o
nvkm-y += nvkm/engine/gr/ctxnv40.o
nvkm-y += nvkm/engine/gr/ctxnv50.o
...
...
@@ -61,3 +62,4 @@ nvkm-y += nvkm/engine/gr/ctxgp102.o
nvkm-y += nvkm/engine/gr/ctxgp104.o
nvkm-y += nvkm/engine/gr/ctxgp107.o
nvkm-y += nvkm/engine/gr/ctxgv100.o
nvkm-y += nvkm/engine/gr/ctxtu102.o
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.c
浏览文件 @
afa3b96b
...
...
@@ -1334,7 +1334,8 @@ gf100_grctx_generate_floorsweep(struct gf100_gr *gr)
}
gf100_gr_init_num_tpc_per_gpc
(
gr
,
false
,
true
);
gf100_gr_init_num_tpc_per_gpc
(
gr
,
true
,
false
);
if
(
!
func
->
skip_pd_num_tpc_per_gpc
)
gf100_gr_init_num_tpc_per_gpc
(
gr
,
true
,
false
);
if
(
func
->
r4060a8
)
func
->
r4060a8
(
gr
);
...
...
@@ -1425,6 +1426,8 @@ gf100_grctx_generate_main(struct gf100_gr *gr, struct gf100_grctx *info)
grctx
->
r419a3c
(
gr
);
if
(
grctx
->
r408840
)
grctx
->
r408840
(
gr
);
if
(
grctx
->
r419c0c
)
grctx
->
r419c0c
(
gr
);
}
#define CB_RESERVED 0x80000
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
浏览文件 @
afa3b96b
...
...
@@ -57,6 +57,7 @@ struct gf100_grctx_func {
/* floorsweeping */
void
(
*
sm_id
)(
struct
gf100_gr
*
,
int
gpc
,
int
tpc
,
int
sm
);
void
(
*
tpc_nr
)(
struct
gf100_gr
*
,
int
gpc
);
bool
skip_pd_num_tpc_per_gpc
;
void
(
*
r4060a8
)(
struct
gf100_gr
*
);
void
(
*
rop_mapping
)(
struct
gf100_gr
*
);
void
(
*
alpha_beta_tables
)(
struct
gf100_gr
*
);
...
...
@@ -76,6 +77,7 @@ struct gf100_grctx_func {
void
(
*
r418e94
)(
struct
gf100_gr
*
);
void
(
*
r419a3c
)(
struct
gf100_gr
*
);
void
(
*
r408840
)(
struct
gf100_gr
*
);
void
(
*
r419c0c
)(
struct
gf100_gr
*
);
};
extern
const
struct
gf100_grctx_func
gf100_grctx
;
...
...
@@ -153,6 +155,14 @@ extern const struct gf100_grctx_func gp107_grctx;
extern
const
struct
gf100_grctx_func
gv100_grctx
;
extern
const
struct
gf100_grctx_func
tu102_grctx
;
void
gv100_grctx_unkn88c
(
struct
gf100_gr
*
,
bool
);
void
gv100_grctx_generate_unkn
(
struct
gf100_gr
*
);
extern
const
struct
gf100_gr_init
gv100_grctx_init_sw_veid_bundle_init_0
[];
void
gv100_grctx_generate_attrib
(
struct
gf100_grctx
*
);
void
gv100_grctx_generate_rop_mapping
(
struct
gf100_gr
*
);
void
gv100_grctx_generate_r400088
(
struct
gf100_gr
*
,
bool
);
/* context init value lists */
extern
const
struct
gf100_gr_pack
gf100_grctx_pack_icmd
[];
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgv100.c
浏览文件 @
afa3b96b
...
...
@@ -25,7 +25,7 @@
* PGRAPH context implementation
******************************************************************************/
static
const
struct
gf100_gr_init
const
struct
gf100_gr_init
gv100_grctx_init_sw_veid_bundle_init_0
[]
=
{
{
0x00001000
,
64
,
0x00100000
,
0x00000008
},
{
0x00000941
,
64
,
0x00100000
,
0x00000000
},
...
...
@@ -58,7 +58,7 @@ gv100_grctx_pack_sw_veid_bundle_init[] = {
{}
};
static
void
void
gv100_grctx_generate_attrib
(
struct
gf100_grctx
*
info
)
{
struct
gf100_gr
*
gr
=
info
->
gr
;
...
...
@@ -109,7 +109,7 @@ gv100_grctx_generate_attrib(struct gf100_grctx *info)
mmio_wr32
(
info
,
0x41befc
,
0x00000100
);
}
static
void
void
gv100_grctx_generate_rop_mapping
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
...
...
@@ -146,7 +146,7 @@ gv100_grctx_generate_rop_mapping(struct gf100_gr *gr)
gr
->
screen_tile_row_offset
);
}
static
void
void
gv100_grctx_generate_r400088
(
struct
gf100_gr
*
gr
,
bool
on
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
...
...
@@ -162,7 +162,7 @@ gv100_grctx_generate_sm_id(struct gf100_gr *gr, int gpc, int tpc, int sm)
nvkm_wr32
(
device
,
TPC_UNIT
(
gpc
,
tpc
,
0x088
),
sm
);
}
static
void
void
gv100_grctx_generate_unkn
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
...
...
@@ -173,7 +173,7 @@ gv100_grctx_generate_unkn(struct gf100_gr *gr)
nvkm_mask
(
device
,
0x419c00
,
0x00000008
,
0x00000008
);
}
static
void
void
gv100_grctx_unkn88c
(
struct
gf100_gr
*
gr
,
bool
on
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxtu102.c
0 → 100644
浏览文件 @
afa3b96b
/*
* Copyright 2019 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "ctxgf100.h"
static
void
tu102_grctx_generate_r419c0c
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
nvkm_mask
(
device
,
0x419c0c
,
0x80000000
,
0x80000000
);
nvkm_mask
(
device
,
0x40584c
,
0x00000008
,
0x00000000
);
nvkm_mask
(
device
,
0x400080
,
0x00000000
,
0x00000000
);
}
static
void
tu102_grctx_generate_sm_id
(
struct
gf100_gr
*
gr
,
int
gpc
,
int
tpc
,
int
sm
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
nvkm_wr32
(
device
,
TPC_UNIT
(
gpc
,
tpc
,
0x608
),
sm
);
nvkm_wr32
(
device
,
TPC_UNIT
(
gpc
,
tpc
,
0x088
),
sm
);
}
static
const
struct
gf100_gr_init
tu102_grctx_init_unknown_bundle_init_0
[]
=
{
{
0x00001000
,
1
,
0x00000001
,
0x00000004
},
{
0x00002020
,
64
,
0x00000001
,
0x00000000
},
{
0x0001e100
,
1
,
0x00000001
,
0x00000001
},
{}
};
static
const
struct
gf100_gr_pack
tu102_grctx_pack_sw_veid_bundle_init
[]
=
{
{
gv100_grctx_init_sw_veid_bundle_init_0
},
{
tu102_grctx_init_unknown_bundle_init_0
},
{}
};
static
void
tu102_grctx_generate_attrib
(
struct
gf100_grctx
*
info
)
{
const
u64
size
=
0x80000
;
/*XXX: educated guess */
const
int
s
=
8
;
const
int
b
=
mmio_vram
(
info
,
size
,
(
1
<<
s
),
true
);
gv100_grctx_generate_attrib
(
info
);
mmio_refn
(
info
,
0x408070
,
0x00000000
,
s
,
b
);
mmio_wr32
(
info
,
0x408074
,
size
>>
s
);
/*XXX: guess */
mmio_refn
(
info
,
0x419034
,
0x00000000
,
s
,
b
);
mmio_wr32
(
info
,
0x408078
,
0x00000000
);
}
const
struct
gf100_grctx_func
tu102_grctx
=
{
.
unkn88c
=
gv100_grctx_unkn88c
,
.
main
=
gf100_grctx_generate_main
,
.
unkn
=
gv100_grctx_generate_unkn
,
.
sw_veid_bundle_init
=
tu102_grctx_pack_sw_veid_bundle_init
,
.
bundle
=
gm107_grctx_generate_bundle
,
.
bundle_size
=
0x3000
,
.
bundle_min_gpm_fifo_depth
=
0x180
,
.
bundle_token_limit
=
0xa80
,
.
pagepool
=
gp100_grctx_generate_pagepool
,
.
pagepool_size
=
0x20000
,
.
attrib
=
tu102_grctx_generate_attrib
,
.
attrib_nr_max
=
0x800
,
.
attrib_nr
=
0x700
,
.
alpha_nr_max
=
0xc00
,
.
alpha_nr
=
0x800
,
.
gfxp_nr
=
0xfa8
,
.
sm_id
=
tu102_grctx_generate_sm_id
,
.
skip_pd_num_tpc_per_gpc
=
true
,
.
rop_mapping
=
gv100_grctx_generate_rop_mapping
,
.
r406500
=
gm200_grctx_generate_r406500
,
.
r400088
=
gv100_grctx_generate_r400088
,
.
r419c0c
=
tu102_grctx_generate_r419c0c
,
};
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
浏览文件 @
afa3b96b
...
...
@@ -2262,6 +2262,8 @@ gf100_gr_init(struct gf100_gr *gr)
gr
->
func
->
init_bios_2
(
gr
);
if
(
gr
->
func
->
init_swdx_pes_mask
)
gr
->
func
->
init_swdx_pes_mask
(
gr
);
if
(
gr
->
func
->
init_fs
)
gr
->
func
->
init_fs
(
gr
);
nvkm_wr32
(
device
,
0x400500
,
0x00010001
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
浏览文件 @
afa3b96b
...
...
@@ -162,6 +162,7 @@ struct gf100_gr_func {
void
(
*
init_rop_active_fbps
)(
struct
gf100_gr
*
);
void
(
*
init_bios_2
)(
struct
gf100_gr
*
);
void
(
*
init_swdx_pes_mask
)(
struct
gf100_gr
*
);
void
(
*
init_fs
)(
struct
gf100_gr
*
);
void
(
*
init_fecs_exceptions
)(
struct
gf100_gr
*
);
void
(
*
init_ds_hww_esr_2
)(
struct
gf100_gr
*
);
void
(
*
init_40601c
)(
struct
gf100_gr
*
);
...
...
@@ -243,6 +244,11 @@ extern const struct gf100_gr_func_zbc gp102_gr_zbc;
extern
const
struct
gf100_gr_func
gp107_gr
;
void
gv100_gr_init_419bd8
(
struct
gf100_gr
*
);
void
gv100_gr_init_504430
(
struct
gf100_gr
*
,
int
,
int
);
void
gv100_gr_init_shader_exceptions
(
struct
gf100_gr
*
,
int
,
int
);
void
gv100_gr_trap_mp
(
struct
gf100_gr
*
,
int
,
int
);
#define gf100_gr_chan(p) container_of((p), struct gf100_gr_chan, object)
#include <core/object.h>
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gv100.c
浏览文件 @
afa3b96b
...
...
@@ -45,7 +45,7 @@ gv100_gr_trap_sm(struct gf100_gr *gr, int gpc, int tpc, int sm)
nvkm_wr32
(
device
,
TPC_UNIT
(
gpc
,
tpc
,
0x734
+
sm
*
0x80
),
gerr
);
}
static
void
void
gv100_gr_trap_mp
(
struct
gf100_gr
*
gr
,
int
gpc
,
int
tpc
)
{
gv100_gr_trap_sm
(
gr
,
gpc
,
tpc
,
0
);
...
...
@@ -59,7 +59,7 @@ gv100_gr_init_4188a4(struct gf100_gr *gr)
nvkm_mask
(
device
,
0x4188a4
,
0x03000000
,
0x03000000
);
}
static
void
void
gv100_gr_init_shader_exceptions
(
struct
gf100_gr
*
gr
,
int
gpc
,
int
tpc
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
...
...
@@ -71,14 +71,14 @@ gv100_gr_init_shader_exceptions(struct gf100_gr *gr, int gpc, int tpc)
}
}
static
void
void
gv100_gr_init_504430
(
struct
gf100_gr
*
gr
,
int
gpc
,
int
tpc
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
nvkm_wr32
(
device
,
TPC_UNIT
(
gpc
,
tpc
,
0x430
),
0x403f0000
);
}
static
void
void
gv100_gr_init_419bd8
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c
0 → 100644
浏览文件 @
afa3b96b
/*
* Copyright 2019 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
#include "gf100.h"
#include "ctxgf100.h"
#include <nvif/class.h>
static
void
tu102_gr_init_fecs_exceptions
(
struct
gf100_gr
*
gr
)
{
nvkm_wr32
(
gr
->
base
.
engine
.
subdev
.
device
,
0x409c24
,
0x006f0002
);
}
static
void
tu102_gr_init_fs
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
int
sm
;
gp100_grctx_generate_smid_config
(
gr
);
gk104_grctx_generate_gpc_tpc_nr
(
gr
);
for
(
sm
=
0
;
sm
<
gr
->
sm_nr
;
sm
++
)
{
nvkm_wr32
(
device
,
GPC_UNIT
(
gr
->
sm
[
sm
].
gpc
,
0x0c10
+
gr
->
sm
[
sm
].
tpc
*
4
),
sm
);
}
gm200_grctx_generate_dist_skip_table
(
gr
);
gf100_gr_init_num_tpc_per_gpc
(
gr
,
true
,
true
);
}
static
void
tu102_gr_init_zcull
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
const
u32
magicgpc918
=
DIV_ROUND_UP
(
0x00800000
,
gr
->
tpc_total
);
const
u8
tile_nr
=
ALIGN
(
gr
->
tpc_total
,
64
);
u8
bank
[
GPC_MAX
]
=
{},
gpc
,
i
,
j
;
u32
data
;
for
(
i
=
0
;
i
<
tile_nr
;
i
+=
8
)
{
for
(
data
=
0
,
j
=
0
;
j
<
8
&&
i
+
j
<
gr
->
tpc_total
;
j
++
)
{
data
|=
bank
[
gr
->
tile
[
i
+
j
]]
<<
(
j
*
4
);
bank
[
gr
->
tile
[
i
+
j
]]
++
;
}
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0980
+
((
i
/
8
)
*
4
)),
data
);
}
for
(
gpc
=
0
;
gpc
<
gr
->
gpc_nr
;
gpc
++
)
{
nvkm_wr32
(
device
,
GPC_UNIT
(
gpc
,
0x0914
),
gr
->
screen_tile_row_offset
<<
8
|
gr
->
tpc_nr
[
gpc
]);
nvkm_wr32
(
device
,
GPC_UNIT
(
gpc
,
0x0910
),
0x00040000
|
gr
->
tpc_total
);
nvkm_wr32
(
device
,
GPC_UNIT
(
gpc
,
0x0918
),
magicgpc918
);
}
nvkm_wr32
(
device
,
GPC_BCAST
(
0x3fd4
),
magicgpc918
);
}
static
void
tu102_gr_init_gpc_mmu
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
nvkm_wr32
(
device
,
0x418880
,
nvkm_rd32
(
device
,
0x100c80
)
&
0xf8001fff
);
nvkm_wr32
(
device
,
0x418890
,
0x00000000
);
nvkm_wr32
(
device
,
0x418894
,
0x00000000
);
nvkm_wr32
(
device
,
0x4188b4
,
nvkm_rd32
(
device
,
0x100cc8
));
nvkm_wr32
(
device
,
0x4188b8
,
nvkm_rd32
(
device
,
0x100ccc
));
nvkm_wr32
(
device
,
0x4188b0
,
nvkm_rd32
(
device
,
0x100cc4
));
}
static
const
struct
gf100_gr_func
tu102_gr
=
{
.
oneinit_tiles
=
gm200_gr_oneinit_tiles
,
.
oneinit_sm_id
=
gm200_gr_oneinit_sm_id
,
.
init
=
gf100_gr_init
,
.
init_419bd8
=
gv100_gr_init_419bd8
,
.
init_gpc_mmu
=
tu102_gr_init_gpc_mmu
,
.
init_vsc_stream_master
=
gk104_gr_init_vsc_stream_master
,
.
init_zcull
=
tu102_gr_init_zcull
,
.
init_num_active_ltcs
=
gf100_gr_init_num_active_ltcs
,
.
init_rop_active_fbps
=
gp100_gr_init_rop_active_fbps
,
.
init_swdx_pes_mask
=
gp102_gr_init_swdx_pes_mask
,
.
init_fs
=
tu102_gr_init_fs
,
.
init_fecs_exceptions
=
tu102_gr_init_fecs_exceptions
,
.
init_ds_hww_esr_2
=
gm200_gr_init_ds_hww_esr_2
,
.
init_sked_hww_esr
=
gk104_gr_init_sked_hww_esr
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
init_504430
=
gv100_gr_init_504430
,
.
init_shader_exceptions
=
gv100_gr_init_shader_exceptions
,
.
trap_mp
=
gv100_gr_trap_mp
,
.
rops
=
gm200_gr_rops
,
.
gpc_nr
=
6
,
.
tpc_nr
=
5
,
.
ppc_nr
=
3
,
.
grctx
=
&
tu102_grctx
,
.
zbc
=
&
gp102_gr_zbc
,
.
sclass
=
{
{
-
1
,
-
1
,
FERMI_TWOD_A
},
{
-
1
,
-
1
,
KEPLER_INLINE_TO_MEMORY_B
},
{
-
1
,
-
1
,
TURING_A
,
&
gf100_fermi
},
{
-
1
,
-
1
,
TURING_COMPUTE_A
},
{}
}
};
MODULE_FIRMWARE
(
"nvidia/tu102/gr/fecs_bl.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/fecs_inst.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/fecs_data.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/fecs_sig.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/gpccs_bl.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/gpccs_inst.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/gpccs_data.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/gpccs_sig.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/sw_ctx.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/sw_nonctx.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/sw_bundle_init.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu102/gr/sw_method_init.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/fecs_bl.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/fecs_inst.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/fecs_data.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/fecs_sig.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/gpccs_bl.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/gpccs_inst.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/gpccs_data.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/gpccs_sig.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/sw_ctx.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/sw_nonctx.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/sw_bundle_init.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu104/gr/sw_method_init.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/fecs_bl.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/fecs_inst.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/fecs_data.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/fecs_sig.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/gpccs_bl.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/gpccs_inst.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/gpccs_data.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/gpccs_sig.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/sw_ctx.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/sw_nonctx.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/sw_bundle_init.bin"
);
MODULE_FIRMWARE
(
"nvidia/tu106/gr/sw_method_init.bin"
);
static
const
struct
gf100_gr_fwif
tu102_gr_fwif
[]
=
{
{
0
,
gm200_gr_load
,
&
tu102_gr
,
&
gp108_gr_fecs_acr
,
&
gp108_gr_gpccs_acr
},
{}
};
int
tu102_gr_new
(
struct
nvkm_device
*
device
,
int
index
,
struct
nvkm_gr
**
pgr
)
{
return
gf100_gr_new_
(
tu102_gr_fwif
,
device
,
index
,
pgr
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录