[Intel-gfx] [PATCH] drm/i915: Do not reset detect_done flag in intel_dp_detect
Jani Nikula
jani.nikula at linux.intel.com
Wed Dec 7 08:52:15 UTC 2016
On Wed, 07 Dec 2016, Manasi Navare <manasi.d.navare at intel.com> wrote:
> The detect_done flag was introduced in the commit
> 7d23e3c37bb3fc6952dc84007ee60cb533fd2d5c in order to avoid
The preferred format to cite commits is:
7d23e3c37bb3 ("drm/i915: Cleaning up intel_dp_hpd_pulse")
or
commit 7d23e3c37bb3fc6952dc84007ee60cb533fd2d5c
Author: Shubhangi Shrivastava <shubhangi.shrivastava at intel.com>
Date: Wed Mar 30 18:05:23 2016 +0530
drm/i915: Cleaning up intel_dp_hpd_pulse
> multiple detects on hotplug where intel_dp_long_pulse()
> was called from HPD handler as well as in intel_dp_detect.
> So this detect_done flag was required to make sure intel_dp_detect()
> did not call long pulse handler again if it was already been called
> from HPD handler. However commit 1015811609c0328b5ed670d07748591b837e74eb
1015811609c0 ("drm/i915: Move long hpd handling into the hotplug work")
> differs the long hpd handling entirely until the hotplug work runs to
> avoid the double long hpd handling the "detect_done" flag is trying
> to prevent.
>
> So now we do not need to reset the detect_done flag to false in
> intel_dp_detect. It will be reset in the intel_dp_hpd_pulse so
> that intel_dp_detect does a full detect. However if the .detect
> gets called during mode enumeration then we do not need to do a
> full detect. This patch avoids the WARNS_ONS during connected boot
Please include such a backtrace in the commit message; it makes matching
bugs and fixes so much easier.
IIUC the warnings were introduced by 1015811609c0 ("drm/i915: Move long
hpd handling into the hotplug work"), and that's cc: stable, so this one
should be too, along with
Fixes: 1015811609c0 ("drm/i915: Move long hpd handling into the hotplug work")
Cc: stable at vger.kernel.org
Of course, someone(tm) will still need to make sure this is the right
fix...
BR,
Jani.
> case when it calls intel_dp_check_link_status() due to multiple
> detects and also avoids DP compliance failures. It avoids doing
> a full detect every single time on .detect().
>
> Cc: Ville Syrjala <ville.syrjala at linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter at ffwll.ch>
> Cc: Jani Nikula <jani.nikula at linux.intel.com>
> Signed-off-by: Manasi Navare <manasi.d.navare at intel.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index db75bb9..9c9277e 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4470,8 +4470,6 @@ static bool intel_digital_port_connected(struct drm_i915_private *dev_priv,
> if (!intel_dp->detect_done)
> status = intel_dp_long_pulse(intel_dp->attached_connector);
>
> - intel_dp->detect_done = false;
> -
> return status;
> }
--
Jani Nikula, Intel Open Source Technology Center
More information about the Intel-gfx
mailing list