From: Jani Nikula <jani.nikula@linux.intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>,
intel-gfx@lists.freedesktop.org
Cc: stable@vger.kernel.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Also check for VGA converter in eDP probe
Date: Mon, 20 Nov 2023 14:53:17 +0200 [thread overview]
Message-ID: <87v89woabm.fsf@intel.com> (raw)
In-Reply-To: <20231114142333.15799-1-ville.syrjala@linux.intel.com>
On Tue, 14 Nov 2023, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Unfortunately even the HPD based detection added in
> commit cfe5bdfb27fa ("drm/i915: Check HPD live state during eDP probe")
> fails to detect that the VBT's eDP/DDI-A is a ghost on
> Asus B360M-A (CFL+CNP). On that board eDP/DDI-A has its HPD
> asserted despite nothing being actually connected there :(
> The straps/fuses also indicate that the eDP port is present.
>
> So if one boots with a VGA monitor connected the eDP probe will
> mistake the DP->VGA converter hooked to DDI-E for an eDP panel
> on DDI-A.
>
> As a last resort check what kind of DP device we've detected,
> and if it looks like a DP->VGA converter then conclude that
> the eDP port should be ignored.
>
> Cc: stable@vger.kernel.org
> Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/9636
> Fixes: cfe5bdfb27fa ("drm/i915: Check HPD live state during eDP probe")
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fingers crossed.
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 28 +++++++++++++++++++------
> 1 file changed, 22 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 54bd0bffa9f0..14ee05fabd05 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -6277,8 +6277,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> * (eg. Acer Chromebook C710), so we'll check it only if multiple
> * ports are attempting to use the same AUX CH, according to VBT.
> */
> - if (intel_bios_dp_has_shared_aux_ch(encoder->devdata) &&
> - !intel_digital_port_connected(encoder)) {
> + if (intel_bios_dp_has_shared_aux_ch(encoder->devdata)) {
> /*
> * If this fails, presume the DPCD answer came
> * from some other port using the same AUX CH.
> @@ -6286,10 +6285,27 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp,
> * FIXME maybe cleaner to check this before the
> * DPCD read? Would need sort out the VDD handling...
> */
> - drm_info(&dev_priv->drm,
> - "[ENCODER:%d:%s] HPD is down, disabling eDP\n",
> - encoder->base.base.id, encoder->base.name);
> - goto out_vdd_off;
> + if (!intel_digital_port_connected(encoder)) {
> + drm_info(&dev_priv->drm,
> + "[ENCODER:%d:%s] HPD is down, disabling eDP\n",
> + encoder->base.base.id, encoder->base.name);
> + goto out_vdd_off;
> + }
> +
> + /*
> + * Unfortunately even the HPD based detection fails on
> + * eg. Asus B360M-A (CFL+CNP), so as a last resort fall
> + * back to checking for a VGA branch device. Only do this
> + * on known affected platforms to minimize false positives.
> + */
> + if (DISPLAY_VER(dev_priv) == 9 && drm_dp_is_branch(intel_dp->dpcd) &&
> + (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] & DP_DWN_STRM_PORT_TYPE_MASK) ==
> + DP_DWN_STRM_PORT_TYPE_ANALOG) {
> + drm_info(&dev_priv->drm,
> + "[ENCODER:%d:%s] VGA converter detected, disabling eDP\n",
> + encoder->base.base.id, encoder->base.name);
> + goto out_vdd_off;
> + }
> }
>
> mutex_lock(&dev_priv->drm.mode_config.mutex);
--
Jani Nikula, Intel
prev parent reply other threads:[~2023-11-20 12:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 14:23 [Intel-gfx] [PATCH] drm/i915: Also check for VGA converter in eDP probe Ville Syrjala
2023-11-14 14:23 ` Ville Syrjala
2023-11-14 22:26 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2023-11-16 5:06 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Also check for VGA converter in eDP probe (rev2) Patchwork
2023-11-16 22:21 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Also check for VGA converter in eDP probe (rev3) Patchwork
2023-11-17 19:08 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-11-20 12:53 ` Jani Nikula [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v89woabm.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=stable@vger.kernel.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.