intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Lukas Wunner <lukas@wunner.de>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
	intel-gfx@lists.freedesktop.org,
	Gabriel Feceoru <gabriel.feceoru@intel.com>
Subject: Re: [PATCH v4 1/2] drm/i915: Protect fbdev across slow or failed initialisation
Date: Thu, 31 Mar 2016 18:30:15 +0200	[thread overview]
Message-ID: <20160331163015.GA10789@wunner.de> (raw)
In-Reply-To: <20160331161355.GB18430@nuc-i3427.alporthouse.com>

Hi Chris,

On Thu, Mar 31, 2016 at 05:13:55PM +0100, Chris Wilson wrote:
> On Thu, Mar 31, 2016 at 07:05:21PM +0300, Joonas Lahtinen wrote:
> > On to, 2016-03-31 at 14:57 +0100, Chris Wilson wrote:
> > >  void intel_fbdev_restore_mode(struct drm_device *dev)
> > >  {
> > > -	int ret;
> > > -	struct drm_i915_private *dev_priv = dev->dev_private;
> > > -	struct intel_fbdev *ifbdev = dev_priv->fbdev;
> > > -	struct drm_fb_helper *fb_helper;
> > > +	struct intel_fbdev *ifbdev = intel_fbdev_get_if_active(dev);
> > >  
> > > -	async_synchronize_full();
> > 
> > What's with the async_synchronize_full() begin removed completely?
> 
> Because it's not just wrong, but completely broken imo.
> 
> During suspend, we want to freeze the async task not flush.
> Then here and during resume we skip the restoration of the unregistered
> fbdev, and then when the task is woken it can complete the registration
> and present the vanilla ifbdev.

No. The fbdev initialization is guaranteed to have finished before
suspend. So "we want to freeze the async task" is wrong thinking.
There is no async task to freeze.

Please read the commit message of a7442b93cf32 ("drm/i915: Fix races
on fbdev"):

"a device is never suspended until its ->probe callback (and all
asynchronous tasks it scheduled) have finished. See dpm_prepare(),
which calls wait_for_device_probe(), which calls async_synchronize_full()."

Best regards,

Lukas

> During hibernation, we really just want to cancel the task and start
> from scratch on resume.
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2016-03-31 16:28 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-30 17:20 [REGRESSION] system hang on ILK/SNB/IVB Gabriel Feceoru
2016-03-30 17:57 ` [PATCH] drm/i915: Protect fbdev across slow or failed initialisation Chris Wilson
2016-03-30 18:10   ` kbuild test robot
2016-03-30 18:10   ` kbuild test robot
2016-03-30 18:26   ` kbuild test robot
2016-03-30 18:30   ` Chris Wilson
2016-03-30 18:56   ` [PATCH v3] " Chris Wilson
2016-03-31 12:00     ` Gabriel Feceoru
2016-03-31 13:57       ` [PATCH v4 1/2] " Chris Wilson
2016-03-31 13:57         ` [PATCH v4 2/2] drm/i915: Move fbdev_suspend_work to intel_fbdev Chris Wilson
2016-03-31 15:22           ` Joonas Lahtinen
2016-03-31 15:30             ` Chris Wilson
2016-03-31 15:56               ` Joonas Lahtinen
2016-03-31 16:05         ` [PATCH v4 1/2] drm/i915: Protect fbdev across slow or failed initialisation Joonas Lahtinen
2016-03-31 16:13           ` Chris Wilson
2016-03-31 16:28             ` Joonas Lahtinen
2016-03-31 16:30             ` Lukas Wunner [this message]
2016-03-30 18:47 ` [REGRESSION] system hang on ILK/SNB/IVB Daniel Vetter
2016-03-30 21:35 ` Lukas Wunner
2016-03-31  7:21   ` Tomi Sarvela
2016-03-31 20:35     ` Lukas Wunner
2016-04-01  7:59       ` Tomi Sarvela
2016-03-31  7:42   ` Gabriel Feceoru
2016-03-31 15:23     ` Lukas Wunner
2016-03-31 14:42 ` ✗ Fi.CI.BAT: failure for drm/i915: Protect fbdev across slow or failed initialisation (rev2) 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=20160331163015.GA10789@wunner.de \
    --to=lukas@wunner.de \
    --cc=chris@chris-wilson.co.uk \
    --cc=gabriel.feceoru@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=joonas.lahtinen@linux.intel.com \
    /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;
as well as URLs for NNTP newsgroup(s).