aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaulo Zanoni <paulo.r.zanoni@intel.com>2012-05-28 15:42:55 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-05-30 17:03:39 -0400
commit9d32d1653db10eaba3140dd1a2f8dad51122f0b5 (patch)
treeba113e511cf8afb340470befa55a5b3bc5655ec7
parent72b78c9d19ee3e69988424c499498e50eaba0859 (diff)
drm/i915: don't write 0 to DIP control at HDMI init
At this time, the HDMI port is enabled, and the DIP control register specification says we need to disable the port *before* disabling the DIPs. Also, while doing this we risk telling the HW to send the AVI DIPs once (not every VSync), which really seems to confuse the HW and trigger bugs where the DIPs are not sent. This code was here just to set the DIP register to a 'known state' before using it, but since now the set_infoframes functions already set the control registers to a known state, this code can go away. Also, the previous code disables *all* the DIP registers for *each* HDMI port, so we end disabling each DIP register more than once. This patch solves a problem I can reproduce on my IVB machine. When I boot it with just a single HDMI monitor, the AVI InfoFrames are not sent. With this patch, the InfoFrames are sent. Previously, I wrote a patch to 'touch the DIP registers after we enable the HDMI port' to solve this same problem, but that patch doesn't seem to be needed anymore after this patch. All this patch does is revert a chunk of the following commit: commit 64a8fc0145a1d0fdc25fc9367c2e6c621955fb3b Author: Jesse Barnes <jbarnes@virtuousgeek.org> Date: Thu Sep 22 11:16:00 2011 +0530 drm/i915: fix ILK+ infoframe support So bugs that can be bisected to that commit may be fixed now. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=43256 Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index c858da986fdd..65af12ee98b1 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -816,7 +816,6 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
816 struct intel_encoder *intel_encoder; 816 struct intel_encoder *intel_encoder;
817 struct intel_connector *intel_connector; 817 struct intel_connector *intel_connector;
818 struct intel_hdmi *intel_hdmi; 818 struct intel_hdmi *intel_hdmi;
819 int i;
820 819
821 intel_hdmi = kzalloc(sizeof(struct intel_hdmi), GFP_KERNEL); 820 intel_hdmi = kzalloc(sizeof(struct intel_hdmi), GFP_KERNEL);
822 if (!intel_hdmi) 821 if (!intel_hdmi)
@@ -894,30 +893,21 @@ void intel_hdmi_init(struct drm_device *dev, int sdvox_reg)
894 if (!HAS_PCH_SPLIT(dev)) { 893 if (!HAS_PCH_SPLIT(dev)) {
895 intel_hdmi->write_infoframe = g4x_write_infoframe; 894 intel_hdmi->write_infoframe = g4x_write_infoframe;
896 intel_hdmi->set_infoframes = g4x_set_infoframes; 895 intel_hdmi->set_infoframes = g4x_set_infoframes;
897 I915_WRITE(VIDEO_DIP_CTL, 0);
898 } else if (IS_VALLEYVIEW(dev)) { 896 } else if (IS_VALLEYVIEW(dev)) {
899 intel_hdmi->write_infoframe = vlv_write_infoframe; 897 intel_hdmi->write_infoframe = vlv_write_infoframe;
900 intel_hdmi->set_infoframes = vlv_set_infoframes; 898 intel_hdmi->set_infoframes = vlv_set_infoframes;
901 for_each_pipe(i)
902 I915_WRITE(VLV_TVIDEO_DIP_CTL(i), 0);
903 } else if (IS_HASWELL(dev)) { 899 } else if (IS_HASWELL(dev)) {
904 /* FIXME: Haswell has a new set of DIP frame registers, but we are 900 /* FIXME: Haswell has a new set of DIP frame registers, but we are
905 * just doing the minimal required for HDMI to work at this stage. 901 * just doing the minimal required for HDMI to work at this stage.
906 */ 902 */
907 intel_hdmi->write_infoframe = hsw_write_infoframe; 903 intel_hdmi->write_infoframe = hsw_write_infoframe;
908 intel_hdmi->set_infoframes = hsw_set_infoframes; 904 intel_hdmi->set_infoframes = hsw_set_infoframes;
909 for_each_pipe(i)
910 I915_WRITE(HSW_TVIDEO_DIP_CTL(i), 0);
911 } else if (HAS_PCH_IBX(dev)) { 905 } else if (HAS_PCH_IBX(dev)) {
912 intel_hdmi->write_infoframe = ibx_write_infoframe; 906 intel_hdmi->write_infoframe = ibx_write_infoframe;
913 intel_hdmi->set_infoframes = ibx_set_infoframes; 907 intel_hdmi->set_infoframes = ibx_set_infoframes;
914 for_each_pipe(i)
915 I915_WRITE(TVIDEO_DIP_CTL(i), 0);
916 } else { 908 } else {
917 intel_hdmi->write_infoframe = cpt_write_infoframe; 909 intel_hdmi->write_infoframe = cpt_write_infoframe;
918 intel_hdmi->set_infoframes = cpt_set_infoframes; 910 intel_hdmi->set_infoframes = cpt_set_infoframes;
919 for_each_pipe(i)
920 I915_WRITE(TVIDEO_DIP_CTL(i), 0);
921 } 911 }
922 912
923 if (IS_HASWELL(dev)) 913 if (IS_HASWELL(dev))