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
ea4718d1
Commit
ea4718d1
authored
Jul 06, 2010
by
Ben Skeggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drm/nouveau: move DP script invocation to nouveau_dp.c
Signed-off-by:
Ben Skeggs
<
bskeggs@redhat.com
>
parent
87c0e0e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
33 deletions
+23
-33
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_dp.c
+22
-2
drivers/gpu/drm/nouveau/nv50_sor.c
drivers/gpu/drm/nouveau/nv50_sor.c
+1
-31
No files found.
drivers/gpu/drm/nouveau/nouveau_dp.c
View file @
ea4718d1
...
...
@@ -271,12 +271,26 @@ nouveau_dp_link_train(struct drm_encoder *encoder)
{
struct
drm_device
*
dev
=
encoder
->
dev
;
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
uint8_t
config
[
4
];
uint8_t
status
[
3
];
struct
bit_displayport_encoder_table
*
dpe
;
int
dpe_headerlen
;
uint8_t
config
[
4
],
status
[
3
];
bool
cr_done
,
cr_max_vs
,
eq_done
;
int
ret
=
0
,
i
,
tries
,
voltage
;
NV_DEBUG_KMS
(
dev
,
"link training!!
\n
"
);
dpe
=
nouveau_bios_dp_table
(
dev
,
nv_encoder
->
dcb
,
&
dpe_headerlen
);
if
(
!
dpe
)
{
NV_ERROR
(
dev
,
"SOR-%d: no DP encoder table!
\n
"
,
nv_encoder
->
or
);
return
false
;
}
if
(
dpe
->
script0
)
{
NV_DEBUG_KMS
(
dev
,
"SOR-%d: running DP script 0
\n
"
,
nv_encoder
->
or
);
nouveau_bios_run_init_table
(
dev
,
le16_to_cpu
(
dpe
->
script0
),
nv_encoder
->
dcb
);
}
train:
cr_done
=
eq_done
=
false
;
...
...
@@ -403,6 +417,12 @@ nouveau_dp_link_train(struct drm_encoder *encoder)
}
}
if
(
dpe
->
script1
)
{
NV_DEBUG_KMS
(
dev
,
"SOR-%d: running DP script 1
\n
"
,
nv_encoder
->
or
);
nouveau_bios_run_init_table
(
dev
,
le16_to_cpu
(
dpe
->
script1
),
nv_encoder
->
dcb
);
}
return
eq_done
;
}
...
...
drivers/gpu/drm/nouveau/nv50_sor.c
View file @
ea4718d1
...
...
@@ -65,36 +65,6 @@ nv50_sor_disconnect(struct drm_encoder *encoder)
nv_encoder
->
last_dpms
=
DRM_MODE_DPMS_OFF
;
}
static
void
nv50_sor_dp_link_train
(
struct
drm_encoder
*
encoder
)
{
struct
drm_device
*
dev
=
encoder
->
dev
;
struct
nouveau_encoder
*
nv_encoder
=
nouveau_encoder
(
encoder
);
struct
bit_displayport_encoder_table
*
dpe
;
int
dpe_headerlen
;
dpe
=
nouveau_bios_dp_table
(
dev
,
nv_encoder
->
dcb
,
&
dpe_headerlen
);
if
(
!
dpe
)
{
NV_ERROR
(
dev
,
"SOR-%d: no DP encoder table!
\n
"
,
nv_encoder
->
or
);
return
;
}
if
(
dpe
->
script0
)
{
NV_DEBUG_KMS
(
dev
,
"SOR-%d: running DP script 0
\n
"
,
nv_encoder
->
or
);
nouveau_bios_run_init_table
(
dev
,
le16_to_cpu
(
dpe
->
script0
),
nv_encoder
->
dcb
);
}
if
(
!
nouveau_dp_link_train
(
encoder
))
NV_ERROR
(
dev
,
"SOR-%d: link training failed
\n
"
,
nv_encoder
->
or
);
if
(
dpe
->
script1
)
{
NV_DEBUG_KMS
(
dev
,
"SOR-%d: running DP script 1
\n
"
,
nv_encoder
->
or
);
nouveau_bios_run_init_table
(
dev
,
le16_to_cpu
(
dpe
->
script1
),
nv_encoder
->
dcb
);
}
}
static
void
nv50_sor_dpms
(
struct
drm_encoder
*
encoder
,
int
mode
)
{
...
...
@@ -146,7 +116,7 @@ nv50_sor_dpms(struct drm_encoder *encoder, int mode)
}
if
(
nv_encoder
->
dcb
->
type
==
OUTPUT_DP
&&
mode
==
DRM_MODE_DPMS_ON
)
n
v50_sor
_dp_link_train
(
encoder
);
n
ouveau
_dp_link_train
(
encoder
);
}
static
void
...
...
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