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
Kirill Smelkov
linux
Commits
223eaf4b
Commit
223eaf4b
authored
Nov 01, 2017
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/gr/gf100-gk208: make use of init_gpc_mmu() hook to share setup
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
2854ab8d
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
29 additions
and
20 deletions
+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
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
View file @
223eaf4b
...
...
@@ -1903,25 +1903,33 @@ gf100_gr_new_(const struct gf100_gr_func *func, struct nvkm_device *device,
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
gf100_gr_init
(
struct
gf100_gr
*
gr
)
{
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
);
u32
data
[
TPC_MAX
/
8
]
=
{};
u8
tpcnr
[
GPC_MAX
];
int
gpc
,
tpc
,
rop
;
int
i
;
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0880
),
0x00000000
);
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
);
gr
->
func
->
init_gpc_mmu
(
gr
);
gf100_gr_mmio
(
gr
,
gr
->
func
->
mmio
);
...
...
@@ -2036,6 +2044,7 @@ gf100_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
gf100_gr
=
{
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf100_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
View file @
223eaf4b
...
...
@@ -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_fe_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_tex_0
[];
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf104.c
View file @
223eaf4b
...
...
@@ -115,6 +115,7 @@ gf104_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
gf104_gr
=
{
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf104_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf108.c
View file @
223eaf4b
...
...
@@ -106,6 +106,7 @@ gf108_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
gf108_gr
=
{
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf108_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf110.c
View file @
223eaf4b
...
...
@@ -87,6 +87,7 @@ gf110_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
gf110_gr
=
{
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf110_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf117.c
View file @
223eaf4b
...
...
@@ -123,6 +123,7 @@ gf117_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
gf117_gr
=
{
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf117_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf117_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf117_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf119.c
View file @
223eaf4b
...
...
@@ -178,6 +178,7 @@ gf119_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
gf119_gr
=
{
.
init
=
gf100_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
mmio
=
gf119_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gf100_gr_fecs_ucode
,
.
gpccs
.
ucode
=
&
gf100_gr_gpccs_ucode
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk104.c
View file @
223eaf4b
...
...
@@ -24,8 +24,6 @@
#include "gf100.h"
#include "ctxgf100.h"
#include <subdev/fb.h>
#include <nvif/class.h>
/*******************************************************************************
...
...
@@ -207,21 +205,13 @@ int
gk104_gr_init
(
struct
gf100_gr
*
gr
)
{
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
);
u32
data
[
TPC_MAX
/
8
]
=
{};
u8
tpcnr
[
GPC_MAX
];
int
gpc
,
tpc
,
rop
;
int
i
;
nvkm_wr32
(
device
,
GPC_BCAST
(
0x0880
),
0x00000000
);
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
);
gr
->
func
->
init_gpc_mmu
(
gr
);
gf100_gr_mmio
(
gr
,
gr
->
func
->
mmio
);
...
...
@@ -339,6 +329,7 @@ gk104_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
gk104_gr
=
{
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk104_gr_pack_mmio
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110.c
View file @
223eaf4b
...
...
@@ -183,6 +183,7 @@ gk110_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
gk110_gr
=
{
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk110_gr_pack_mmio
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk110b.c
View file @
223eaf4b
...
...
@@ -103,6 +103,7 @@ gk110b_gr_pack_mmio[] = {
static
const
struct
gf100_gr_func
gk110b_gr
=
{
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk110b_gr_pack_mmio
,
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gk208.c
View file @
223eaf4b
...
...
@@ -162,6 +162,7 @@ gk208_gr_gpccs_ucode = {
static
const
struct
gf100_gr_func
gk208_gr
=
{
.
init
=
gk104_gr_init
,
.
init_gpc_mmu
=
gf100_gr_init_gpc_mmu
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gk208_gr_pack_mmio
,
...
...
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