Commit 28da4f83 authored by Jani Nikula's avatar Jani Nikula

drm/i915/dp: stop caching has_audio in struct intel_dp

Use the information stored in display info.
Reviewed-by: default avatarAnkit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/695bbe8b5ebee6e492f95a1c818da15691752dc8.1685437500.git.jani.nikula@intel.com
parent 3d35ddfb
...@@ -237,7 +237,7 @@ static void intel_dp_info(struct seq_file *m, ...@@ -237,7 +237,7 @@ static void intel_dp_info(struct seq_file *m,
seq_printf(m, "\tDPCD rev: %x\n", intel_dp->dpcd[DP_DPCD_REV]); seq_printf(m, "\tDPCD rev: %x\n", intel_dp->dpcd[DP_DPCD_REV]);
seq_printf(m, "\taudio support: %s\n", seq_printf(m, "\taudio support: %s\n",
str_yes_no(intel_dp->has_audio)); str_yes_no(intel_connector->base.display_info.has_audio));
drm_dp_downstream_debug(m, intel_dp->dpcd, intel_dp->downstream_ports, drm_dp_downstream_debug(m, intel_dp->dpcd, intel_dp->downstream_ports,
edid ? edid->data : NULL, &intel_dp->aux); edid ? edid->data : NULL, &intel_dp->aux);
......
...@@ -1708,7 +1708,6 @@ struct intel_dp { ...@@ -1708,7 +1708,6 @@ struct intel_dp {
u8 sink_count; u8 sink_count;
bool link_trained; bool link_trained;
bool has_hdmi_sink; bool has_hdmi_sink;
bool has_audio;
bool reset_link_params; bool reset_link_params;
bool use_max_params; bool use_max_params;
u8 dpcd[DP_RECEIVER_CAP_SIZE]; u8 dpcd[DP_RECEIVER_CAP_SIZE];
......
...@@ -2159,6 +2159,7 @@ static bool intel_dp_has_audio(struct intel_encoder *encoder, ...@@ -2159,6 +2159,7 @@ static bool intel_dp_has_audio(struct intel_encoder *encoder,
{ {
struct drm_i915_private *i915 = to_i915(encoder->base.dev); struct drm_i915_private *i915 = to_i915(encoder->base.dev);
struct intel_dp *intel_dp = enc_to_intel_dp(encoder); struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
struct intel_connector *connector = intel_dp->attached_connector;
const struct intel_digital_connector_state *intel_conn_state = const struct intel_digital_connector_state *intel_conn_state =
to_intel_digital_connector_state(conn_state); to_intel_digital_connector_state(conn_state);
...@@ -2166,7 +2167,7 @@ static bool intel_dp_has_audio(struct intel_encoder *encoder, ...@@ -2166,7 +2167,7 @@ static bool intel_dp_has_audio(struct intel_encoder *encoder,
return false; return false;
if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO) if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO)
return intel_dp->has_audio; return connector->base.display_info.has_audio;
else else
return intel_conn_state->force_audio == HDMI_AUDIO_ON; return intel_conn_state->force_audio == HDMI_AUDIO_ON;
} }
...@@ -4813,7 +4814,6 @@ intel_dp_set_edid(struct intel_dp *intel_dp) ...@@ -4813,7 +4814,6 @@ intel_dp_set_edid(struct intel_dp *intel_dp)
edid = drm_edid_raw(drm_edid); edid = drm_edid_raw(drm_edid);
if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) { if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {
intel_dp->has_hdmi_sink = drm_detect_hdmi_monitor(edid); intel_dp->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
intel_dp->has_audio = drm_detect_monitor_audio(edid);
} }
drm_dp_cec_set_edid(&intel_dp->aux, edid); drm_dp_cec_set_edid(&intel_dp->aux, edid);
...@@ -4829,7 +4829,6 @@ intel_dp_unset_edid(struct intel_dp *intel_dp) ...@@ -4829,7 +4829,6 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
connector->detect_edid = NULL; connector->detect_edid = NULL;
intel_dp->has_hdmi_sink = false; intel_dp->has_hdmi_sink = false;
intel_dp->has_audio = false;
intel_dp->dfp.max_bpc = 0; intel_dp->dfp.max_bpc = 0;
intel_dp->dfp.max_dotclock = 0; intel_dp->dfp.max_dotclock = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment