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
0f78acc8
Commit
0f78acc8
authored
May 08, 2018
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/gr/gf100-: implement another chunk of bios-provided init
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
429412e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-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
+1
-0
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
+28
-0
No files found.
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c
View file @
0f78acc8
...
@@ -1999,6 +1999,8 @@ gf100_gr_init(struct gf100_gr *gr)
...
@@ -1999,6 +1999,8 @@ gf100_gr_init(struct gf100_gr *gr)
gr
->
func
->
init_num_active_ltcs
(
gr
);
gr
->
func
->
init_num_active_ltcs
(
gr
);
if
(
gr
->
func
->
init_rop_active_fbps
)
if
(
gr
->
func
->
init_rop_active_fbps
)
gr
->
func
->
init_rop_active_fbps
(
gr
);
gr
->
func
->
init_rop_active_fbps
(
gr
);
if
(
gr
->
func
->
init_bios_2
)
gr
->
func
->
init_bios_2
(
gr
);
nvkm_wr32
(
device
,
0x400500
,
0x00010001
);
nvkm_wr32
(
device
,
0x400500
,
0x00010001
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h
View file @
0f78acc8
...
@@ -128,6 +128,7 @@ struct gf100_gr_func {
...
@@ -128,6 +128,7 @@ struct gf100_gr_func {
void
(
*
init_zcull
)(
struct
gf100_gr
*
);
void
(
*
init_zcull
)(
struct
gf100_gr
*
);
void
(
*
init_num_active_ltcs
)(
struct
gf100_gr
*
);
void
(
*
init_num_active_ltcs
)(
struct
gf100_gr
*
);
void
(
*
init_rop_active_fbps
)(
struct
gf100_gr
*
);
void
(
*
init_rop_active_fbps
)(
struct
gf100_gr
*
);
void
(
*
init_bios_2
)(
struct
gf100_gr
*
);
void
(
*
init_ppc_exceptions
)(
struct
gf100_gr
*
);
void
(
*
init_ppc_exceptions
)(
struct
gf100_gr
*
);
void
(
*
init_swdx_pes_mask
)(
struct
gf100_gr
*
);
void
(
*
init_swdx_pes_mask
)(
struct
gf100_gr
*
);
void
(
*
set_hww_esr_report_mask
)(
struct
gf100_gr
*
);
void
(
*
set_hww_esr_report_mask
)(
struct
gf100_gr
*
);
...
...
drivers/gpu/drm/nouveau/nvkm/engine/gr/gm107.c
View file @
0f78acc8
...
@@ -25,6 +25,8 @@
...
@@ -25,6 +25,8 @@
#include "ctxgf100.h"
#include "ctxgf100.h"
#include <subdev/bios.h>
#include <subdev/bios.h>
#include <subdev/bios/bit.h>
#include <subdev/bios/init.h>
#include <subdev/bios/P0260.h>
#include <subdev/bios/P0260.h>
#include <subdev/fb.h>
#include <subdev/fb.h>
...
@@ -279,6 +281,31 @@ gm107_gr_pack_mmio[] = {
...
@@ -279,6 +281,31 @@ gm107_gr_pack_mmio[] = {
* PGRAPH engine/subdev functions
* PGRAPH engine/subdev functions
******************************************************************************/
******************************************************************************/
static
void
gm107_gr_init_bios_2
(
struct
gf100_gr
*
gr
)
{
struct
nvkm_subdev
*
subdev
=
&
gr
->
base
.
engine
.
subdev
;
struct
nvkm_device
*
device
=
subdev
->
device
;
struct
nvkm_bios
*
bios
=
device
->
bios
;
struct
bit_entry
bit_P
;
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
)
&&
bit_P
.
version
==
2
&&
bit_P
.
length
>=
0x2c
)
{
u32
data
=
nvbios_rd32
(
bios
,
bit_P
.
offset
+
0x28
);
if
(
data
)
{
u8
ver
=
nvbios_rd08
(
bios
,
data
+
0x00
);
u8
hdr
=
nvbios_rd08
(
bios
,
data
+
0x01
);
if
(
ver
==
0x20
&&
hdr
>=
8
)
{
data
=
nvbios_rd32
(
bios
,
data
+
0x04
);
if
(
data
)
{
u32
save
=
nvkm_rd32
(
device
,
0x619444
);
nvbios_init
(
subdev
,
data
);
nvkm_wr32
(
device
,
0x619444
,
save
);
}
}
}
}
}
void
void
gm107_gr_init_bios
(
struct
gf100_gr
*
gr
)
gm107_gr_init_bios
(
struct
gf100_gr
*
gr
)
{
{
...
@@ -427,6 +454,7 @@ gm107_gr = {
...
@@ -427,6 +454,7 @@ gm107_gr = {
.
init_zcull
=
gf117_gr_init_zcull
,
.
init_zcull
=
gf117_gr_init_zcull
,
.
init_num_active_ltcs
=
gf100_gr_init_num_active_ltcs
,
.
init_num_active_ltcs
=
gf100_gr_init_num_active_ltcs
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_rop_active_fbps
=
gk104_gr_init_rop_active_fbps
,
.
init_bios_2
=
gm107_gr_init_bios_2
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
init_ppc_exceptions
=
gk104_gr_init_ppc_exceptions
,
.
mmio
=
gm107_gr_pack_mmio
,
.
mmio
=
gm107_gr_pack_mmio
,
.
fecs
.
ucode
=
&
gm107_gr_fecs_ucode
,
.
fecs
.
ucode
=
&
gm107_gr_fecs_ucode
,
...
...
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