diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv04_dfp.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_dfp.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/drivers/gpu/drm/nouveau/nv04_dfp.c b/drivers/gpu/drm/nouveau/nv04_dfp.c index 0d3206a7046c..c936403b26e2 100644 --- a/drivers/gpu/drm/nouveau/nv04_dfp.c +++ b/drivers/gpu/drm/nouveau/nv04_dfp.c | |||
@@ -104,6 +104,8 @@ void nv04_dfp_disable(struct drm_device *dev, int head) | |||
104 | } | 104 | } |
105 | /* don't inadvertently turn it on when state written later */ | 105 | /* don't inadvertently turn it on when state written later */ |
106 | crtcstate[head].fp_control = FP_TG_CONTROL_OFF; | 106 | crtcstate[head].fp_control = FP_TG_CONTROL_OFF; |
107 | crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] &= | ||
108 | ~NV_CIO_CRE_LCD_ROUTE_MASK; | ||
107 | } | 109 | } |
108 | 110 | ||
109 | void nv04_dfp_update_fp_control(struct drm_encoder *encoder, int mode) | 111 | void nv04_dfp_update_fp_control(struct drm_encoder *encoder, int mode) |
@@ -253,26 +255,21 @@ static void nv04_dfp_prepare(struct drm_encoder *encoder) | |||
253 | 255 | ||
254 | nv04_dfp_prepare_sel_clk(dev, nv_encoder, head); | 256 | nv04_dfp_prepare_sel_clk(dev, nv_encoder, head); |
255 | 257 | ||
256 | /* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f) | 258 | *cr_lcd = (*cr_lcd & ~NV_CIO_CRE_LCD_ROUTE_MASK) | 0x3; |
257 | * at LCD__INDEX which we don't alter | 259 | |
258 | */ | 260 | if (nv_two_heads(dev)) { |
259 | if (!(*cr_lcd & 0x44)) { | 261 | if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP) |
260 | *cr_lcd = 0x3; | 262 | *cr_lcd |= head ? 0x0 : 0x8; |
261 | 263 | else { | |
262 | if (nv_two_heads(dev)) { | 264 | *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30; |
263 | if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP) | 265 | if (nv_encoder->dcb->type == OUTPUT_LVDS) |
264 | *cr_lcd |= head ? 0x0 : 0x8; | 266 | *cr_lcd |= 0x30; |
265 | else { | 267 | if ((*cr_lcd & 0x30) == (*cr_lcd_oth & 0x30)) { |
266 | *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30; | 268 | /* avoid being connected to both crtcs */ |
267 | if (nv_encoder->dcb->type == OUTPUT_LVDS) | 269 | *cr_lcd_oth &= ~0x30; |
268 | *cr_lcd |= 0x30; | 270 | NVWriteVgaCrtc(dev, head ^ 1, |
269 | if ((*cr_lcd & 0x30) == (*cr_lcd_oth & 0x30)) { | 271 | NV_CIO_CRE_LCD__INDEX, |
270 | /* avoid being connected to both crtcs */ | 272 | *cr_lcd_oth); |
271 | *cr_lcd_oth &= ~0x30; | ||
272 | NVWriteVgaCrtc(dev, head ^ 1, | ||
273 | NV_CIO_CRE_LCD__INDEX, | ||
274 | *cr_lcd_oth); | ||
275 | } | ||
276 | } | 273 | } |
277 | } | 274 | } |
278 | } | 275 | } |
@@ -640,7 +637,7 @@ static void nv04_tmds_slave_init(struct drm_encoder *encoder) | |||
640 | get_tmds_slave(encoder)) | 637 | get_tmds_slave(encoder)) |
641 | return; | 638 | return; |
642 | 639 | ||
643 | type = nouveau_i2c_identify(dev, "TMDS transmitter", info, 2); | 640 | type = nouveau_i2c_identify(dev, "TMDS transmitter", info, NULL, 2); |
644 | if (type < 0) | 641 | if (type < 0) |
645 | return; | 642 | return; |
646 | 643 | ||