diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-03-10 19:20:54 +0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-03-13 11:15:04 +0400 |
commit | f14d9a4dda65439d74326694db727c6d2a5df0ce (patch) | |
tree | 4a723aad34dd3917ad38536f962f261fb07cc5e1 /drivers/gpu/drm/nouveau/nv50_sor.c | |
parent | e436d1bb0a3e5ff27b190d0bf9173f4f6ad21d3f (diff) | |
download | linux-f14d9a4dda65439d74326694db727c6d2a5df0ce.tar.xz |
drm/nouveau/dp: make dp dpms function common, call from sor code instead
GF119 will use this too.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_sor.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_sor.c | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c index ba1b8cc03545..9a5c2c98658c 100644 --- a/drivers/gpu/drm/nouveau/nv50_sor.c +++ b/drivers/gpu/drm/nouveau/nv50_sor.c @@ -304,27 +304,13 @@ nv50_sor_dpms(struct drm_encoder *encoder, int mode) } if (nv_encoder->dcb->type == OUTPUT_DP) { - struct nouveau_i2c_chan *auxch; + struct dp_train_func func = { + .link_set = nv50_sor_dp_link_set, + .train_set = nv50_sor_dp_train_set, + .train_adj = nv50_sor_dp_train_adj + }; - auxch = nouveau_i2c_find(dev, nv_encoder->dcb->i2c_index); - if (!auxch) - return; - - if (mode == DRM_MODE_DPMS_ON) { - struct dp_train_func func = { - .link_set = nv50_sor_dp_link_set, - .train_set = nv50_sor_dp_train_set, - .train_adj = nv50_sor_dp_train_adj - }; - u32 rate = nv_encoder->dp.datarate; - u8 status = DP_SET_POWER_D0; - - nouveau_dp_auxch(auxch, 8, DP_SET_POWER, &status, 1); - nouveau_dp_link_train(encoder, rate, &func); - } else { - u8 status = DP_SET_POWER_D3; - nouveau_dp_auxch(auxch, 8, DP_SET_POWER, &status, 1); - } + nouveau_dp_dpms(encoder, mode, nv_encoder->dp.datarate, &func); } } |