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
ff535412
Commit
ff535412
authored
Nov 18, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios/volt: pointers are 32-bit
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
60fb7064
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
17 deletions
+17
-17
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h
+4
-4
drivers/gpu/drm/nouveau/nvkm/subdev/bios/volt.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/volt.c
+12
-12
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/volt.h
View file @
ff535412
...
...
@@ -22,8 +22,8 @@ struct nvbios_volt {
u32
pwm_range
;
};
u
16
nvbios_volt_table
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u
16
nvbios_volt_parse
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u
32
nvbios_volt_table
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u
32
nvbios_volt_parse
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_volt
*
);
struct
nvbios_volt_entry
{
...
...
@@ -31,7 +31,7 @@ struct nvbios_volt_entry {
u8
vid
;
};
u
16
nvbios_volt_entry
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
);
u
16
nvbios_volt_entry_parse
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
,
u
32
nvbios_volt_entry
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
);
u
32
nvbios_volt_entry_parse
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
,
struct
nvbios_volt_entry
*
);
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/bios/volt.c
View file @
ff535412
...
...
@@ -25,18 +25,18 @@
#include <subdev/bios/bit.h>
#include <subdev/bios/volt.h>
u
16
u
32
nvbios_volt_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
struct
bit_entry
bit_P
;
u
16
volt
=
0x000
0
;
u
32
volt
=
0
;
if
(
!
bit_entry
(
bios
,
'P'
,
&
bit_P
))
{
if
(
bit_P
.
version
==
2
)
volt
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0x0c
);
volt
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0x0c
);
else
if
(
bit_P
.
version
==
1
)
volt
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0x10
);
volt
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0x10
);
if
(
volt
)
{
*
ver
=
nvbios_rd08
(
bios
,
volt
+
0
);
...
...
@@ -62,14 +62,14 @@ nvbios_volt_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
}
}
return
0
x0000
;
return
0
;
}
u
16
u
32
nvbios_volt_parse
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_volt
*
info
)
{
u
16
volt
=
nvbios_volt_table
(
bios
,
ver
,
hdr
,
cnt
,
len
);
u
32
volt
=
nvbios_volt_table
(
bios
,
ver
,
hdr
,
cnt
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
switch
(
!!
volt
*
*
ver
)
{
case
0x12
:
...
...
@@ -119,23 +119,23 @@ nvbios_volt_parse(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
return
volt
;
}
u
16
u
32
nvbios_volt_entry
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
len
)
{
u8
hdr
,
cnt
;
u
16
volt
=
nvbios_volt_table
(
bios
,
ver
,
&
hdr
,
&
cnt
,
len
);
u
32
volt
=
nvbios_volt_table
(
bios
,
ver
,
&
hdr
,
&
cnt
,
len
);
if
(
volt
&&
idx
<
cnt
)
{
volt
=
volt
+
hdr
+
(
idx
*
*
len
);
return
volt
;
}
return
0
x0000
;
return
0
;
}
u
16
u
32
nvbios_volt_entry_parse
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
len
,
struct
nvbios_volt_entry
*
info
)
{
u
16
volt
=
nvbios_volt_entry
(
bios
,
idx
,
ver
,
len
);
u
32
volt
=
nvbios_volt_entry
(
bios
,
idx
,
ver
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
switch
(
!!
volt
*
*
ver
)
{
case
0x12
:
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
View file @
ff535412
...
...
@@ -189,7 +189,7 @@ nvkm_volt_parse_bios(struct nvkm_bios *bios, struct nvkm_volt *volt)
struct
nvbios_volt_entry
ivid
;
struct
nvbios_volt
info
;
u8
ver
,
hdr
,
cnt
,
len
;
u
16
data
;
u
32
data
;
int
i
;
data
=
nvbios_volt_parse
(
bios
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
,
&
info
);
...
...
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