From: Lukas Wunner <lukas@wunner.de>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 3/3] drm/i915/fbdev: Flush mode configuration before lastclose
Date: Fri, 17 Jun 2016 20:13:15 +0200 [thread overview]
Message-ID: <20160617181314.GA1866@wunner.de> (raw)
In-Reply-To: <1466186089-7743-4-git-send-email-chris@chris-wilson.co.uk>
On Fri, Jun 17, 2016 at 06:54:49PM +0100, Chris Wilson wrote:
> During lastclose, we call intel_fbdev_restore_mode() to switch back to
> the fbcon configuration on return to VT. However, if we have not yet
> finished the asynchronous fbdev initialisation, the current mode will be
> invalid and trigger WARNs upon application.
>
> Serialise with the outstanding initialisation if the first application
> exits quickly. Note that to hit this in practice requires using an
> unregistered async_domain as otherwise modprobe will force a full
> synchronisation prior to init() completing.
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93580
Reported-by: Gustav Fägerlind <gustav.fagerlind@gmail.com>
Reported-by: "Li, Weinan Z" <weinan.z.li@intel.com>
Cc: stable@vger.kernel.org
> ---
> drivers/gpu/drm/i915/intel_fbdev.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
> index 638e420a59cb..a19d621d8815 100644
> --- a/drivers/gpu/drm/i915/intel_fbdev.c
> +++ b/drivers/gpu/drm/i915/intel_fbdev.c
> @@ -830,6 +830,11 @@ void intel_fbdev_restore_mode(struct drm_device *dev)
> if (!ifbdev)
> return;
>
> + if (ifbdev->cookie) {
> + async_synchronize_cookie(ifbdev->cookie + 1);
> + ifbdev->cookie = 0;
> + }
> +
> fb_helper = &ifbdev->helper;
>
> ret = drm_fb_helper_restore_fbdev_mode_unlocked(fb_helper);
> --
> 2.8.1
>
> _______________________________________________
> 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
next prev parent reply other threads:[~2016-06-17 18:09 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
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 [this message]
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=20160617181314.GA1866@wunner.de \
--to=lukas@wunner.de \
--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