Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 205063
b: refs/heads/master
c: ea4718d
h: refs/heads/master
i:
  205061: 4bd25f2
  205059: 15c8690
  205055: 2780ae2
v: v3
  • Loading branch information
Ben Skeggs committed Jul 13, 2010
1 parent f275ac4 commit 81f1f9a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 34 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87c0e0e5133e252a6d3d561dd0caeec0244ea9a5
refs/heads/master: ea4718d1dc52c4faef92065ce62fcba6113540bf
24 changes: 22 additions & 2 deletions trunk/drivers/gpu/drm/nouveau/nouveau_dp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down
32 changes: 1 addition & 31 deletions trunk/drivers/gpu/drm/nouveau/nv50_sor.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
nv50_sor_dp_link_train(encoder);
nouveau_dp_link_train(encoder);
}

static void
Expand Down

0 comments on commit 81f1f9a

Please sign in to comment.