aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-07-05 21:20:17 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-07-12 20:13:34 -0400
commit1f403d9cca359531e16bc685ed5d619c77762004 (patch)
treec8207e926c775f0ca39c86a15a9b84d01b69ce81 /drivers
parentea4718d1dc52c4faef92065ce62fcba6113540bf (diff)
drm/nv50: set DP display power state during DPMS
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_sor.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c
index 45a617df6e39..bcd4cf84a7e6 100644
--- a/drivers/gpu/drm/nouveau/nv50_sor.c
+++ b/drivers/gpu/drm/nouveau/nv50_sor.c
@@ -115,8 +115,22 @@ nv50_sor_dpms(struct drm_encoder *encoder, int mode)
115 nv_rd32(dev, NV50_PDISPLAY_SOR_DPMS_STATE(or))); 115 nv_rd32(dev, NV50_PDISPLAY_SOR_DPMS_STATE(or)));
116 } 116 }
117 117
118 if (nv_encoder->dcb->type == OUTPUT_DP && mode == DRM_MODE_DPMS_ON) 118 if (nv_encoder->dcb->type == OUTPUT_DP) {
119 nouveau_dp_link_train(encoder); 119 struct nouveau_i2c_chan *auxch;
120
121 auxch = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index);
122 if (!auxch)
123 return;
124
125 if (mode == DRM_MODE_DPMS_ON) {
126 u8 status = DP_SET_POWER_D0;
127 nouveau_dp_auxch(auxch, 8, DP_SET_POWER, &status, 1);
128 nouveau_dp_link_train(encoder);
129 } else {
130 u8 status = DP_SET_POWER_D3;
131 nouveau_dp_auxch(auxch, 8, DP_SET_POWER, &status, 1);
132 }
133 }
120} 134}
121 135
122static void 136static void