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
4d3df19a
Commit
4d3df19a
authored
Apr 19, 2016
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios/pll: check BIT table version before trying to parse it
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
2781c928
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c
+6
-4
No files found.
drivers/gpu/drm/nouveau/nvkm/subdev/bios/pll.c
View file @
4d3df19a
...
@@ -81,9 +81,11 @@ static u16
...
@@ -81,9 +81,11 @@ static u16
pll_limits_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
pll_limits_table
(
struct
nvkm_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
{
struct
bit_entry
bit_C
;
struct
bit_entry
bit_C
;
u16
data
=
0x0000
;
if
(
!
bit_entry
(
bios
,
'C'
,
&
bit_C
)
&&
bit_C
.
length
>=
10
)
{
if
(
!
bit_entry
(
bios
,
'C'
,
&
bit_C
))
{
u16
data
=
nvbios_rd16
(
bios
,
bit_C
.
offset
+
8
);
if
(
bit_C
.
version
==
1
&&
bit_C
.
length
>=
10
)
data
=
nvbios_rd16
(
bios
,
bit_C
.
offset
+
8
);
if
(
data
)
{
if
(
data
)
{
*
ver
=
nvbios_rd08
(
bios
,
data
+
0
);
*
ver
=
nvbios_rd08
(
bios
,
data
+
0
);
*
hdr
=
nvbios_rd08
(
bios
,
data
+
1
);
*
hdr
=
nvbios_rd08
(
bios
,
data
+
1
);
...
@@ -94,7 +96,7 @@ pll_limits_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
...
@@ -94,7 +96,7 @@ pll_limits_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
}
}
if
(
bmp_version
(
bios
)
>=
0x0524
)
{
if
(
bmp_version
(
bios
)
>=
0x0524
)
{
u16
data
=
nvbios_rd16
(
bios
,
bios
->
bmp_offset
+
142
);
data
=
nvbios_rd16
(
bios
,
bios
->
bmp_offset
+
142
);
if
(
data
)
{
if
(
data
)
{
*
ver
=
nvbios_rd08
(
bios
,
data
+
0
);
*
ver
=
nvbios_rd08
(
bios
,
data
+
0
);
*
hdr
=
1
;
*
hdr
=
1
;
...
@@ -105,7 +107,7 @@ pll_limits_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
...
@@ -105,7 +107,7 @@ pll_limits_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
}
}
*
ver
=
0x00
;
*
ver
=
0x00
;
return
0x0000
;
return
data
;
}
}
static
struct
pll_mapping
*
static
struct
pll_mapping
*
...
...
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