Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 282615
b: refs/heads/master
c: 50a01fe
h: refs/heads/master
i:
  282613: 73a2361
  282611: 5bed2de
  282607: fb65e9f
v: v3
  • Loading branch information
Ben Skeggs committed Dec 21, 2011
1 parent 2bde547 commit 12e4356
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 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: 9e7f96aa3a4b26db4a0ac49a96a9b55f1685e8b2
refs/heads/master: 50a01fe06e25b271661c6691bc0907ad5ca2c718
27 changes: 24 additions & 3 deletions trunk/drivers/gpu/drm/nouveau/nouveau_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ nouveau_hdmi_mode_set(struct drm_encoder *encoder,
{
struct nouveau_encoder *nv_encoder = nouveau_encoder(encoder);
struct nouveau_connector *nv_connector;
struct drm_device *dev = encoder->dev;
u32 max_ac_packet, rekey;

nv_connector = nouveau_encoder_connector_get(nv_encoder);
if (!mode || !nv_connector || !nv_connector->edid ||
Expand All @@ -227,11 +229,30 @@ nouveau_hdmi_mode_set(struct drm_encoder *encoder,
return;
}

/* enable hdmi */
hdmi_mask(encoder, 0x0a4, 0x40000000, 0x40000000);

nouveau_hdmi_video_infoframe(encoder, mode);
nouveau_hdmi_audio_infoframe(encoder, mode);

hdmi_mask(encoder, 0x0d0, 0x00070001, 0x00010001); /* SPARE, HW_CTS */
hdmi_mask(encoder, 0x068, 0x00010101, 0x00000000); /* ACR_CTRL, ?? */
hdmi_mask(encoder, 0x078, 0x80000000, 0x80000000); /* ACR_0441_ENABLE */

nv_mask(dev, 0x61733c, 0x00100000, 0x00100000); /* RESETF */
nv_mask(dev, 0x61733c, 0x10000000, 0x10000000); /* LOOKUP_EN */
nv_mask(dev, 0x61733c, 0x00100000, 0x00000000); /* !RESETF */

/* value matches nvidia binary driver, and tegra constant */
rekey = 56;

max_ac_packet = mode->htotal - mode->hdisplay;
max_ac_packet -= rekey;
max_ac_packet -= 18; /* constant from tegra */
max_ac_packet /= 32;

/* enable hdmi */
hdmi_mask(encoder, 0x0a4, 0x5f1f003f, 0x40000000 | /* enable */
0x1f000000 | /* unknown */
max_ac_packet << 16 |
rekey);

nouveau_audio_mode_set(encoder, mode);
}

0 comments on commit 12e4356

Please sign in to comment.