From: Ville Syrjälä Date: Wed, 5 Jul 2023 20:21:10 +0000 (+0300) Subject: drm/i915/sdvo: Issue SetTargetOutput prior to GetAttachedDisplays X-Git-Tag: v6.7-rc1~145^2~15^2~177 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d6f7b19bdff4c62fcbbd0d73868e1292b0ea4d4;p=thirdparty%2Fkernel%2Flinux.git drm/i915/sdvo: Issue SetTargetOutput prior to GetAttachedDisplays I have at least one SDVO device (some Lenovo DVI-I ADD2 card, based on Conexant CX25904) where GetAttachedDisplays returns success but fails to report any attached displays unless we precede the command with a SetTargetOutput. Make it so. I wasn't able to spot anything in the SDVO spec stating that this should be necessary, but real world wins over spec. Signed-off-by: Ville Syrjälä Link: https://patchwork.freedesktop.org/patch/msgid/20230705202122.17915-2-ville.syrjala@linux.intel.com Acked-by: Jani Nikula --- diff --git a/drivers/gpu/drm/i915/display/intel_sdvo.c b/drivers/gpu/drm/i915/display/intel_sdvo.c index 7d25a64698e2f..7108d031271a9 100644 --- a/drivers/gpu/drm/i915/display/intel_sdvo.c +++ b/drivers/gpu/drm/i915/display/intel_sdvo.c @@ -2135,6 +2135,10 @@ intel_sdvo_detect(struct drm_connector *connector, bool force) if (!INTEL_DISPLAY_ENABLED(i915)) return connector_status_disconnected; + if (!intel_sdvo_set_target_output(intel_sdvo, + intel_sdvo_connector->output_flag)) + return connector_status_unknown; + if (!intel_sdvo_get_value(intel_sdvo, SDVO_CMD_GET_ATTACHED_DISPLAYS, &response, 2))