|
@@ -253,26 +253,21 @@ static void nv04_dfp_prepare(struct drm_encoder *encoder)
|
|
|
|
|
|
nv04_dfp_prepare_sel_clk(dev, nv_encoder, head);
|
|
nv04_dfp_prepare_sel_clk(dev, nv_encoder, head);
|
|
|
|
|
|
- /* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f)
|
|
|
|
- * at LCD__INDEX which we don't alter
|
|
|
|
- */
|
|
|
|
- if (!(*cr_lcd & 0x44)) {
|
|
|
|
- *cr_lcd = 0x3;
|
|
|
|
-
|
|
|
|
- if (nv_two_heads(dev)) {
|
|
|
|
- if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP)
|
|
|
|
- *cr_lcd |= head ? 0x0 : 0x8;
|
|
|
|
- else {
|
|
|
|
- *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30;
|
|
|
|
- if (nv_encoder->dcb->type == OUTPUT_LVDS)
|
|
|
|
- *cr_lcd |= 0x30;
|
|
|
|
- if ((*cr_lcd & 0x30) == (*cr_lcd_oth & 0x30)) {
|
|
|
|
- /* avoid being connected to both crtcs */
|
|
|
|
- *cr_lcd_oth &= ~0x30;
|
|
|
|
- NVWriteVgaCrtc(dev, head ^ 1,
|
|
|
|
- NV_CIO_CRE_LCD__INDEX,
|
|
|
|
- *cr_lcd_oth);
|
|
|
|
- }
|
|
|
|
|
|
+ *cr_lcd = 0x3;
|
|
|
|
+
|
|
|
|
+ if (nv_two_heads(dev)) {
|
|
|
|
+ if (nv_encoder->dcb->location == DCB_LOC_ON_CHIP)
|
|
|
|
+ *cr_lcd |= head ? 0x0 : 0x8;
|
|
|
|
+ else {
|
|
|
|
+ *cr_lcd |= (nv_encoder->dcb->or << 4) & 0x30;
|
|
|
|
+ if (nv_encoder->dcb->type == OUTPUT_LVDS)
|
|
|
|
+ *cr_lcd |= 0x30;
|
|
|
|
+ if ((*cr_lcd & 0x30) == (*cr_lcd_oth & 0x30)) {
|
|
|
|
+ /* avoid being connected to both crtcs */
|
|
|
|
+ *cr_lcd_oth &= ~0x30;
|
|
|
|
+ NVWriteVgaCrtc(dev, head ^ 1,
|
|
|
|
+ NV_CIO_CRE_LCD__INDEX,
|
|
|
|
+ *cr_lcd_oth);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|