[Intel-gfx] [PATCH 10/14] drm/i915: mask the video DIP frequency when changing it
Paulo Zanoni
przanoni at gmail.com
Fri May 4 22:18:22 CEST 2012
From: Paulo Zanoni <paulo.r.zanoni at intel.com>
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 at intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov at intel.com>
---
drivers/gpu/drm/i915/i915_reg.h | 1 +
drivers/gpu/drm/i915/intel_hdmi.c | 3 +++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h
index cc0b90c..6e03732 100644
--- a/drivers/gpu/drm/i915/i915_reg.h
+++ b/drivers/gpu/drm/i915/i915_reg.h
@@ -1710,6 +1710,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
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 6e1086d..979c0ca 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -178,6 +178,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);
@@ -217,6 +218,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);
@@ -250,6 +252,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);
--
1.7.10
More information about the Intel-gfx
mailing list