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
acac7bdb
Commit
acac7bdb
authored
Sep 12, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios: check that fixed tvdac gpio data is valid before using it
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
da07e52c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
+11
-7
No files found.
drivers/gpu/drm/nouveau/core/subdev/bios/gpio.c
View file @
acac7bdb
...
...
@@ -100,13 +100,17 @@ dcb_gpio_parse(struct nouveau_bios *bios, int idx, u8 func, u8 line,
/* DCB 2.2, fixed TVDAC GPIO data */
if
((
entry
=
dcb_table
(
bios
,
&
ver
,
&
hdr
,
&
cnt
,
&
len
))
&&
ver
>=
0x22
)
{
if
(
func
==
DCB_GPIO_TVDAC0
)
{
*
gpio
=
(
struct
dcb_gpio_func
)
{
.
func
=
DCB_GPIO_TVDAC0
,
.
line
=
nv_ro08
(
bios
,
entry
-
4
)
>>
4
,
.
log
[
0
]
=
!!
(
nv_ro08
(
bios
,
entry
-
5
)
&
2
),
.
log
[
1
]
=
!
(
nv_ro08
(
bios
,
entry
-
5
)
&
2
),
};
return
0
;
u8
conf
=
nv_ro08
(
bios
,
entry
-
5
);
u8
addr
=
nv_ro08
(
bios
,
entry
-
4
);
if
(
conf
&
0x01
)
{
*
gpio
=
(
struct
dcb_gpio_func
)
{
.
func
=
DCB_GPIO_TVDAC0
,
.
line
=
addr
>>
4
,
.
log
[
0
]
=
!!
(
conf
&
0x02
),
.
log
[
1
]
=
!
(
conf
&
0x02
),
};
return
0
;
}
}
}
...
...
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