Re: [PATCH 2/2] drm/i915: Retry after 30ms if we fail to resume DP MST

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 11, 2016 at 10:57:02AM -0500, Lyude wrote:
> For whatever reason, I've found that some laptops aren't immediately
> capable of doing aux transactions with their docks when they come out of
> standby. While I'm still not entirely sure what the cause of this is,
> sleeping for 30ms and then retrying drm_dp_mst_topology_mgr_resume()
> should be a sufficient enough workaround until we find a real fix.
> 
> CC: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Lyude <cpaul@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/i915/intel_dp.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 1d8de43..8cc5f6f 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -6114,6 +6114,19 @@ void intel_dp_mst_resume(struct drm_device *dev)
>  
>  			ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
>  			if (ret != 0) {
> +				/*
> +				 * For some reason, some laptops can't bring
> +				 * their MST docks back up immediately after
> +				 * resume and need to wait a short period of
> +				 * time before aux transactions with the dock
> +				 * become functional again. Until we find a
> +				 * proper fix for this, this workaround should
> +				 * suffice
> +				 */
> +				msleep(30);
> +				ret = drm_dp_mst_topology_mgr_resume(&intel_dig_port->dp.mst_mgr);
> +			}

Hm, since it's the dp aux that fails (and not something higher up
apparently) shouldnt' we have this massive retry somewhere in the dp aux
helpers maybe? DP resume in general is a bit fragile, maybe we're just
missing a lot of retries in general?

Either way this needs a lot more details. Comment definitely should start
out with FIXME, and the commit message should have a protocol of all the
experiments you've done thus far. Yes this means a ridiculously long
commit message, but in roughly 2 weeks someone else will go wtf on this,
and then they must be able to read up the full story. And we need links to
bugzillas and mail threads, too.

And please Cc: Art with this one too.

Thanks, Daniel

> +			if (ret != 0) {
>  				intel_dp_check_mst_status(&intel_dig_port->dp);
>  			}
>  		}
> -- 
> 2.5.0
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]