Skip to content

Commit 7c1000a

Browse files
committed
drm/i915/hdmi: stop caching has_hdmi_sink 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/5cdb4731260b062c0f0ad2f8b64195c9a57bcb76.1685437500.git.jani.nikula@intel.com
1 parent 9fe2a4a commit 7c1000a

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,6 @@ struct intel_hdmi {
15861586
enum drm_dp_dual_mode_type type;
15871587
int max_tmds_clock;
15881588
} dp_dual_mode;
1589-
bool has_hdmi_sink;
15901589
struct intel_connector *attached_connector;
15911590
struct cec_notifier *cec_notifier;
15921591
};

drivers/gpu/drm/i915/display/intel_hdmi.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1790,7 +1790,9 @@ static int intel_hdmi_source_max_tmds_clock(struct intel_encoder *encoder)
17901790
static bool intel_has_hdmi_sink(struct intel_hdmi *hdmi,
17911791
const struct drm_connector_state *conn_state)
17921792
{
1793-
return hdmi->has_hdmi_sink &&
1793+
struct intel_connector *connector = hdmi->attached_connector;
1794+
1795+
return connector->base.display_info.is_hdmi &&
17941796
READ_ONCE(to_intel_digital_connector_state(conn_state)->force_audio) != HDMI_AUDIO_OFF_DVI;
17951797
}
17961798

@@ -2385,8 +2387,6 @@ intel_hdmi_unset_edid(struct drm_connector *connector)
23852387
{
23862388
struct intel_hdmi *intel_hdmi = intel_attached_hdmi(to_intel_connector(connector));
23872389

2388-
intel_hdmi->has_hdmi_sink = false;
2389-
23902390
intel_hdmi->dp_dual_mode.type = DRM_DP_DUAL_MODE_NONE;
23912391
intel_hdmi->dp_dual_mode.max_tmds_clock = 0;
23922392

@@ -2478,8 +2478,6 @@ intel_hdmi_set_edid(struct drm_connector *connector)
24782478
/* FIXME: Get rid of drm_edid_raw() */
24792479
edid = drm_edid_raw(drm_edid);
24802480
if (edid && edid->input & DRM_EDID_INPUT_DIGITAL) {
2481-
intel_hdmi->has_hdmi_sink = drm_detect_hdmi_monitor(edid);
2482-
24832481
intel_hdmi_dp_dual_mode_detect(connector);
24842482

24852483
connected = true;

0 commit comments

Comments
 (0)