Skip to content

Commit

Permalink
drm/i915: mask the video DIP frequency when changing it
Browse files Browse the repository at this point in the history
Better safe than sorry. Currently we never change the frequency and
use the same for every infoframe type, so the only way to reproduce a
bug would be with the BIOS doing something.

Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Paulo Zanoni authored and Daniel Vetter committed May 8, 2012
1 parent ecb9785 commit 60c5ea2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_reg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1711,6 +1711,7 @@
#define VIDEO_DIP_FREQ_ONCE (0 << 16)
#define VIDEO_DIP_FREQ_VSYNC (1 << 16)
#define VIDEO_DIP_FREQ_2VSYNC (2 << 16)
#define VIDEO_DIP_FREQ_MASK (3 << 16)

/* Panel power sequencing */
#define PP_STATUS 0x61200
Expand Down
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/intel_hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ static void i9xx_write_infoframe(struct drm_encoder *encoder,
}

val |= intel_infoframe_enable(frame);
val &= ~VIDEO_DIP_FREQ_MASK;
val |= intel_infoframe_frequency(frame);

I915_WRITE(VIDEO_DIP_CTL, val);
Expand Down Expand Up @@ -203,6 +204,7 @@ static void ironlake_write_infoframe(struct drm_encoder *encoder,
}

val |= intel_infoframe_enable(frame);
val &= ~VIDEO_DIP_FREQ_MASK;
val |= intel_infoframe_frequency(frame);

I915_WRITE(reg, val);
Expand Down Expand Up @@ -236,6 +238,7 @@ static void vlv_write_infoframe(struct drm_encoder *encoder,
}

val |= intel_infoframe_enable(frame);
val &= ~VIDEO_DIP_FREQ_MASK;
val |= intel_infoframe_frequency(frame);

I915_WRITE(reg, val);
Expand Down

0 comments on commit 60c5ea2

Please sign in to comment.