diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-04-23 08:21:48 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-05-19 13:15:16 +1000 |
commit | afa3b4c37772f21b69980c155515927fdecd3a27 (patch) | |
tree | 754ad8f8089f70ffaa75ff7e01bf185d9213f28d /drivers/gpu/drm/nouveau/nv50_sor.c | |
parent | 17b96cc38d93c65b3bf4e88ce89cc550dc90abf7 (diff) |
drm/nv50: fix suspend/resume with DP outputs
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 | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c index 0c68698f23d..b11eaf9c5c7 100644 --- a/drivers/gpu/drm/nouveau/nv50_sor.c +++ b/drivers/gpu/drm/nouveau/nv50_sor.c @@ -321,18 +321,23 @@ nv50_sor_create(struct drm_device *dev, struct dcb_entry *entry) encoder->possible_clones = 0; if (nv_encoder->dcb->type == OUTPUT_DP) { - uint32_t mc, or = nv_encoder->or; + int or = nv_encoder->or, link = !(entry->dpconf.sor.link & 1); + uint32_t tmp; if (dev_priv->chipset < 0x90 || dev_priv->chipset == 0x92 || dev_priv->chipset == 0xa0) - mc = nv_rd32(dev, NV50_PDISPLAY_SOR_MODE_CTRL_C(or)); + tmp = nv_rd32(dev, NV50_PDISPLAY_SOR_MODE_CTRL_C(or)); else - mc = nv_rd32(dev, NV90_PDISPLAY_SOR_MODE_CTRL_C(or)); + tmp = nv_rd32(dev, NV90_PDISPLAY_SOR_MODE_CTRL_C(or)); - switch ((mc & 0x00000f00) >> 8) { + switch ((tmp & 0x00000f00) >> 8) { case 8: case 9: - nv_encoder->dp.mc_unknown = (mc & 0x000f0000) >> 16; + nv_encoder->dp.mc_unknown = (tmp & 0x000f0000) >> 16; + tmp = nv_rd32(dev, NV50_SOR_DP_CTRL(or, link)); + nv_encoder->dp.unk0 = tmp & 0x000001fc; + tmp = nv_rd32(dev, NV50_SOR_DP_UNK128(or, link)); + nv_encoder->dp.unk1 = tmp & 0x010f7f3f; break; default: break; |