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
8f6a5ab9
Commit
8f6a5ab9
authored
Nov 18, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios/perf: pointers are 32-bit
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
5764ff60
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
14 deletions
+16
-14
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h
+3
-3
drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c
+11
-11
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c
+2
-0
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/perf.h
View file @
8f6a5ab9
#ifndef __NVBIOS_PERF_H__
#ifndef __NVBIOS_PERF_H__
#define __NVBIOS_PERF_H__
#define __NVBIOS_PERF_H__
u
16
nvbios_perf_table
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u
32
nvbios_perf_table
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
);
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
);
struct
nvbios_perfE
{
struct
nvbios_perfE
{
...
@@ -17,9 +17,9 @@ struct nvbios_perfE {
...
@@ -17,9 +17,9 @@ struct nvbios_perfE {
u8
pcie_width
;
u8
pcie_width
;
};
};
u
16
nvbios_perf_entry
(
struct
nvkm_bios
*
,
int
idx
,
u
32
nvbios_perf_entry
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u
16
nvbios_perfEp
(
struct
nvkm_bios
*
,
int
idx
,
u
32
nvbios_perfEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_perfE
*
);
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_perfE
*
);
struct
nvbios_perfS
{
struct
nvbios_perfS
{
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/bios/perf.c
View file @
8f6a5ab9
...
@@ -26,16 +26,16 @@
...
@@ -26,16 +26,16 @@
#include <subdev/bios/perf.h>
#include <subdev/bios/perf.h>
#include <subdev/pci.h>
#include <subdev/pci.h>
u
16
u
32
nvbios_perf_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
nvbios_perf_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
)
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
)
{
{
struct
bit_entry
bit_P
;
struct
bit_entry
bit_P
;
u
16
perf
=
0x000
0
;
u
32
perf
=
0
;
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
bit_P
.
version
<=
2
)
{
if
(
bit_P
.
version
<=
2
)
{
perf
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0
);
perf
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0
);
if
(
perf
)
{
if
(
perf
)
{
*
ver
=
nvbios_rd08
(
bios
,
perf
+
0
);
*
ver
=
nvbios_rd08
(
bios
,
perf
+
0
);
*
hdr
=
nvbios_rd08
(
bios
,
perf
+
1
);
*
hdr
=
nvbios_rd08
(
bios
,
perf
+
1
);
...
@@ -72,15 +72,15 @@ nvbios_perf_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr,
...
@@ -72,15 +72,15 @@ nvbios_perf_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr,
}
}
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_perf_entry
(
struct
nvkm_bios
*
bios
,
int
idx
,
nvbios_perf_entry
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
{
u8
snr
,
ssz
;
u8
snr
,
ssz
;
u
16
perf
=
nvbios_perf_table
(
bios
,
ver
,
hdr
,
cnt
,
len
,
&
snr
,
&
ssz
);
u
32
perf
=
nvbios_perf_table
(
bios
,
ver
,
hdr
,
cnt
,
len
,
&
snr
,
&
ssz
);
if
(
perf
&&
idx
<
*
cnt
)
{
if
(
perf
&&
idx
<
*
cnt
)
{
perf
=
perf
+
*
hdr
+
(
idx
*
(
*
len
+
(
snr
*
ssz
)));
perf
=
perf
+
*
hdr
+
(
idx
*
(
*
len
+
(
snr
*
ssz
)));
*
hdr
=
*
len
;
*
hdr
=
*
len
;
...
@@ -88,14 +88,14 @@ nvbios_perf_entry(struct nvkm_bios *bios, int idx,
...
@@ -88,14 +88,14 @@ nvbios_perf_entry(struct nvkm_bios *bios, int idx,
*
len
=
ssz
;
*
len
=
ssz
;
return
perf
;
return
perf
;
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_perfEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
nvbios_perfEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_perfE
*
info
)
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_perfE
*
info
)
{
{
u
16
perf
=
nvbios_perf_entry
(
bios
,
idx
,
ver
,
hdr
,
cnt
,
len
);
u
32
perf
=
nvbios_perf_entry
(
bios
,
idx
,
ver
,
hdr
,
cnt
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
memset
(
info
,
0x00
,
sizeof
(
*
info
));
info
->
pstate
=
nvbios_rd08
(
bios
,
perf
+
0x00
);
info
->
pstate
=
nvbios_rd08
(
bios
,
perf
+
0x00
);
switch
(
!!
perf
*
*
ver
)
{
switch
(
!!
perf
*
*
ver
)
{
...
@@ -163,7 +163,7 @@ nvbios_perfEp(struct nvkm_bios *bios, int idx,
...
@@ -163,7 +163,7 @@ nvbios_perfEp(struct nvkm_bios *bios, int idx,
info
->
pcie_width
=
0xff
;
info
->
pcie_width
=
0xff
;
break
;
break
;
default:
default:
return
0
x0000
;
return
0
;
}
}
return
perf
;
return
perf
;
}
}
...
@@ -202,7 +202,7 @@ nvbios_perf_fan_parse(struct nvkm_bios *bios,
...
@@ -202,7 +202,7 @@ nvbios_perf_fan_parse(struct nvkm_bios *bios,
struct
nvbios_perf_fan
*
fan
)
struct
nvbios_perf_fan
*
fan
)
{
{
u8
ver
,
hdr
,
cnt
,
len
,
snr
,
ssz
;
u8
ver
,
hdr
,
cnt
,
len
,
snr
,
ssz
;
u
16
perf
=
nvbios_perf_table
(
bios
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
snr
,
&
ssz
);
u
32
perf
=
nvbios_perf_table
(
bios
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
snr
,
&
ssz
);
if
(
!
perf
)
if
(
!
perf
)
return
-
ENODEV
;
return
-
ENODEV
;
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/devinit/gm200.c
View file @
8f6a5ab9
...
@@ -130,6 +130,7 @@ gm200_devinit_post(struct nvkm_devinit *base, bool post)
...
@@ -130,6 +130,7 @@ gm200_devinit_post(struct nvkm_devinit *base, bool post)
/* upload first chunk of init data */
/* upload first chunk of init data */
if
(
post
)
{
if
(
post
)
{
// devinit tables
u32
pmu
=
pmu_args
(
init
,
args
+
0x08
,
0x08
);
u32
pmu
=
pmu_args
(
init
,
args
+
0x08
,
0x08
);
u32
img
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x14
);
u32
img
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x14
);
u32
len
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x16
);
u32
len
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x16
);
...
@@ -138,6 +139,7 @@ gm200_devinit_post(struct nvkm_devinit *base, bool post)
...
@@ -138,6 +139,7 @@ gm200_devinit_post(struct nvkm_devinit *base, bool post)
/* upload second chunk of init data */
/* upload second chunk of init data */
if
(
post
)
{
if
(
post
)
{
// devinit boot scripts
u32
pmu
=
pmu_args
(
init
,
args
+
0x08
,
0x10
);
u32
pmu
=
pmu_args
(
init
,
args
+
0x08
,
0x10
);
u32
img
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x18
);
u32
img
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x18
);
u32
len
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x1a
);
u32
len
=
nvbios_rd16
(
bios
,
bit_I
.
offset
+
0x1a
);
...
...
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