public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 1/3] drm/i915/fbdev: Perform async fbdev initialisation much later
Date: Tue, 21 Jun 2016 09:27:11 +0200	[thread overview]
Message-ID: <20160621072711.GP23520@phenom.ffwll.local> (raw)
In-Reply-To: <1466186089-7743-2-git-send-email-chris@chris-wilson.co.uk>

On Fri, Jun 17, 2016 at 06:54:47PM +0100, Chris Wilson wrote:
> Setting up fbdev requires everything ready and registered (in particular
> the connectors). In the next patch, we defer registration of the KMS
> objects and unless we defer setting off fbdev, it may run before they are
> registered and oops.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> ---
>  drivers/gpu/drm/i915/i915_dma.c | 24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
> index 24b670f72ed4..0127e969a912 100644
> --- a/drivers/gpu/drm/i915/i915_dma.c
> +++ b/drivers/gpu/drm/i915/i915_dma.c
> @@ -525,18 +525,6 @@ static int i915_load_modeset_init(struct drm_device *dev)
>  	/* Only enable hotplug handling once the fbdev is fully set up. */
>  	intel_hpd_init(dev_priv);
>  
> -	/*
> -	 * Some ports require correctly set-up hpd registers for detection to
> -	 * work properly (leading to ghost connected connector status), e.g. VGA
> -	 * on gm45.  Hence we can only set up the initial fbdev config after hpd
> -	 * irqs are fully enabled. Now we should scan for the initial config
> -	 * only once hotplug handling is enabled, but due to screwed-up locking
> -	 * around kms/fbdev init we can't protect the fdbev initial config
> -	 * scanning against hotplug events. Hence do this first and ignore the
> -	 * tiny window where we will loose hotplug notifactions.
> -	 */
> -	intel_fbdev_initial_config_async(dev);
> -
>  	drm_kms_helper_poll_init(dev);
>  
>  	return 0;
> @@ -1413,6 +1401,18 @@ static void i915_driver_register(struct drm_i915_private *dev_priv)
>  		intel_gpu_ips_init(dev_priv);
>  
>  	i915_audio_component_init(dev_priv);
> +
> +	/*
> +	 * Some ports require correctly set-up hpd registers for detection to
> +	 * work properly (leading to ghost connected connector status), e.g. VGA
> +	 * on gm45.  Hence we can only set up the initial fbdev config after hpd
> +	 * irqs are fully enabled. Now we should scan for the initial config
> +	 * only once hotplug handling is enabled, but due to screwed-up locking
> +	 * around kms/fbdev init we can't protect the fdbev initial config
> +	 * scanning against hotplug events. Hence do this first and ignore the
> +	 * tiny window where we will loose hotplug notifactions.
> +	 */

Comment seems bogus now - we're definitely _after_ hotplug enabling now.
Wrt fbdev locking: Thierry Redding is working on patches to arbitrarily
delay fbdev setup until the first sink shows up. Which will fix the
locking. I'd remove all that noise and just keep the part that explains
why we need hpd enabled first. With that fixed:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> +	intel_fbdev_initial_config_async(dev);
>  }
>  
>  /**
> -- 
> 2.8.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2016-06-21  7:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-17 17:54 Quick set of async fbdev fixes Chris Wilson
2016-06-17 17:54 ` [PATCH 1/3] drm/i915/fbdev: Perform async fbdev initialisation much later Chris Wilson
2016-06-21  7:27   ` Daniel Vetter [this message]
2016-06-17 17:54 ` [PATCH 2/3] drm/i915/fbdev: Limit the global async-domain synchronization Chris Wilson
2016-06-21  7:35   ` Daniel Vetter
2016-06-21  7:57     ` Chris Wilson
2016-06-17 17:54 ` [PATCH 3/3] drm/i915/fbdev: Flush mode configuration before lastclose Chris Wilson
2016-06-17 18:13   ` Lukas Wunner
2016-06-21  7:37   ` Daniel Vetter
2016-06-18  5:47 ` ✗ Ro.CI.BAT: warning for series starting with [1/3] drm/i915/fbdev: Perform async fbdev initialisation much later Patchwork

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=20160621072711.GP23520@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox