Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
201ed6f6
Commit
201ed6f6
authored
May 08, 2018
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/gr/gf100-: delete duplicated grctx init code
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
a5537f98
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
11 additions
and
152 deletions
+11
-152
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
+0
-2
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
+1
-31
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c
+1
-33
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk208.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk208.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
+1
-30
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c
+1
-26
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c
+1
-24
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp104.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp104.c
+1
-1
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp107.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp107.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h
View file @
201ed6f6
...
...
@@ -108,7 +108,6 @@ void gk104_grctx_generate_alpha_beta_tables(struct gf100_gr *);
void
gk104_grctx_generate_gpc_tpc_nr
(
struct
gf100_gr
*
);
extern
const
struct
gf100_grctx_func
gk20a_grctx
;
void
gk104_grctx_generate_main
(
struct
gf100_gr
*
,
struct
gf100_grctx
*
);
void
gk104_grctx_generate_bundle
(
struct
gf100_grctx
*
);
void
gk104_grctx_generate_pagepool
(
struct
gf100_grctx
*
);
void
gk104_grctx_generate_patch_ltc
(
struct
gf100_grctx
*
);
...
...
@@ -137,7 +136,6 @@ void gm200_grctx_generate_r419a3c(struct gf100_gr *);
extern
const
struct
gf100_grctx_func
gm20b_grctx
;
extern
const
struct
gf100_grctx_func
gp100_grctx
;
void
gp100_grctx_generate_main
(
struct
gf100_gr
*
,
struct
gf100_grctx
*
);
void
gp100_grctx_generate_pagepool
(
struct
gf100_grctx
*
);
void
gp100_grctx_generate_smid_config
(
struct
gf100_gr
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf117.c
View file @
201ed6f6
...
...
@@ -286,39 +286,9 @@ gf117_grctx_generate_attrib(struct gf100_grctx *info)
}
}
static
void
gf117_grctx_generate_main
(
struct
gf100_gr
*
gr
,
struct
gf100_grctx
*
info
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
const
struct
gf100_grctx_func
*
grctx
=
gr
->
func
->
grctx
;
u32
idle_timeout
;
nvkm_mc_unk260
(
device
,
0
);
gf100_gr_mmio
(
gr
,
grctx
->
hub
);
gf100_gr_mmio
(
gr
,
grctx
->
gpc
);
gf100_gr_mmio
(
gr
,
grctx
->
zcull
);
gf100_gr_mmio
(
gr
,
grctx
->
tpc
);
gf100_gr_mmio
(
gr
,
grctx
->
ppc
);
idle_timeout
=
nvkm_mask
(
device
,
0x404154
,
0xffffffff
,
0x00000000
);
grctx
->
bundle
(
info
);
grctx
->
pagepool
(
info
);
grctx
->
attrib
(
info
);
grctx
->
unkn
(
gr
);
gf100_grctx_generate_floorsweep
(
gr
);
gf100_gr_icmd
(
gr
,
grctx
->
icmd
);
nvkm_wr32
(
device
,
0x404154
,
idle_timeout
);
gf100_gr_mthd
(
gr
,
grctx
->
mthd
);
nvkm_mc_unk260
(
device
,
1
);
}
const
struct
gf100_grctx_func
gf117_grctx
=
{
.
main
=
gf1
17
_grctx_generate_main
,
.
main
=
gf1
00
_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
hub
=
gf117_grctx_pack_hub
,
.
gpc
=
gf117_grctx_pack_gpc
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk104.c
View file @
201ed6f6
...
...
@@ -921,38 +921,6 @@ gk104_grctx_generate_gpc_tpc_nr(struct gf100_gr *gr)
nvkm_wr32
(
device
,
0x405b00
,
(
gr
->
tpc_total
<<
8
)
|
gr
->
gpc_nr
);
}
void
gk104_grctx_generate_main
(
struct
gf100_gr
*
gr
,
struct
gf100_grctx
*
info
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
const
struct
gf100_grctx_func
*
grctx
=
gr
->
func
->
grctx
;
u32
idle_timeout
;
nvkm_mc_unk260
(
device
,
0
);
gf100_gr_mmio
(
gr
,
grctx
->
hub
);
gf100_gr_mmio
(
gr
,
grctx
->
gpc
);
gf100_gr_mmio
(
gr
,
grctx
->
zcull
);
gf100_gr_mmio
(
gr
,
grctx
->
tpc
);
gf100_gr_mmio
(
gr
,
grctx
->
ppc
);
idle_timeout
=
nvkm_mask
(
device
,
0x404154
,
0xffffffff
,
0x00000000
);
grctx
->
bundle
(
info
);
grctx
->
pagepool
(
info
);
grctx
->
attrib
(
info
);
grctx
->
unkn
(
gr
);
gf100_grctx_generate_floorsweep
(
gr
);
gf100_gr_icmd
(
gr
,
grctx
->
icmd
);
nvkm_wr32
(
device
,
0x404154
,
idle_timeout
);
gf100_gr_mthd
(
gr
,
grctx
->
mthd
);
nvkm_mc_unk260
(
device
,
1
);
grctx
->
r418800
(
gr
);
}
void
gk104_grctx_generate_alpha_beta_tables
(
struct
gf100_gr
*
gr
)
{
...
...
@@ -1002,7 +970,7 @@ gk104_grctx_generate_alpha_beta_tables(struct gf100_gr *gr)
const
struct
gf100_grctx_func
gk104_grctx
=
{
.
main
=
g
k104
_grctx_generate_main
,
.
main
=
g
f100
_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
hub
=
gk104_grctx_pack_hub
,
.
gpc
=
gk104_grctx_pack_gpc
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110.c
View file @
201ed6f6
...
...
@@ -817,7 +817,7 @@ gk110_grctx_generate_r419eb0(struct gf100_gr *gr)
const
struct
gf100_grctx_func
gk110_grctx
=
{
.
main
=
g
k104
_grctx_generate_main
,
.
main
=
g
f100
_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
hub
=
gk110_grctx_pack_hub
,
.
gpc
=
gk110_grctx_pack_gpc
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk110b.c
View file @
201ed6f6
...
...
@@ -71,7 +71,7 @@ gk110b_grctx_pack_tpc[] = {
const
struct
gf100_grctx_func
gk110b_grctx
=
{
.
main
=
g
k104
_grctx_generate_main
,
.
main
=
g
f100
_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
hub
=
gk110_grctx_pack_hub
,
.
gpc
=
gk110_grctx_pack_gpc
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgk208.c
View file @
201ed6f6
...
...
@@ -532,7 +532,7 @@ gk208_grctx_pack_ppc[] = {
const
struct
gf100_grctx_func
gk208_grctx
=
{
.
main
=
g
k104
_grctx_generate_main
,
.
main
=
g
f100
_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
hub
=
gk208_grctx_pack_hub
,
.
gpc
=
gk208_grctx_pack_gpc
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c
View file @
201ed6f6
...
...
@@ -955,38 +955,9 @@ gm107_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
gm107_grctx_generate_main
(
struct
gf100_gr
*
gr
,
struct
gf100_grctx
*
info
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
const
struct
gf100_grctx_func
*
grctx
=
gr
->
func
->
grctx
;
u32
idle_timeout
;
gf100_gr_mmio
(
gr
,
grctx
->
hub
);
gf100_gr_mmio
(
gr
,
grctx
->
gpc
);
gf100_gr_mmio
(
gr
,
grctx
->
zcull
);
gf100_gr_mmio
(
gr
,
grctx
->
tpc
);
gf100_gr_mmio
(
gr
,
grctx
->
ppc
);
idle_timeout
=
nvkm_mask
(
device
,
0x404154
,
0xffffffff
,
0x00000000
);
grctx
->
bundle
(
info
);
grctx
->
pagepool
(
info
);
grctx
->
attrib
(
info
);
grctx
->
unkn
(
gr
);
gf100_grctx_generate_floorsweep
(
gr
);
gf100_gr_icmd
(
gr
,
grctx
->
icmd
);
nvkm_wr32
(
device
,
0x404154
,
idle_timeout
);
gf100_gr_mthd
(
gr
,
grctx
->
mthd
);
grctx
->
r419e00
(
gr
);
}
const
struct
gf100_grctx_func
gm107_grctx
=
{
.
main
=
g
m107
_grctx_generate_main
,
.
main
=
g
f100
_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
hub
=
gm107_grctx_pack_hub
,
.
gpc
=
gm107_grctx_pack_gpc
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm200.c
View file @
201ed6f6
...
...
@@ -89,31 +89,6 @@ gm200_grctx_generate_r406500(struct gf100_gr *gr)
nvkm_wr32
(
gr
->
base
.
engine
.
subdev
.
device
,
0x406500
,
0x00000000
);
}
static
void
gm200_grctx_generate_main
(
struct
gf100_gr
*
gr
,
struct
gf100_grctx
*
info
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
const
struct
gf100_grctx_func
*
grctx
=
gr
->
func
->
grctx
;
u32
idle_timeout
;
gf100_gr_mmio
(
gr
,
gr
->
fuc_sw_ctx
);
idle_timeout
=
nvkm_mask
(
device
,
0x404154
,
0xffffffff
,
0x00000000
);
grctx
->
bundle
(
info
);
grctx
->
pagepool
(
info
);
grctx
->
attrib
(
info
);
grctx
->
unkn
(
gr
);
gf100_grctx_generate_floorsweep
(
gr
);
gf100_gr_icmd
(
gr
,
gr
->
fuc_bundle
);
nvkm_wr32
(
device
,
0x404154
,
idle_timeout
);
gf100_gr_mthd
(
gr
,
gr
->
fuc_method
);
grctx
->
r418e94
(
gr
);
}
void
gm200_grctx_generate_dist_skip_table
(
struct
gf100_gr
*
gr
)
{
...
...
@@ -138,7 +113,7 @@ gm200_grctx_generate_dist_skip_table(struct gf100_gr *gr)
const
struct
gf100_grctx_func
gm200_grctx
=
{
.
main
=
g
m2
00_grctx_generate_main
,
.
main
=
g
f1
00_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
bundle
=
gm107_grctx_generate_bundle
,
.
bundle_size
=
0x3000
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp100.c
View file @
201ed6f6
...
...
@@ -120,32 +120,9 @@ gp100_grctx_generate_smid_config(struct gf100_gr *gr)
nvkm_wr32
(
device
,
0x405ba0
+
(
i
*
4
),
gpcs
[
i
]);
}
void
gp100_grctx_generate_main
(
struct
gf100_gr
*
gr
,
struct
gf100_grctx
*
info
)
{
struct
nvkm_device
*
device
=
gr
->
base
.
engine
.
subdev
.
device
;
const
struct
gf100_grctx_func
*
grctx
=
gr
->
func
->
grctx
;
u32
idle_timeout
;
gf100_gr_mmio
(
gr
,
gr
->
fuc_sw_ctx
);
idle_timeout
=
nvkm_mask
(
device
,
0x404154
,
0xffffffff
,
0x00000000
);
grctx
->
pagepool
(
info
);
grctx
->
bundle
(
info
);
grctx
->
attrib
(
info
);
grctx
->
unkn
(
gr
);
gf100_grctx_generate_floorsweep
(
gr
);
gf100_gr_icmd
(
gr
,
gr
->
fuc_bundle
);
nvkm_wr32
(
device
,
0x404154
,
idle_timeout
);
gf100_gr_mthd
(
gr
,
gr
->
fuc_method
);
}
const
struct
gf100_grctx_func
gp100_grctx
=
{
.
main
=
g
p
100_grctx_generate_main
,
.
main
=
g
f
100_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
bundle
=
gm107_grctx_generate_bundle
,
.
bundle_size
=
0x3000
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp102.c
View file @
201ed6f6
...
...
@@ -88,7 +88,7 @@ gp102_grctx_generate_attrib(struct gf100_grctx *info)
const
struct
gf100_grctx_func
gp102_grctx
=
{
.
main
=
g
p
100_grctx_generate_main
,
.
main
=
g
f
100_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
bundle
=
gm107_grctx_generate_bundle
,
.
bundle_size
=
0x3000
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp104.c
View file @
201ed6f6
...
...
@@ -23,7 +23,7 @@
const
struct
gf100_grctx_func
gp104_grctx
=
{
.
main
=
g
p
100_grctx_generate_main
,
.
main
=
g
f
100_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
bundle
=
gm107_grctx_generate_bundle
,
.
bundle_size
=
0x3000
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgp107.c
View file @
201ed6f6
...
...
@@ -31,7 +31,7 @@
const
struct
gf100_grctx_func
gp107_grctx
=
{
.
main
=
g
p
100_grctx_generate_main
,
.
main
=
g
f
100_grctx_generate_main
,
.
unkn
=
gk104_grctx_generate_unkn
,
.
bundle
=
gm107_grctx_generate_bundle
,
.
bundle_size
=
0x3000
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment