[Intel-gfx] [PATCH] drm/i915: Refine the has_audio assignment

Yang yang.a.shi at intel.com
Fri Apr 13 04:06:45 UTC 2018


From: Yang Shi <yang.a.shi at intel.com>

Refine the has_audio assignment for dp and hdmi.

Signed-off-by: Yang Shi <yang.a.shi at intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c   | 2 +-
 drivers/gpu/drm/i915/intel_hdmi.c | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a29868c..47aa2ea 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1644,7 +1644,7 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	else if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
 		pipe_config->has_audio = intel_dp->has_audio;
 	else
-		pipe_config->has_audio = intel_conn_state->force_audio == HDMI_AUDIO_ON;
+		pipe_config->has_audio = false;
 
 	if (intel_dp_is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
 		struct drm_display_mode *panel_mode =
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 179d0ad..3c4b92e 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -1474,8 +1474,7 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 		if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
 			pipe_config->has_audio = intel_hdmi->has_audio;
 		else
-			pipe_config->has_audio =
-				intel_conn_state->force_audio == HDMI_AUDIO_ON;
+			pipe_config->has_audio = false;
 	}
 
 	/*
-- 
2.7.4



More information about the Intel-gfx mailing list