[Intel-gfx] [PATCH 2/3] drm/i915: Do drm_mode_config_reset() after HPD init
Imre Deak
imre.deak at intel.com
Mon Oct 12 20:16:50 UTC 2020
On Tue, Oct 06, 2020 at 09:58:08PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> LSPCON requires HPD detection logic to be enabled when we call
> its .reset() hook during resume, to check the live state of the
> pin. To that end let's reorder the resume sequence such that
> we do HPD init before the encoder reset.
>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_drv.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
> index b2a050d916e3..66ddd4161885 100644
> --- a/drivers/gpu/drm/i915/i915_drv.c
> +++ b/drivers/gpu/drm/i915/i915_drv.c
> @@ -1213,21 +1213,20 @@ static int i915_drm_resume(struct drm_device *dev)
> * GPU will hang. i915_gem_init_hw() will initiate batches to
> * update/restore the context.
> *
> - * drm_mode_config_reset() needs AUX interrupts.
> - *
> * Modeset enabling in intel_modeset_init_hw() also needs working
> * interrupts.
> */
> intel_runtime_pm_enable_interrupts(dev_priv);
>
> - drm_mode_config_reset(dev);
> -
> i915_gem_resume(dev_priv);
>
> intel_modeset_init_hw(dev_priv);
> intel_init_clock_gating(dev_priv);
> intel_hpd_init(dev_priv);
>
> + /* May need AUX interrupts and HPD detection enabled */
> + drm_mode_config_reset(dev);
lspcon_resume() could be called both by the above and during connector
detection. Delaying hotplug detection until after intel_display_resume()
would be the ideal solution, but until that we could avoid this race by
taking connection_mutex.
> +
> /* MST sideband requires HPD interrupts enabled */
> intel_dp_mst_resume(dev_priv);
> intel_display_resume(dev);
> --
> 2.26.2
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
More information about the Intel-gfx
mailing list