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
fc243d7f
Commit
fc243d7f
authored
Mar 20, 2014
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau/disp: limit dp capabilities as per dcb
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
5ca929b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
1 deletion
+36
-1
drivers/gpu/drm/nouveau/core/engine/disp/dport.c
drivers/gpu/drm/nouveau/core/engine/disp/dport.c
+8
-0
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
+28
-1
No files found.
drivers/gpu/drm/nouveau/core/engine/disp/dport.c
View file @
fc243d7f
...
@@ -312,6 +312,14 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
...
@@ -312,6 +312,14 @@ nouveau_dp_train(struct nouveau_disp *disp, const struct nouveau_dp_func *func,
ERR
(
"failed to read DPCD
\n
"
);
ERR
(
"failed to read DPCD
\n
"
);
}
}
/* bring capabilities within encoder limits */
if
((
dp
->
dpcd
[
2
]
&
0x1f
)
>
dp
->
outp
->
dpconf
.
link_nr
)
{
dp
->
dpcd
[
2
]
&=
~
0x1f
;
dp
->
dpcd
[
2
]
|=
dp
->
outp
->
dpconf
.
link_nr
;
}
if
(
dp
->
dpcd
[
1
]
>
dp
->
outp
->
dpconf
.
link_bw
)
dp
->
dpcd
[
1
]
=
dp
->
outp
->
dpconf
.
link_bw
;
/* adjust required bandwidth for 8B/10B coding overhead */
/* adjust required bandwidth for 8B/10B coding overhead */
datarate
=
(
datarate
/
8
)
*
10
;
datarate
=
(
datarate
/
8
)
*
10
;
...
...
drivers/gpu/drm/nouveau/core/subdev/bios/dcb.c
View file @
fc243d7f
...
@@ -142,9 +142,36 @@ dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len,
...
@@ -142,9 +142,36 @@ dcb_outp_parse(struct nouveau_bios *bios, u8 idx, u8 *ver, u8 *len,
if
(
*
ver
>=
0x40
)
{
if
(
*
ver
>=
0x40
)
{
u32
conf
=
nv_ro32
(
bios
,
dcb
+
0x04
);
u32
conf
=
nv_ro32
(
bios
,
dcb
+
0x04
);
switch
(
outp
->
type
)
{
switch
(
outp
->
type
)
{
case
DCB_OUTPUT_DP
:
switch
(
conf
&
0x00e00000
)
{
case
0x00000000
:
outp
->
dpconf
.
link_bw
=
0x06
;
break
;
case
0x00200000
:
outp
->
dpconf
.
link_bw
=
0x0a
;
break
;
case
0x00400000
:
default:
outp
->
dpconf
.
link_bw
=
0x14
;
break
;
}
switch
(
conf
&
0x0f000000
)
{
case
0x0f000000
:
outp
->
dpconf
.
link_nr
=
4
;
break
;
case
0x03000000
:
outp
->
dpconf
.
link_nr
=
2
;
break
;
case
0x01000000
:
default:
outp
->
dpconf
.
link_nr
=
1
;
break
;
}
/* fall-through... */
case
DCB_OUTPUT_TMDS
:
case
DCB_OUTPUT_TMDS
:
case
DCB_OUTPUT_LVDS
:
case
DCB_OUTPUT_LVDS
:
case
DCB_OUTPUT_DP
:
outp
->
link
=
(
conf
&
0x00000030
)
>>
4
;
outp
->
link
=
(
conf
&
0x00000030
)
>>
4
;
outp
->
sorconf
.
link
=
outp
->
link
;
/*XXX*/
outp
->
sorconf
.
link
=
outp
->
link
;
/*XXX*/
outp
->
extdev
=
0x00
;
outp
->
extdev
=
0x00
;
...
...
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