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
60fb7064
Commit
60fb7064
authored
Nov 18, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios/vmap: pointers are 32-bit
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
1957d3d5
Changes
3
Hide 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/vmap.h
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h
+4
-4
drivers/gpu/drm/nouveau/nvkm/subdev/bios/vmap.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/vmap.c
+11
-11
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
+2
-2
No files found.
drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/vmap.h
View file @
60fb7064
...
@@ -6,8 +6,8 @@ struct nvbios_vmap {
...
@@ -6,8 +6,8 @@ struct nvbios_vmap {
u8
max2
;
u8
max2
;
};
};
u
16
nvbios_vmap_table
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u
32
nvbios_vmap_table
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u
16
nvbios_vmap_parse
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
u
32
nvbios_vmap_parse
(
struct
nvkm_bios
*
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_vmap
*
);
struct
nvbios_vmap
*
);
struct
nvbios_vmap_entry
{
struct
nvbios_vmap_entry
{
...
@@ -18,7 +18,7 @@ struct nvbios_vmap_entry {
...
@@ -18,7 +18,7 @@ struct nvbios_vmap_entry {
s32
arg
[
6
];
s32
arg
[
6
];
};
};
u
16
nvbios_vmap_entry
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
);
u
32
nvbios_vmap_entry
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
);
u
16
nvbios_vmap_entry_parse
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
,
u
32
nvbios_vmap_entry_parse
(
struct
nvkm_bios
*
,
int
idx
,
u8
*
ver
,
u8
*
len
,
struct
nvbios_vmap_entry
*
);
struct
nvbios_vmap_entry
*
);
#endif
#endif
drivers/gpu/drm/nouveau/nvkm/subdev/bios/vmap.c
View file @
60fb7064
...
@@ -25,15 +25,15 @@
...
@@ -25,15 +25,15 @@
#include <subdev/bios/bit.h>
#include <subdev/bios/bit.h>
#include <subdev/bios/vmap.h>
#include <subdev/bios/vmap.h>
u
16
u
32
nvbios_vmap_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
nvbios_vmap_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
{
struct
bit_entry
bit_P
;
struct
bit_entry
bit_P
;
u
16
vmap
=
0x000
0
;
u
32
vmap
=
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
)
{
vmap
=
nvbios_rd
16
(
bios
,
bit_P
.
offset
+
0x20
);
vmap
=
nvbios_rd
32
(
bios
,
bit_P
.
offset
+
0x20
);
if
(
vmap
)
{
if
(
vmap
)
{
*
ver
=
nvbios_rd08
(
bios
,
vmap
+
0
);
*
ver
=
nvbios_rd08
(
bios
,
vmap
+
0
);
switch
(
*
ver
)
{
switch
(
*
ver
)
{
...
@@ -50,14 +50,14 @@ nvbios_vmap_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
...
@@ -50,14 +50,14 @@ nvbios_vmap_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
}
}
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_vmap_parse
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
nvbios_vmap_parse
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_vmap
*
info
)
struct
nvbios_vmap
*
info
)
{
{
u
16
vmap
=
nvbios_vmap_table
(
bios
,
ver
,
hdr
,
cnt
,
len
);
u
32
vmap
=
nvbios_vmap_table
(
bios
,
ver
,
hdr
,
cnt
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
memset
(
info
,
0x00
,
sizeof
(
*
info
));
switch
(
!!
vmap
*
*
ver
)
{
switch
(
!!
vmap
*
*
ver
)
{
case
0x10
:
case
0x10
:
...
@@ -77,23 +77,23 @@ nvbios_vmap_parse(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
...
@@ -77,23 +77,23 @@ nvbios_vmap_parse(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len,
return
vmap
;
return
vmap
;
}
}
u
16
u
32
nvbios_vmap_entry
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
len
)
nvbios_vmap_entry
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
len
)
{
{
u8
hdr
,
cnt
;
u8
hdr
,
cnt
;
u
16
vmap
=
nvbios_vmap_table
(
bios
,
ver
,
&
hdr
,
&
cnt
,
len
);
u
32
vmap
=
nvbios_vmap_table
(
bios
,
ver
,
&
hdr
,
&
cnt
,
len
);
if
(
vmap
&&
idx
<
cnt
)
{
if
(
vmap
&&
idx
<
cnt
)
{
vmap
=
vmap
+
hdr
+
(
idx
*
*
len
);
vmap
=
vmap
+
hdr
+
(
idx
*
*
len
);
return
vmap
;
return
vmap
;
}
}
return
0
x0000
;
return
0
;
}
}
u
16
u
32
nvbios_vmap_entry_parse
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
len
,
nvbios_vmap_entry_parse
(
struct
nvkm_bios
*
bios
,
int
idx
,
u8
*
ver
,
u8
*
len
,
struct
nvbios_vmap_entry
*
info
)
struct
nvbios_vmap_entry
*
info
)
{
{
u
16
vmap
=
nvbios_vmap_entry
(
bios
,
idx
,
ver
,
len
);
u
32
vmap
=
nvbios_vmap_entry
(
bios
,
idx
,
ver
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
memset
(
info
,
0x00
,
sizeof
(
*
info
));
switch
(
!!
vmap
*
*
ver
)
{
switch
(
!!
vmap
*
*
ver
)
{
case
0x10
:
case
0x10
:
...
...
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c
View file @
60fb7064
...
@@ -84,7 +84,7 @@ nvkm_volt_map_min(struct nvkm_volt *volt, u8 id)
...
@@ -84,7 +84,7 @@ nvkm_volt_map_min(struct nvkm_volt *volt, u8 id)
struct
nvkm_bios
*
bios
=
volt
->
subdev
.
device
->
bios
;
struct
nvkm_bios
*
bios
=
volt
->
subdev
.
device
->
bios
;
struct
nvbios_vmap_entry
info
;
struct
nvbios_vmap_entry
info
;
u8
ver
,
len
;
u8
ver
,
len
;
u
16
vmap
;
u
32
vmap
;
vmap
=
nvbios_vmap_entry_parse
(
bios
,
id
,
&
ver
,
&
len
,
&
info
);
vmap
=
nvbios_vmap_entry_parse
(
bios
,
id
,
&
ver
,
&
len
,
&
info
);
if
(
vmap
)
{
if
(
vmap
)
{
...
@@ -106,7 +106,7 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp)
...
@@ -106,7 +106,7 @@ nvkm_volt_map(struct nvkm_volt *volt, u8 id, u8 temp)
struct
nvkm_bios
*
bios
=
volt
->
subdev
.
device
->
bios
;
struct
nvkm_bios
*
bios
=
volt
->
subdev
.
device
->
bios
;
struct
nvbios_vmap_entry
info
;
struct
nvbios_vmap_entry
info
;
u8
ver
,
len
;
u8
ver
,
len
;
u
16
vmap
;
u
32
vmap
;
vmap
=
nvbios_vmap_entry_parse
(
bios
,
id
,
&
ver
,
&
len
,
&
info
);
vmap
=
nvbios_vmap_entry_parse
(
bios
,
id
,
&
ver
,
&
len
,
&
info
);
if
(
vmap
)
{
if
(
vmap
)
{
...
...
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