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
e84e4b67
Commit
e84e4b67
authored
Dec 06, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: remove legacy vbios type detection
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
5e90a88c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
42 deletions
+20
-42
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+20
-42
No files found.
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
e84e4b67
...
...
@@ -2052,45 +2052,27 @@ uint8_t *nouveau_bios_embedded_edid(struct drm_device *dev)
static
bool
NVInitVBIOS
(
struct
drm_device
*
dev
)
{
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nvbios
*
bios
=
&
drm
->
vbios
;
memset
(
bios
,
0
,
sizeof
(
struct
nvbios
));
spin_lock_init
(
&
bios
->
lock
);
bios
->
dev
=
dev
;
bios
->
data
=
nouveau_bios
(
drm
->
device
)
->
data
;
bios
->
length
=
nouveau_bios
(
drm
->
device
)
->
size
;
return
true
;
}
struct
nouveau_bios
*
bios
=
nouveau_bios
(
drm
->
device
);
struct
nvbios
*
legacy
=
&
drm
->
vbios
;
memset
(
legacy
,
0
,
sizeof
(
struct
nvbios
));
spin_lock_init
(
&
legacy
->
lock
);
legacy
->
dev
=
dev
;
legacy
->
data
=
bios
->
data
;
legacy
->
length
=
bios
->
size
;
if
(
bios
->
bit_offset
)
{
legacy
->
type
=
NVBIOS_BIT
;
legacy
->
offset
=
bios
->
bit_offset
;
return
!
parse_bit_structure
(
legacy
,
legacy
->
offset
+
6
);
}
else
if
(
bios
->
bmp_offset
)
{
legacy
->
type
=
NVBIOS_BMP
;
legacy
->
offset
=
bios
->
bmp_offset
;
return
!
parse_bmp_structure
(
dev
,
legacy
,
legacy
->
offset
);
}
static
int
nouveau_parse_vbios_struct
(
struct
drm_device
*
dev
)
{
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
struct
nvbios
*
bios
=
&
drm
->
vbios
;
const
uint8_t
bit_signature
[]
=
{
0xff
,
0xb8
,
'B'
,
'I'
,
'T'
};
const
uint8_t
bmp_signature
[]
=
{
0xff
,
0x7f
,
'N'
,
'V'
,
0x0
};
int
offset
;
offset
=
findstr
(
bios
->
data
,
bios
->
length
,
bit_signature
,
sizeof
(
bit_signature
));
if
(
offset
)
{
NV_INFO
(
drm
,
"BIT BIOS found
\n
"
);
bios
->
type
=
NVBIOS_BIT
;
bios
->
offset
=
offset
;
return
parse_bit_structure
(
bios
,
offset
+
6
);
}
offset
=
findstr
(
bios
->
data
,
bios
->
length
,
bmp_signature
,
sizeof
(
bmp_signature
));
if
(
offset
)
{
NV_INFO
(
drm
,
"BMP BIOS found
\n
"
);
bios
->
type
=
NVBIOS_BMP
;
bios
->
offset
=
offset
;
return
parse_bmp_structure
(
dev
,
bios
,
offset
);
}
NV_ERROR
(
drm
,
"No known BIOS signature found
\n
"
);
return
-
ENODEV
;
return
false
;
}
int
...
...
@@ -2146,10 +2128,6 @@ nouveau_bios_init(struct drm_device *dev)
if
(
!
NVInitVBIOS
(
dev
))
return
-
ENODEV
;
ret
=
nouveau_parse_vbios_struct
(
dev
);
if
(
ret
)
return
ret
;
ret
=
parse_dcb_table
(
dev
,
bios
);
if
(
ret
)
return
ret
;
...
...
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