Skip to content

Commit ffc85da

Browse files
committed
drm/i915: Fix AVI/HDMI/SPD infoframes on HSW+
I broke AVI/HDMI/SPD infoframes on HSW+ with the register type safety changes. We were supposed to check that the infoframe data register is valid before writing the infoframe data, but the check ended up inverted, and so in practice we never wrote or enabled these infoframes. We were still sending out the GCP infoframe when the sink was deep-color capable. That and the fact that we use a single bool to track our infoframe state meant that the state checker only caught this when a HDMI sink that doesn't do deep-color was used. We really need to fix our infoframe state checking to be much more anal. But in the meantime let's just fix the regression. In fact let's just throw out the register validity check and convert some of the "unknown info frame type" debug messages into MISSING_CASE(). So far we support the same set of infoframe types on all platforms, so the silent debug messages make no sense. Cc: drm-intel-fixes@lists.freedesktop.org Fixes: f0f59a0 ("drm/i915: Type safe register read/write") Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (irc) Tested-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> (irc) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1450282200-4203-1-git-send-email-ville.syrjala@linux.intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93119 Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 34957e8 commit ffc85da

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/gpu/drm/i915/intel_hdmi.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static u32 g4x_infoframe_index(enum hdmi_infoframe_type type)
7878
case HDMI_INFOFRAME_TYPE_VENDOR:
7979
return VIDEO_DIP_SELECT_VENDOR;
8080
default:
81-
DRM_DEBUG_DRIVER("unknown info frame type %d\n", type);
81+
MISSING_CASE(type);
8282
return 0;
8383
}
8484
}
@@ -93,7 +93,7 @@ static u32 g4x_infoframe_enable(enum hdmi_infoframe_type type)
9393
case HDMI_INFOFRAME_TYPE_VENDOR:
9494
return VIDEO_DIP_ENABLE_VENDOR;
9595
default:
96-
DRM_DEBUG_DRIVER("unknown info frame type %d\n", type);
96+
MISSING_CASE(type);
9797
return 0;
9898
}
9999
}
@@ -108,7 +108,7 @@ static u32 hsw_infoframe_enable(enum hdmi_infoframe_type type)
108108
case HDMI_INFOFRAME_TYPE_VENDOR:
109109
return VIDEO_DIP_ENABLE_VS_HSW;
110110
default:
111-
DRM_DEBUG_DRIVER("unknown info frame type %d\n", type);
111+
MISSING_CASE(type);
112112
return 0;
113113
}
114114
}
@@ -127,7 +127,7 @@ hsw_dip_data_reg(struct drm_i915_private *dev_priv,
127127
case HDMI_INFOFRAME_TYPE_VENDOR:
128128
return HSW_TVIDEO_DIP_VS_DATA(cpu_transcoder, i);
129129
default:
130-
DRM_DEBUG_DRIVER("unknown info frame type %d\n", type);
130+
MISSING_CASE(type);
131131
return INVALID_MMIO_REG;
132132
}
133133
}
@@ -375,8 +375,6 @@ static void hsw_write_infoframe(struct drm_encoder *encoder,
375375
u32 val = I915_READ(ctl_reg);
376376

377377
data_reg = hsw_dip_data_reg(dev_priv, cpu_transcoder, type, 0);
378-
if (i915_mmio_reg_valid(data_reg))
379-
return;
380378

381379
val &= ~hsw_infoframe_enable(type);
382380
I915_WRITE(ctl_reg, val);

0 commit comments

Comments
 (0)