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
58786017
Commit
58786017
authored
Nov 18, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios/boost: pointers are 32-bit
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
ed828666
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
23 deletions
+23
-23
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
+6
-6
drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c
+15
-15
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/boost.h
View file @
58786017
#ifndef __NVBIOS_BOOST_H__
#define __NVBIOS_BOOST_H__
u
16
nvbios_boostTe
(
struct
nvkm_bios
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
u
32
nvbios_boostTe
(
struct
nvkm_bios
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
struct
nvbios_boostE
{
u8
pstate
;
...
...
@@ -8,10 +8,10 @@ struct nvbios_boostE {
u32
max
;
};
u
16
nvbios_boostEe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
u
16
nvbios_boostEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u
32
nvbios_boostEe
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
);
u
32
nvbios_boostEp
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
struct
nvbios_boostE
*
);
u
16
nvbios_boostEm
(
struct
nvkm_bios
*
,
u8
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
u
32
nvbios_boostEm
(
struct
nvkm_bios
*
,
u8
,
u8
*
,
u8
*
,
u8
*
,
u8
*
,
struct
nvbios_boostE
*
);
struct
nvbios_boostS
{
...
...
@@ -21,7 +21,7 @@ struct nvbios_boostS {
u32
max
;
};
u
16
nvbios_boostSe
(
struct
nvkm_bios
*
,
int
,
u16
,
u8
*
,
u8
*
,
u8
,
u8
);
u
16
nvbios_boostSp
(
struct
nvkm_bios
*
,
int
,
u16
,
u8
*
,
u8
*
,
u8
,
u8
,
u
32
nvbios_boostSe
(
struct
nvkm_bios
*
,
int
,
u32
,
u8
*
,
u8
*
,
u8
,
u8
);
u
32
nvbios_boostSp
(
struct
nvkm_bios
*
,
int
,
u32
,
u8
*
,
u8
*
,
u8
,
u8
,
struct
nvbios_boostS
*
);
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/bios/boost.c
View file @
58786017
...
...
@@ -25,16 +25,16 @@
#include <subdev/bios/bit.h>
#include <subdev/bios/boost.h>
u
16
u
32
nvbios_boostTe
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u8
*
snr
,
u8
*
ssz
)
{
struct
bit_entry
bit_P
;
u
16
boost
=
0x000
0
;
u
32
boost
=
0
;
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
bit_P
.
version
==
2
)
boost
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0x30
);
boost
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0x30
);
if
(
boost
)
{
*
ver
=
nvbios_rd08
(
bios
,
boost
+
0
);
...
...
@@ -52,15 +52,15 @@ nvbios_boostTe(struct nvkm_bios *bios,
}
}
return
0
x0000
;
return
0
;
}
u
16
u
32
nvbios_boostEe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
u8
snr
,
ssz
;
u
16
data
=
nvbios_boostTe
(
bios
,
ver
,
hdr
,
cnt
,
len
,
&
snr
,
&
ssz
);
u
32
data
=
nvbios_boostTe
(
bios
,
ver
,
hdr
,
cnt
,
len
,
&
snr
,
&
ssz
);
if
(
data
&&
idx
<
*
cnt
)
{
data
=
data
+
*
hdr
+
(
idx
*
(
*
len
+
(
snr
*
ssz
)));
*
hdr
=
*
len
;
...
...
@@ -68,14 +68,14 @@ nvbios_boostEe(struct nvkm_bios *bios, int idx,
*
len
=
ssz
;
return
data
;
}
return
0
x0000
;
return
0
;
}
u
16
u
32
nvbios_boostEp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_boostE
*
info
)
{
u
16
data
=
nvbios_boostEe
(
bios
,
idx
,
ver
,
hdr
,
cnt
,
len
);
u
32
data
=
nvbios_boostEe
(
bios
,
idx
,
ver
,
hdr
,
cnt
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
if
(
data
)
{
info
->
pstate
=
(
nvbios_rd16
(
bios
,
data
+
0x00
)
&
0x01e0
)
>>
5
;
...
...
@@ -85,7 +85,7 @@ nvbios_boostEp(struct nvkm_bios *bios, int idx,
return
data
;
}
u
16
u
32
nvbios_boostEm
(
struct
nvkm_bios
*
bios
,
u8
pstate
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_boostE
*
info
)
{
...
...
@@ -97,21 +97,21 @@ nvbios_boostEm(struct nvkm_bios *bios, u8 pstate,
return
data
;
}
u
16
u
32
nvbios_boostSe
(
struct
nvkm_bios
*
bios
,
int
idx
,
u
16
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
)
u
32
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
)
{
if
(
data
&&
idx
<
cnt
)
{
data
=
data
+
*
hdr
+
(
idx
*
len
);
*
hdr
=
len
;
return
data
;
}
return
0
x0000
;
return
0
;
}
u
16
u
32
nvbios_boostSp
(
struct
nvkm_bios
*
bios
,
int
idx
,
u
16
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
,
u
32
data
,
u8
*
ver
,
u8
*
hdr
,
u8
cnt
,
u8
len
,
struct
nvbios_boostS
*
info
)
{
data
=
nvbios_boostSe
(
bios
,
idx
,
data
,
ver
,
hdr
,
cnt
,
len
);
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/clk/base.c
View file @
58786017
...
...
@@ -44,13 +44,13 @@ nvkm_clk_adjust(struct nvkm_clk *clk, bool adjust,
struct
nvkm_bios
*
bios
=
clk
->
subdev
.
device
->
bios
;
struct
nvbios_boostE
boostE
;
u8
ver
,
hdr
,
cnt
,
len
;
u
16
data
;
u
32
data
;
data
=
nvbios_boostEm
(
bios
,
pstate
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
boostE
);
if
(
data
)
{
struct
nvbios_boostS
boostS
;
u8
idx
=
0
,
sver
,
shdr
;
u
16
subd
;
u
32
subd
;
input
=
max
(
boostE
.
min
,
input
);
input
=
min
(
boostE
.
max
,
input
);
...
...
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