diff options
author | 2023-05-30 12:08:17 +0300 | |
---|---|---|
committer | 2023-06-02 13:21:36 +0300 | |
commit | 9fe2a4adc09567e32a5ecd4cab236022436a16c2 (patch) | |
tree | 44301e90b14184e2d3c1ab60ce1e0a757fc921a4 /drivers/gpu/drm/i915/display/intel_hdmi.c | |
parent | drm/i915/dp: stop caching has_hdmi_sink in struct intel_dp (diff) | |
download | wireguard-linux-9fe2a4adc09567e32a5ecd4cab236022436a16c2.tar.xz wireguard-linux-9fe2a4adc09567e32a5ecd4cab236022436a16c2.zip |
drm/i915/hdmi: stop caching has_audio in struct intel_hdmi
Use the information stored in display info.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/710286536d6b07ba8aa068b65b2b2c0c7743220e.1685437500.git.jani.nikula@intel.com
Diffstat (limited to '')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_hdmi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_hdmi.c b/drivers/gpu/drm/i915/display/intel_hdmi.c index c2464f98c76e..89a6b574f95a 100644 --- a/drivers/gpu/drm/i915/display/intel_hdmi.c +++ b/drivers/gpu/drm/i915/display/intel_hdmi.c @@ -2169,7 +2169,7 @@ static bool intel_hdmi_has_audio(struct intel_encoder *encoder, const struct intel_crtc_state *crtc_state, const struct drm_connector_state *conn_state) { - struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(encoder); + struct drm_connector *connector = conn_state->connector; const struct intel_digital_connector_state *intel_conn_state = to_intel_digital_connector_state(conn_state); @@ -2177,7 +2177,7 @@ static bool intel_hdmi_has_audio(struct intel_encoder *encoder, return false; if (intel_conn_state->force_audio == HDMI_AUDIO_AUTO) - return intel_hdmi->has_audio; + return connector->display_info.has_audio; else return intel_conn_state->force_audio == HDMI_AUDIO_ON; } @@ -2386,7 +2386,6 @@ intel_hdmi_unset_edid(struct drm_connector *connector) struct intel_hdmi *intel_hdmi = intel_attached_hdmi(to_intel_connector(connector)); intel_hdmi->has_hdmi_sink = false; - intel_hdmi->has_audio = false; intel_hdmi->dp_dual_mode.type = DRM_DP_DUAL_MODE_NONE; intel_hdmi->dp_dual_mode.max_tmds_clock = 0; @@ -2479,7 +2478,6 @@ intel_hdmi_set_edid(struct drm_connector *connector) /* FIXME: Get rid of drm_edid_raw() */ edid = drm_edid_raw(drm_edid); if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) { - intel_hdmi->has_audio = drm_detect_monitor_audio(edid); intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid); intel_hdmi_dp_dual_mode_detect(connector); |