From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
daniel.vetter@ffwll.ch, Thomas Voegtle <tv@lio96.de>,
intel-gfx@lists.freedesktop.org, stable@vger.kernel.org
Subject: Re: [PATCH] drm/fb_helper: Disable all crtc's when initial setup fails.
Date: Tue, 28 Nov 2017 12:49:43 +0100 [thread overview]
Message-ID: <20171128114943.dn4hpgxb6st3ng23@phenom.ffwll.local> (raw)
In-Reply-To: <20171128111603.62757-1-maarten.lankhorst@linux.intel.com>
On Tue, Nov 28, 2017 at 12:16:03PM +0100, Maarten Lankhorst wrote:
> Some drivers like i915 start with crtc's enabled, but with deferred
> fbcon setup they were no longer disabled as part of fbdev setup.
> Headless units could no longer enter pc3 state because the crtc was
> still enabled.
>
> Fix this by calling restore_fbdev_mode when we would have called
> it otherwise once during initial fbdev setup.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Fixes: ca91a2758fce ("drm/fb-helper: Support deferred setup")
Please use dim fixes to get a more complete Cc: list for regression fixes.
> Cc: <stable@vger.kernel.org> # v4.14+
> Reported-by: Thomas Voegtle <tv@lio96.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
But please confirm with the reporter that it indeed fixes the issue before
pushing.
-Daniel
> ---
> drivers/gpu/drm/drm_fb_helper.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c
> index 07374008f146..e56166334455 100644
> --- a/drivers/gpu/drm/drm_fb_helper.c
> +++ b/drivers/gpu/drm/drm_fb_helper.c
> @@ -1809,6 +1809,10 @@ static int drm_fb_helper_single_fb_probe(struct drm_fb_helper *fb_helper,
>
> if (crtc_count == 0 || sizes.fb_width == -1 || sizes.fb_height == -1) {
> DRM_INFO("Cannot find any crtc or sizes\n");
> +
> + /* First time: disable all crtc's.. */
> + if (!fb_helper->deferred_setup && !READ_ONCE(fb_helper->dev->master))
> + restore_fbdev_mode(fb_helper);
> return -EAGAIN;
> }
>
> --
> 2.15.0
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2017-11-28 11:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 18:09 v4.14/v4.15-rc1: deferred setup in drm/fb-helper breaks entering pc3 Thomas Voegtle
2017-11-28 9:18 ` Maarten Lankhorst
2017-11-28 9:30 ` Thomas Voegtle
2017-11-28 9:48 ` Maarten Lankhorst
2017-11-28 10:28 ` Thomas Voegtle
2017-11-28 11:16 ` [PATCH] drm/fb_helper: Disable all crtc's when initial setup fails Maarten Lankhorst
2017-11-28 11:49 ` Daniel Vetter [this message]
2017-11-28 15:13 ` Thomas Voegtle
2017-11-29 14:40 ` Maarten Lankhorst
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=20171128114943.dn4hpgxb6st3ng23@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=stable@vger.kernel.org \
--cc=tv@lio96.de \
/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
all inboxes | Powered by JetHome®