OSDN Git Service

drm/i915/hdmi: do dual mode detect only if connected
authorJani Nikula <jani.nikula@intel.com>
Mon, 24 Oct 2022 12:33:29 +0000 (15:33 +0300)
committerJani Nikula <jani.nikula@intel.com>
Wed, 26 Oct 2022 06:52:36 +0000 (09:52 +0300)
commit6e0fff462eccaeed9f499c3d5e661aed688ef4e4
tree2f558e261edcee0af18f77a8e2338f2af775cb14
parent71bb70f87d636c875212d75ecdde048588914e19
drm/i915/hdmi: do dual mode detect only if connected

For normal connector detect, there's really no point in trying dual mode
detect if the connector is disconnected. We can simplify the detect
sequence by skipping it. Since intel_hdmi_dp_dual_mode_detect() is only
called when EDID is present, we can drop the has_edid parameter.

The functional effect is speeding up disconnected connector detection
ever so slightly, and, combined with firmware EDID, also stop logging
about assuming dual mode adaptor.

It's a bit subtle, but this will also skip dual mode detect if the
connector is force connected and a) there's no EDID of any kind, normal
or override/firmware or b) there's EDID but it does not indicate
digital. These are corner cases no matter what, and arguably forcing
should not be limited by dual mode detect.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/f8f2a4a147e1c87ba93269a607f71fc29c4b59f6.1666614699.git.jani.nikula@intel.com
drivers/gpu/drm/i915/display/intel_hdmi.c