Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318527
b: refs/heads/master
c: 72b78c9
h: refs/heads/master
i:
  318525: 6a6e8e4
  318523: 6fdb347
  318519: c9c0e2e
  318511: 7788b98
  318495: 9ccec0b
  318463: ce95fe4
v: v3
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed May 30, 2012
1 parent 3ffa7ef commit 039459a
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 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: 0dd87d2084fc9e1f663d3a2c24f0e3f94b7f20e4
refs/heads/master: 72b78c9d19ee3e69988424c499498e50eaba0859
32 changes: 25 additions & 7 deletions trunk/drivers/gpu/drm/i915/intel_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ static void g4x_set_infoframes(struct drm_encoder *encoder,
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = VIDEO_DIP_CTL;
u32 val = I915_READ(reg);
u32 port;

/* If the registers were not initialized yet, they might be zeroes,
* which means we're selecting the AVI DIP and we're setting its
Expand All @@ -337,18 +338,26 @@ static void g4x_set_infoframes(struct drm_encoder *encoder,
return;
}

val &= ~VIDEO_DIP_PORT_MASK;
switch (intel_hdmi->sdvox_reg) {
case SDVOB:
val |= VIDEO_DIP_PORT_B;
port = VIDEO_DIP_PORT_B;
break;
case SDVOC:
val |= VIDEO_DIP_PORT_C;
port = VIDEO_DIP_PORT_C;
break;
default:
return;
}

if (port != (val & VIDEO_DIP_PORT_MASK)) {
if (val & VIDEO_DIP_ENABLE) {
val &= ~VIDEO_DIP_ENABLE;
I915_WRITE(reg, val);
}
val &= ~VIDEO_DIP_PORT_MASK;
val |= port;
}

val |= VIDEO_DIP_ENABLE;
val &= ~VIDEO_DIP_ENABLE_VENDOR;

Expand All @@ -366,6 +375,7 @@ static void ibx_set_infoframes(struct drm_encoder *encoder,
struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder);
u32 reg = TVIDEO_DIP_CTL(intel_crtc->pipe);
u32 val = I915_READ(reg);
u32 port;

/* See the big comment in g4x_set_infoframes() */
val |= VIDEO_DIP_SELECT_AVI | VIDEO_DIP_FREQ_VSYNC;
Expand All @@ -378,21 +388,29 @@ static void ibx_set_infoframes(struct drm_encoder *encoder,
return;
}

val &= ~VIDEO_DIP_PORT_MASK;
switch (intel_hdmi->sdvox_reg) {
case HDMIB:
val |= VIDEO_DIP_PORT_B;
port = VIDEO_DIP_PORT_B;
break;
case HDMIC:
val |= VIDEO_DIP_PORT_C;
port = VIDEO_DIP_PORT_C;
break;
case HDMID:
val |= VIDEO_DIP_PORT_D;
port = VIDEO_DIP_PORT_D;
break;
default:
return;
}

if (port != (val & VIDEO_DIP_PORT_MASK)) {
if (val & VIDEO_DIP_ENABLE) {
val &= ~VIDEO_DIP_ENABLE;
I915_WRITE(reg, val);
}
val &= ~VIDEO_DIP_PORT_MASK;
val |= port;
}

val |= VIDEO_DIP_ENABLE;
val &= ~(VIDEO_DIP_ENABLE_VENDOR | VIDEO_DIP_ENABLE_GAMUT |
VIDEO_DIP_ENABLE_GCP);
Expand Down

0 comments on commit 039459a

Please sign in to comment.