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
299bee10
Commit
299bee10
authored
May 04, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios: fix some shadowing issues, particularly acpi
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
f51ee65c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+10
-20
No files found.
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
299bee10
...
@@ -196,35 +196,24 @@ static void
...
@@ -196,35 +196,24 @@ static void
bios_shadow_acpi
(
struct
nvbios
*
bios
)
bios_shadow_acpi
(
struct
nvbios
*
bios
)
{
{
struct
pci_dev
*
pdev
=
bios
->
dev
->
pdev
;
struct
pci_dev
*
pdev
=
bios
->
dev
->
pdev
;
int
ptr
,
len
,
ret
;
int
cnt
=
65536
/
ROM_BIOS_PAGE
;
u8
data
[
3
]
;
int
ret
;
if
(
!
nouveau_acpi_rom_supported
(
pdev
))
if
(
!
nouveau_acpi_rom_supported
(
pdev
))
return
;
return
;
ret
=
nouveau_acpi_get_bios_chunk
(
data
,
0
,
sizeof
(
data
));
bios
->
data
=
kmalloc
(
cnt
*
ROM_BIOS_PAGE
,
GFP_KERNEL
);
if
(
ret
!=
sizeof
(
data
))
return
;
bios
->
length
=
min
(
data
[
2
]
*
512
,
65536
);
bios
->
data
=
kmalloc
(
bios
->
length
,
GFP_KERNEL
);
if
(
!
bios
->
data
)
if
(
!
bios
->
data
)
return
;
return
;
len
=
bios
->
length
;
bios
->
length
=
0
;
ptr
=
0
;
while
(
cnt
--
)
{
while
(
len
)
{
ret
=
nouveau_acpi_get_bios_chunk
(
bios
->
data
,
bios
->
length
,
int
size
=
(
len
>
ROM_BIOS_PAGE
)
?
ROM_BIOS_PAGE
:
len
;
ROM_BIOS_PAGE
);
if
(
ret
!=
ROM_BIOS_PAGE
)
ret
=
nouveau_acpi_get_bios_chunk
(
bios
->
data
,
ptr
,
size
);
if
(
ret
!=
size
)
{
kfree
(
bios
->
data
);
bios
->
data
=
NULL
;
return
;
return
;
}
len
-=
size
;
bios
->
length
+=
ROM_BIOS_PAGE
;
ptr
+=
size
;
}
}
}
}
...
@@ -294,6 +283,7 @@ bios_shadow(struct drm_device *dev)
...
@@ -294,6 +283,7 @@ bios_shadow(struct drm_device *dev)
mthd
->
score
=
score_vbios
(
bios
,
mthd
->
rw
);
mthd
->
score
=
score_vbios
(
bios
,
mthd
->
rw
);
mthd
->
size
=
bios
->
length
;
mthd
->
size
=
bios
->
length
;
mthd
->
data
=
bios
->
data
;
mthd
->
data
=
bios
->
data
;
bios
->
data
=
NULL
;
}
while
(
mthd
->
score
!=
3
&&
(
++
mthd
)
->
shadow
);
}
while
(
mthd
->
score
!=
3
&&
(
++
mthd
)
->
shadow
);
mthd
=
shadow_methods
;
mthd
=
shadow_methods
;
...
...
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