diff options
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_sdvo.c | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 39eccf908a69..110552ff302c 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -49,7 +49,7 @@ struct intel_dp { | |||
49 | uint32_t DP; | 49 | uint32_t DP; |
50 | uint8_t link_configuration[DP_LINK_CONFIGURATION_SIZE]; | 50 | uint8_t link_configuration[DP_LINK_CONFIGURATION_SIZE]; |
51 | bool has_audio; | 51 | bool has_audio; |
52 | int force_audio; | 52 | enum hdmi_force_audio force_audio; |
53 | uint32_t color_range; | 53 | uint32_t color_range; |
54 | int dpms_mode; | 54 | int dpms_mode; |
55 | uint8_t link_bw; | 55 | uint8_t link_bw; |
@@ -2116,8 +2116,8 @@ intel_dp_detect(struct drm_connector *connector, bool force) | |||
2116 | if (status != connector_status_connected) | 2116 | if (status != connector_status_connected) |
2117 | return status; | 2117 | return status; |
2118 | 2118 | ||
2119 | if (intel_dp->force_audio) { | 2119 | if (intel_dp->force_audio != HDMI_AUDIO_AUTO) { |
2120 | intel_dp->has_audio = intel_dp->force_audio > 0; | 2120 | intel_dp->has_audio = (intel_dp->force_audio == HDMI_AUDIO_ON); |
2121 | } else { | 2121 | } else { |
2122 | edid = intel_dp_get_edid(connector, &intel_dp->adapter); | 2122 | edid = intel_dp_get_edid(connector, &intel_dp->adapter); |
2123 | if (edid) { | 2123 | if (edid) { |
@@ -2217,10 +2217,10 @@ intel_dp_set_property(struct drm_connector *connector, | |||
2217 | 2217 | ||
2218 | intel_dp->force_audio = i; | 2218 | intel_dp->force_audio = i; |
2219 | 2219 | ||
2220 | if (i == 0) | 2220 | if (i == HDMI_AUDIO_AUTO) |
2221 | has_audio = intel_dp_detect_audio(connector); | 2221 | has_audio = intel_dp_detect_audio(connector); |
2222 | else | 2222 | else |
2223 | has_audio = i > 0; | 2223 | has_audio = (i == HDMI_AUDIO_ON); |
2224 | 2224 | ||
2225 | if (has_audio == intel_dp->has_audio) | 2225 | if (has_audio == intel_dp->has_audio) |
2226 | return 0; | 2226 | return 0; |
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c index 724190ec496b..e36b171c1e7d 100644 --- a/drivers/gpu/drm/i915/intel_sdvo.c +++ b/drivers/gpu/drm/i915/intel_sdvo.c | |||
@@ -148,7 +148,7 @@ struct intel_sdvo_connector { | |||
148 | /* Mark the type of connector */ | 148 | /* Mark the type of connector */ |
149 | uint16_t output_flag; | 149 | uint16_t output_flag; |
150 | 150 | ||
151 | int force_audio; | 151 | enum hdmi_force_audio force_audio; |
152 | 152 | ||
153 | /* This contains all current supported TV format */ | 153 | /* This contains all current supported TV format */ |
154 | u8 tv_format_supported[TV_FORMAT_NUM]; | 154 | u8 tv_format_supported[TV_FORMAT_NUM]; |
@@ -1309,8 +1309,8 @@ intel_sdvo_tmds_sink_detect(struct drm_connector *connector) | |||
1309 | 1309 | ||
1310 | if (status == connector_status_connected) { | 1310 | if (status == connector_status_connected) { |
1311 | struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector); | 1311 | struct intel_sdvo_connector *intel_sdvo_connector = to_intel_sdvo_connector(connector); |
1312 | if (intel_sdvo_connector->force_audio) | 1312 | if (intel_sdvo_connector->force_audio != HDMI_AUDIO_AUTO) |
1313 | intel_sdvo->has_hdmi_audio = intel_sdvo_connector->force_audio > 0; | 1313 | intel_sdvo->has_hdmi_audio = (intel_sdvo_connector->force_audio == HDMI_AUDIO_ON); |
1314 | } | 1314 | } |
1315 | 1315 | ||
1316 | return status; | 1316 | return status; |
@@ -1683,10 +1683,10 @@ intel_sdvo_set_property(struct drm_connector *connector, | |||
1683 | 1683 | ||
1684 | intel_sdvo_connector->force_audio = i; | 1684 | intel_sdvo_connector->force_audio = i; |
1685 | 1685 | ||
1686 | if (i == 0) | 1686 | if (i == HDMI_AUDIO_AUTO) |
1687 | has_audio = intel_sdvo_detect_hdmi_audio(connector); | 1687 | has_audio = intel_sdvo_detect_hdmi_audio(connector); |
1688 | else | 1688 | else |
1689 | has_audio = i > 0; | 1689 | has_audio = (i == HDMI_AUDIO_ON); |
1690 | 1690 | ||
1691 | if (has_audio == intel_sdvo->has_hdmi_audio) | 1691 | if (has_audio == intel_sdvo->has_hdmi_audio) |
1692 | return 0; | 1692 | return 0; |