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
23088182
Commit
23088182
authored
Dec 06, 2012
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: remove some more unnecessary legacy bios code
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
e84e4b67
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
66 deletions
+5
-66
drivers/gpu/drm/nouveau/nouveau_bios.c
drivers/gpu/drm/nouveau/nouveau_bios.c
+4
-55
drivers/gpu/drm/nouveau/nouveau_bios.h
drivers/gpu/drm/nouveau/nouveau_bios.h
+1
-11
No files found.
drivers/gpu/drm/nouveau/nouveau_bios.c
View file @
23088182
...
...
@@ -678,23 +678,6 @@ int run_tmds_table(struct drm_device *dev, struct dcb_output *dcbent, int head,
return
0
;
}
static
void
parse_bios_version
(
struct
drm_device
*
dev
,
struct
nvbios
*
bios
,
uint16_t
offset
)
{
/*
* offset + 0 (8 bits): Micro version
* offset + 1 (8 bits): Minor version
* offset + 2 (8 bits): Chip version
* offset + 3 (8 bits): Major version
*/
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
bios
->
major_version
=
bios
->
data
[
offset
+
3
];
bios
->
chip_version
=
bios
->
data
[
offset
+
2
];
NV_INFO
(
drm
,
"Bios version %02x.%02x.%02x.%02x
\n
"
,
bios
->
data
[
offset
+
3
],
bios
->
data
[
offset
+
2
],
bios
->
data
[
offset
+
1
],
bios
->
data
[
offset
]);
}
static
void
parse_script_table_pointers
(
struct
nvbios
*
bios
,
uint16_t
offset
)
{
/*
...
...
@@ -710,12 +693,6 @@ static void parse_script_table_pointers(struct nvbios *bios, uint16_t offset)
*/
bios
->
init_script_tbls_ptr
=
ROM16
(
bios
->
data
[
offset
]);
bios
->
macro_index_tbl_ptr
=
ROM16
(
bios
->
data
[
offset
+
2
]);
bios
->
macro_tbl_ptr
=
ROM16
(
bios
->
data
[
offset
+
4
]);
bios
->
condition_tbl_ptr
=
ROM16
(
bios
->
data
[
offset
+
6
]);
bios
->
io_condition_tbl_ptr
=
ROM16
(
bios
->
data
[
offset
+
8
]);
bios
->
io_flag_condition_tbl_ptr
=
ROM16
(
bios
->
data
[
offset
+
10
]);
bios
->
init_function_tbl_ptr
=
ROM16
(
bios
->
data
[
offset
+
12
]);
}
static
int
parse_bit_A_tbl_entry
(
struct
drm_device
*
dev
,
struct
nvbios
*
bios
,
struct
bit_entry
*
bitentry
)
...
...
@@ -765,25 +742,6 @@ static int parse_bit_A_tbl_entry(struct drm_device *dev, struct nvbios *bios, st
return
0
;
}
static
int
parse_bit_C_tbl_entry
(
struct
drm_device
*
dev
,
struct
nvbios
*
bios
,
struct
bit_entry
*
bitentry
)
{
/*
* offset + 8 (16 bits): PLL limits table pointer
*
* There's more in here, but that's unknown.
*/
struct
nouveau_drm
*
drm
=
nouveau_drm
(
dev
);
if
(
bitentry
->
length
<
10
)
{
NV_ERROR
(
drm
,
"Do not understand BIT C table
\n
"
);
return
-
EINVAL
;
}
bios
->
pll_limit_tbl_ptr
=
ROM16
(
bios
->
data
[
bitentry
->
offset
+
8
]);
return
0
;
}
static
int
parse_bit_display_tbl_entry
(
struct
drm_device
*
dev
,
struct
nvbios
*
bios
,
struct
bit_entry
*
bitentry
)
{
/*
...
...
@@ -821,12 +779,6 @@ static int parse_bit_init_tbl_entry(struct drm_device *dev, struct nvbios *bios,
}
parse_script_table_pointers
(
bios
,
bitentry
->
offset
);
if
(
bitentry
->
length
>=
16
)
bios
->
some_script_ptr
=
ROM16
(
bios
->
data
[
bitentry
->
offset
+
14
]);
if
(
bitentry
->
length
>=
18
)
bios
->
init96_tbl_ptr
=
ROM16
(
bios
->
data
[
bitentry
->
offset
+
16
]);
return
0
;
}
...
...
@@ -852,8 +804,6 @@ static int parse_bit_i_tbl_entry(struct drm_device *dev, struct nvbios *bios, st
return
-
EINVAL
;
}
parse_bios_version
(
dev
,
bios
,
bitentry
->
offset
);
/*
* bit 4 seems to indicate a mobile bios (doesn't suffer from BMP's
* Quadro identity crisis), other bits possibly as for BMP feature byte
...
...
@@ -1078,9 +1028,6 @@ parse_bit_structure(struct nvbios *bios, const uint16_t bitoffset)
return
ret
;
if
(
bios
->
major_version
>=
0x60
)
/* g80+ */
parse_bit_table
(
bios
,
bitoffset
,
&
BIT_TABLE
(
'A'
,
A
));
ret
=
parse_bit_table
(
bios
,
bitoffset
,
&
BIT_TABLE
(
'C'
,
C
));
if
(
ret
)
return
ret
;
parse_bit_table
(
bios
,
bitoffset
,
&
BIT_TABLE
(
'D'
,
display
));
ret
=
parse_bit_table
(
bios
,
bitoffset
,
&
BIT_TABLE
(
'I'
,
init
));
if
(
ret
)
...
...
@@ -1228,8 +1175,6 @@ static int parse_bmp_structure(struct drm_device *dev, struct nvbios *bios, unsi
*/
bios
->
feature_byte
=
bmp
[
9
];
parse_bios_version
(
dev
,
bios
,
offset
+
10
);
if
(
bmp_version_major
<
5
||
bmp_version_minor
<
0x10
)
bios
->
old_style_init
=
true
;
legacy_scripts_offset
=
18
;
...
...
@@ -1276,8 +1221,10 @@ static int parse_bmp_structure(struct drm_device *dev, struct nvbios *bios, unsi
bios
->
fp
.
lvdsmanufacturerpointer
=
ROM16
(
bmp
[
117
]);
bios
->
fp
.
fpxlatemanufacturertableptr
=
ROM16
(
bmp
[
119
]);
}
#if 0
if (bmplength > 143)
bios->pll_limit_tbl_ptr = ROM16(bmp[142]);
#endif
if
(
bmplength
>
157
)
bios
->
fp
.
duallink_transition_clk
=
ROM16
(
bmp
[
156
])
*
10
;
...
...
@@ -2072,6 +2019,8 @@ static bool NVInitVBIOS(struct drm_device *dev)
return
!
parse_bmp_structure
(
dev
,
legacy
,
legacy
->
offset
);
}
legacy
->
major_version
=
bios
->
version
.
major
;
legacy
->
chip_version
=
bios
->
version
.
chip
;
return
false
;
}
...
...
drivers/gpu/drm/nouveau/nouveau_bios.h
View file @
23088182
...
...
@@ -107,20 +107,10 @@ struct nvbios {
bool
old_style_init
;
uint16_t
init_script_tbls_ptr
;
uint16_t
extra_init_script_tbl_ptr
;
uint16_t
macro_index_tbl_ptr
;
uint16_t
macro_tbl_ptr
;
uint16_t
condition_tbl_ptr
;
uint16_t
io_condition_tbl_ptr
;
uint16_t
io_flag_condition_tbl_ptr
;
uint16_t
init_function_tbl_ptr
;
uint16_t
pll_limit_tbl_ptr
;
uint16_t
ram_restrict_tbl_ptr
;
uint8_t
ram_restrict_group_count
;
uint16_t
some_script_ptr
;
/* BIT I + 14 */
uint16_t
init96_tbl_ptr
;
/* BIT I + 16 */
struct
dcb_table
dcb
;
struct
{
...
...
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