Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 222744
b: refs/heads/master
c: da79de9
h: refs/heads/master
v: v3
  • Loading branch information
Chris Wilson committed Nov 22, 2010
1 parent aa118c5 commit a37430a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4ab0fbd3a29067e1540f05093ae4ed07645d18c8
refs/heads/master: da79de97d254145dcb7c08c978b1093eac15ec9c
25 changes: 14 additions & 11 deletions trunk/drivers/gpu/drm/i915/intel_sdvo.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ struct intel_sdvo {
* This is set if we treat the device as HDMI, instead of DVI.
*/
bool is_hdmi;
bool has_audio;
bool has_hdmi_monitor;
bool has_hdmi_audio;

/**
* This is set if we detect output of sdvo device as LVDS and
Expand Down Expand Up @@ -1023,7 +1024,7 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
if (!intel_sdvo_set_target_input(intel_sdvo))
return;

if (intel_sdvo->is_hdmi &&
if (intel_sdvo->has_hdmi_monitor &&
!intel_sdvo_set_avi_infoframe(intel_sdvo))
return;

Expand Down Expand Up @@ -1063,7 +1064,7 @@ static void intel_sdvo_mode_set(struct drm_encoder *encoder,
}
if (intel_crtc->pipe == 1)
sdvox |= SDVO_PIPE_B_SELECT;
if (intel_sdvo->has_audio)
if (intel_sdvo->has_hdmi_audio)
sdvox |= SDVO_AUDIO_ENABLE;

if (INTEL_INFO(dev)->gen >= 4) {
Expand Down Expand Up @@ -1388,8 +1389,10 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
/* DDC bus is shared, match EDID to connector type */
if (edid->input & DRM_EDID_INPUT_DIGITAL) {
status = connector_status_connected;
intel_sdvo->is_hdmi = drm_detect_hdmi_monitor(edid);
intel_sdvo->has_audio = drm_detect_monitor_audio(edid);
if (intel_sdvo->is_hdmi) {
intel_sdvo->has_hdmi_monitor = drm_detect_hdmi_monitor(edid);
intel_sdvo->has_hdmi_audio = drm_detect_monitor_audio(edid);
}
}
connector->display_info.raw_edid = NULL;
kfree(edid);
Expand All @@ -1398,7 +1401,7 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
if (status == connector_status_connected) {
struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector);
if (intel_sdvo_connector->force_audio)
intel_sdvo->has_audio = intel_sdvo_connector->force_audio > 0;
intel_sdvo->has_hdmi_audio = intel_sdvo_connector->force_audio > 0;
}

return status;
Expand Down Expand Up @@ -1713,12 +1716,12 @@ intel_sdvo_set_property(struct drm_connector *connector,

intel_sdvo_connector->force_audio = val;

if (val > 0 && intel_sdvo->has_audio)
if (val > 0 && intel_sdvo->has_hdmi_audio)
return 0;
if (val < 0 && !intel_sdvo->has_audio)
if (val < 0 && !intel_sdvo->has_hdmi_audio)
return 0;

intel_sdvo->has_audio = val > 0;
intel_sdvo->has_hdmi_audio = val > 0;
goto done;
}

Expand Down Expand Up @@ -2070,15 +2073,15 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
intel_sdvo_set_colorimetry(intel_sdvo,
SDVO_COLORIMETRY_RGB256);
connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;

intel_sdvo_add_hdmi_properties(intel_sdvo_connector);
intel_sdvo->is_hdmi = true;
}
intel_sdvo->base.clone_mask = ((1 << INTEL_SDVO_NON_TV_CLONE_BIT) |
(1 << INTEL_ANALOG_CLONE_BIT));

intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);

intel_sdvo_add_hdmi_properties(intel_sdvo_connector);

return true;
}

Expand Down

0 comments on commit a37430a

Please sign in to comment.