[Intel-gfx] [PATCH] drm/i915: Fix DisplayPort Hotplug
Ville Syrjälä
ville.syrjala at linux.intel.com
Tue Feb 14 15:01:54 UTC 2017
On Fri, Feb 10, 2017 at 02:44:20PM -0800, Palmer Dabbelt wrote:
> DisplayPort no longer hotplugs on my machine (a 2014 MacBook Pro
> attached to an ASUS PB287Q). I believe the problem is that long pulses
> are no longer triggering intel_dp_check_link_status.
That shouldn't itsefl cause problems with hotplugs. It could cause
problems if you hotplug displays without a proper randr client running
in which case the link is left running when you unplug the displays and
then gets retrained when you plug a display back in.
That doesn't explain why intel_dp_check_link_status() wouldn't get
called though. It should be called via intel_dp_detect() ->
intel_dp_long_pulse().
> I bisected the
> problem down to (7d23e3c37 "drm/i915: Cleaning up intel_dp_hpd_pulse")
> and it appears the only material change there was to remove one of those
> calls.
>
> This commit adds the check_link_status call back in, which causes hotplug to
> work again for me. I test this via a "xset dpms force off". Note that this is
> very similar to <https://bugs.freedesktop.org/show_bug.cgi?id=89453>, but it's
> back again.
>
> I've tested this against 4.9, and it applies against the current head.
>
> See <https://bugs.freedesktop.org/show_bug.cgi?id=99766>.
>
> Here's the commit that triggered the regression:
>
> 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
>
> Current DP detection has DPCD operations split across
> intel_dp_hpd_pulse and intel_dp_detect which contains
> duplicates as well. Also intel_dp_detect is called
> during modes enumeration as well which will result
> in multiple dpcd operations. So this patch tries
> to solve both these by bringing all DPCD operations
> in one single function and make intel_dp_detect
> use existing values instead of repeating same steps.
>
> Signed-off-by: Palmer Dabbelt <palmer at dabbelt.com>
> ---
> drivers/gpu/drm/i915/intel_dp.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 0b8e8eb..32ca4be 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -4831,6 +4831,10 @@ intel_dp_hpd_pulse(struct intel_digital_port *intel_dig_port, bool long_hpd)
> long_hpd ? "long" : "short");
>
> if (long_hpd) {
> + drm_modeset_lock(&dev->mode_config.connection_mutex, NULL);
> + intel_dp_check_link_status(intel_dp);
> + drm_modeset_unlock(&dev->mode_config.connection_mutex);
> +
> intel_dp->detect_done = false;
> return IRQ_NONE;
> }
> --
> 2.10.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Ville Syrjälä
Intel OTC
More information about the Intel-gfx
mailing list