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
20014cbe
Commit
20014cbe
authored
May 14, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/bios: extend connector table parsing
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
377b1f16
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
79 additions
and
16 deletions
+79
-16
drivers/gpu/drm/nouveau/core/include/subdev/bios/conn.h
drivers/gpu/drm/nouveau/core/include/subdev/bios/conn.h
+20
-2
drivers/gpu/drm/nouveau/core/subdev/bios/conn.c
drivers/gpu/drm/nouveau/core/subdev/bios/conn.c
+53
-9
drivers/gpu/drm/nouveau/core/subdev/bios/init.c
drivers/gpu/drm/nouveau/core/subdev/bios/init.c
+5
-4
drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c
drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c
+1
-1
No files found.
drivers/gpu/drm/nouveau/core/include/subdev/bios/conn.h
View file @
20014cbe
...
...
@@ -22,7 +22,25 @@ enum dcb_connector_type {
DCB_CONNECTOR_NONE
=
0xff
};
u16
dcb_conntab
(
struct
nouveau_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u16
dcb_conn
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
len
);
struct
nvbios_connT
{
};
u32
nvbios_connTe
(
struct
nouveau_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
);
u32
nvbios_connTp
(
struct
nouveau_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_connT
*
info
);
struct
nvbios_connE
{
u8
type
;
u8
location
;
u8
hpd
;
u8
dp
;
u8
di
;
u8
sr
;
u8
lcdid
;
};
u32
nvbios_connEe
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
hdr
);
u32
nvbios_connEp
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
hdr
,
struct
nvbios_connE
*
info
);
#endif
drivers/gpu/drm/nouveau/core/subdev/bios/conn.c
View file @
20014cbe
...
...
@@ -28,12 +28,12 @@
#include <subdev/bios/dcb.h>
#include <subdev/bios/conn.h>
u
16
dcb_conntab
(
struct
nouveau_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
u
32
nvbios_connTe
(
struct
nouveau_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
)
{
u
16
dcb
=
dcb_table
(
bios
,
ver
,
hdr
,
cnt
,
len
);
u
32
dcb
=
dcb_table
(
bios
,
ver
,
hdr
,
cnt
,
len
);
if
(
dcb
&&
*
ver
>=
0x30
&&
*
hdr
>=
0x16
)
{
u
16
data
=
nv_ro16
(
bios
,
dcb
+
0x14
);
u
32
data
=
nv_ro16
(
bios
,
dcb
+
0x14
);
if
(
data
)
{
*
ver
=
nv_ro08
(
bios
,
data
+
0
);
*
hdr
=
nv_ro08
(
bios
,
data
+
1
);
...
...
@@ -42,15 +42,59 @@ dcb_conntab(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
return
data
;
}
}
return
0x0000
;
return
0x0000
0000
;
}
u16
dcb_conn
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
len
)
u32
nvbios_connTp
(
struct
nouveau_bios
*
bios
,
u8
*
ver
,
u8
*
hdr
,
u8
*
cnt
,
u8
*
len
,
struct
nvbios_connT
*
info
)
{
u32
data
=
nvbios_connTe
(
bios
,
ver
,
hdr
,
cnt
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
switch
(
!!
data
*
*
ver
)
{
case
0x30
:
case
0x40
:
return
data
;
default:
break
;
}
return
0x00000000
;
}
u32
nvbios_connEe
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
len
)
{
u8
hdr
,
cnt
;
u
16
data
=
dcb_conntab
(
bios
,
ver
,
&
hdr
,
&
cnt
,
len
);
u
32
data
=
nvbios_connTe
(
bios
,
ver
,
&
hdr
,
&
cnt
,
len
);
if
(
data
&&
idx
<
cnt
)
return
data
+
hdr
+
(
idx
*
*
len
);
return
0x0000
;
return
0x00000000
;
}
u32
nvbios_connEp
(
struct
nouveau_bios
*
bios
,
u8
idx
,
u8
*
ver
,
u8
*
len
,
struct
nvbios_connE
*
info
)
{
u32
data
=
nvbios_connEe
(
bios
,
idx
,
ver
,
len
);
memset
(
info
,
0x00
,
sizeof
(
*
info
));
switch
(
!!
data
*
*
ver
)
{
case
0x30
:
case
0x40
:
info
->
type
=
nv_ro08
(
bios
,
data
+
0x00
);
info
->
location
=
nv_ro08
(
bios
,
data
+
0x01
)
&
0x0f
;
info
->
hpd
=
(
nv_ro08
(
bios
,
data
+
0x01
)
&
0x30
)
>>
4
;
info
->
dp
=
(
nv_ro08
(
bios
,
data
+
0x01
)
&
0xc0
)
>>
6
;
if
(
*
len
<
4
)
return
data
;
info
->
hpd
|=
(
nv_ro08
(
bios
,
data
+
0x02
)
&
0x03
)
<<
2
;
info
->
dp
|=
nv_ro08
(
bios
,
data
+
0x02
)
&
0x0c
;
info
->
di
=
(
nv_ro08
(
bios
,
data
+
0x02
)
&
0xf0
)
>>
4
;
info
->
hpd
|=
(
nv_ro08
(
bios
,
data
+
0x03
)
&
0x07
)
<<
4
;
info
->
sr
=
(
nv_ro08
(
bios
,
data
+
0x03
)
&
0x08
)
>>
3
;
info
->
lcdid
=
(
nv_ro08
(
bios
,
data
+
0x03
)
&
0x70
)
>>
4
;
return
data
;
default:
break
;
}
return
0x00000000
;
}
drivers/gpu/drm/nouveau/core/subdev/bios/init.c
View file @
20014cbe
...
...
@@ -98,15 +98,16 @@ static u8
init_conn
(
struct
nvbios_init
*
init
)
{
struct
nouveau_bios
*
bios
=
init
->
bios
;
u8
ver
,
len
;
u16
conn
;
struct
nvbios_connE
connE
;
u8
ver
,
hdr
;
u32
conn
;
if
(
init_exec
(
init
))
{
if
(
init
->
outp
)
{
conn
=
init
->
outp
->
connector
;
conn
=
dcb_conn
(
bios
,
conn
,
&
ver
,
&
len
);
conn
=
nvbios_connEp
(
bios
,
conn
,
&
ver
,
&
hdr
,
&
connE
);
if
(
conn
)
return
nv_ro08
(
bios
,
conn
)
;
return
connE
.
type
;
}
error
(
"script needs connector type
\n
"
);
...
...
drivers/gpu/drm/nouveau/core/subdev/mxm/nv50.c
View file @
20014cbe
...
...
@@ -150,7 +150,7 @@ mxm_dcb_sanitise_entry(struct nouveau_bios *bios, void *data, int idx, u16 pdcb)
* common example is DP->eDP.
*/
conn
=
bios
->
data
;
conn
+=
dcb_conn
(
bios
,
(
ctx
.
outp
[
0
]
&
0x0000f000
)
>>
12
,
&
ver
,
&
len
);
conn
+=
nvbios_connEe
(
bios
,
(
ctx
.
outp
[
0
]
&
0x0000f000
)
>>
12
,
&
ver
,
&
len
);
type
=
conn
[
0
];
switch
(
ctx
.
desc
.
conn_type
)
{
case
0x01
:
/* LVDS */
...
...
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