Lines Matching refs:intel_hdmi
40 struct intel_hdmi { struct
51 static struct intel_hdmi *enc_to_intel_hdmi(struct drm_encoder *encoder) in enc_to_intel_hdmi() argument
53 return container_of(encoder, struct intel_hdmi, base.base); in enc_to_intel_hdmi()
56 static struct intel_hdmi *intel_attached_hdmi(struct drm_connector *connector) in intel_attached_hdmi()
59 struct intel_hdmi, base); in intel_attached_hdmi()
87 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); in intel_hdmi_set_avi_infoframe() local
91 if (!intel_hdmi->has_hdmi_sink) in intel_hdmi_set_avi_infoframe()
95 if (intel_hdmi->sdvox_reg == SDVOB) in intel_hdmi_set_avi_infoframe()
97 else if (intel_hdmi->sdvox_reg == SDVOC) in intel_hdmi_set_avi_infoframe()
124 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); in intel_hdmi_mode_set() local
128 sdvox |= intel_hdmi->color_range; in intel_hdmi_mode_set()
135 if (intel_hdmi->has_hdmi_sink && HAS_PCH_CPT(dev)) in intel_hdmi_mode_set()
138 if (intel_hdmi->has_audio) { in intel_hdmi_mode_set()
150 I915_WRITE(intel_hdmi->sdvox_reg, sdvox); in intel_hdmi_mode_set()
151 POSTING_READ(intel_hdmi->sdvox_reg); in intel_hdmi_mode_set()
160 struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); in intel_hdmi_dpms() local
163 temp = I915_READ(intel_hdmi->sdvox_reg); in intel_hdmi_dpms()
169 I915_WRITE(intel_hdmi->sdvox_reg, temp & ~SDVO_ENABLE); in intel_hdmi_dpms()
170 POSTING_READ(intel_hdmi->sdvox_reg); in intel_hdmi_dpms()
179 I915_WRITE(intel_hdmi->sdvox_reg, temp); in intel_hdmi_dpms()
180 POSTING_READ(intel_hdmi->sdvox_reg); in intel_hdmi_dpms()
186 I915_WRITE(intel_hdmi->sdvox_reg, temp); in intel_hdmi_dpms()
187 POSTING_READ(intel_hdmi->sdvox_reg); in intel_hdmi_dpms()
215 struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector); in intel_hdmi_detect() local
220 intel_hdmi->has_hdmi_sink = false; in intel_hdmi_detect()
221 intel_hdmi->has_audio = false; in intel_hdmi_detect()
223 &dev_priv->gmbus[intel_hdmi->ddc_bus].adapter); in intel_hdmi_detect()
228 intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid); in intel_hdmi_detect()
229 intel_hdmi->has_audio = drm_detect_monitor_audio(edid); in intel_hdmi_detect()
236 if (intel_hdmi->force_audio) in intel_hdmi_detect()
237 intel_hdmi->has_audio = intel_hdmi->force_audio > 0; in intel_hdmi_detect()
245 struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector); in intel_hdmi_get_modes() local
253 &dev_priv->gmbus[intel_hdmi->ddc_bus].adapter); in intel_hdmi_get_modes()
259 struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector); in intel_hdmi_detect_audio() local
265 &dev_priv->gmbus[intel_hdmi->ddc_bus].adapter); in intel_hdmi_detect_audio()
282 struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector); in intel_hdmi_set_property() local
290 if (property == intel_hdmi->force_audio_property) { in intel_hdmi_set_property()
294 if (i == intel_hdmi->force_audio) in intel_hdmi_set_property()
297 intel_hdmi->force_audio = i; in intel_hdmi_set_property()
304 if (has_audio == intel_hdmi->has_audio) in intel_hdmi_set_property()
307 intel_hdmi->has_audio = has_audio; in intel_hdmi_set_property()
312 if (val == !!intel_hdmi->color_range) in intel_hdmi_set_property()
315 intel_hdmi->color_range = val ? SDVO_COLOR_RANGE_16_235 : 0; in intel_hdmi_set_property()
322 if (intel_hdmi->base.base.crtc) { in intel_hdmi_set_property()
323 struct drm_crtc *crtc = intel_hdmi->base.base.crtc; in intel_hdmi_set_property()
366 intel_hdmi_add_properties(struct intel_hdmi *intel_hdmi, struct drm_connector *connector) in intel_hdmi_add_properties() argument
370 intel_hdmi->force_audio_property = in intel_hdmi_add_properties()
372 if (intel_hdmi->force_audio_property) { in intel_hdmi_add_properties()
373 intel_hdmi->force_audio_property->values[0] = -1; in intel_hdmi_add_properties()
374 intel_hdmi->force_audio_property->values[1] = 1; in intel_hdmi_add_properties()
375 drm_connector_attach_property(connector, intel_hdmi->force_audio_property, 0); in intel_hdmi_add_properties()
387 struct intel_hdmi *intel_hdmi; in intel_hdmi_init() local
389 intel_hdmi = kzalloc(sizeof(struct intel_hdmi), GFP_KERNEL); in intel_hdmi_init()
390 if (!intel_hdmi) in intel_hdmi_init()
395 kfree(intel_hdmi); in intel_hdmi_init()
399 intel_encoder = &intel_hdmi->base; in intel_hdmi_init()
418 intel_hdmi->ddc_bus = GMBUS_PORT_DPB; in intel_hdmi_init()
422 intel_hdmi->ddc_bus = GMBUS_PORT_DPC; in intel_hdmi_init()
426 intel_hdmi->ddc_bus = GMBUS_PORT_DPB; in intel_hdmi_init()
430 intel_hdmi->ddc_bus = GMBUS_PORT_DPC; in intel_hdmi_init()
434 intel_hdmi->ddc_bus = GMBUS_PORT_DPD; in intel_hdmi_init()
438 intel_hdmi->sdvox_reg = sdvox_reg; in intel_hdmi_init()
442 intel_hdmi_add_properties(intel_hdmi, connector); in intel_hdmi_init()