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
9a334cd0
Commit
9a334cd0
authored
Oct 09, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios: fix shadowing of ACPI ROMs larger than 64KiB
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
b9f10852
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
+10
-11
No files found.
drivers/gpu/drm/nouveau/core/subdev/bios/base.c
View file @
9a334cd0
...
...
@@ -185,23 +185,22 @@ static void
nouveau_bios_shadow_acpi
(
struct
nouveau_bios
*
bios
)
{
struct
pci_dev
*
pdev
=
nv_device
(
bios
)
->
pdev
;
int
cnt
=
65536
/
4096
;
int
ret
;
int
ret
,
cnt
,
i
;
u8
data
[
3
]
;
if
(
!
nouveau_acpi_rom_supported
(
pdev
))
return
;
bios
->
data
=
kmalloc
(
65536
,
GFP_KERNEL
);
bios
->
size
=
0
;
if
(
!
bios
->
data
)
return
;
while
(
cnt
--
)
{
ret
=
nouveau_acpi_get_bios_chunk
(
bios
->
data
,
bios
->
size
,
4096
);
if
(
ret
!=
4096
)
return
;
if
(
nouveau_acpi_get_bios_chunk
(
data
,
0
,
3
)
==
3
)
bios
->
size
=
data
[
2
]
*
512
;
bios
->
size
+=
4096
;
bios
->
data
=
kmalloc
(
bios
->
size
,
GFP_KERNEL
);
for
(
i
=
0
;
bios
->
data
&&
i
<
bios
->
size
;
i
+=
cnt
)
{
cnt
=
min
((
bios
->
size
-
i
),
(
u32
)
4096
);
ret
=
nouveau_acpi_get_bios_chunk
(
bios
->
data
,
i
,
cnt
);
if
(
ret
!=
cnt
)
break
;
}
}
...
...
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