Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218165
b: refs/heads/master
c: 217275d
h: refs/heads/master
i:
  218163: 2dd89f9
v: v3
  • Loading branch information
Francisco Jerez authored and Ben Skeggs committed Sep 24, 2010
1 parent 654c765 commit 9a897e8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 37 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7314dec95c054258d5e5a3d1d55e1fd042f8eaad
refs/heads/master: 217275d03d7e1f3e62c7b0d9718df99456b7c356
8 changes: 1 addition & 7 deletions trunk/drivers/gpu/drm/nouveau/nv04_dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,15 +352,9 @@ static void nv04_dac_prepare(struct drm_encoder *encoder)
helper->dpms(encoder, DRM_MODE_DPMS_OFF);

nv04_dfp_disable(dev, head);

/* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f)
* at LCD__INDEX which we don't alter
*/
if (!(crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] & 0x44))
crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] = 0;
crtcstate[head].CRTC[NV_CIO_CRE_LCD__INDEX] = 0;
}


static void nv04_dac_mode_set(struct drm_encoder *encoder,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
Expand Down
35 changes: 15 additions & 20 deletions trunk/drivers/gpu/drm/nouveau/nv04_dfp.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,26 +253,21 @@ static void nv04_dfp_prepare(struct drm_encoder *encoder)

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);
}
}
}
Expand Down
13 changes: 4 additions & 9 deletions trunk/drivers/gpu/drm/nouveau/nv17_tv.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,10 @@ static void nv17_tv_prepare(struct drm_encoder *encoder)

}

/* Some NV4x have unknown values (0x3f, 0x50, 0x54, 0x6b, 0x79, 0x7f)
* at LCD__INDEX which we don't alter
*/
if (!(*cr_lcd & 0x44)) {
if (tv_norm->kind == CTV_ENC_MODE)
*cr_lcd = 0x1 | (head ? 0x0 : 0x8);
else
*cr_lcd = 0;
}
if (tv_norm->kind == CTV_ENC_MODE)
*cr_lcd = 0x1 | (head ? 0x0 : 0x8);
else
*cr_lcd = 0;

/* Set the DACCLK register */
dacclk = (NVReadRAMDAC(dev, 0, dacclk_off) & ~0x30) | 0x1;
Expand Down

0 comments on commit 9a897e8

Please sign in to comment.