* [PATCH] drm/fb_helper: Disable all crtc's when initial setup fails. [not found] <alpine.LSU.2.20.1711281123060.17234@er-systems.de> @ 2017-11-28 11:16 ` Maarten Lankhorst 2017-11-28 11:49 ` Daniel Vetter 0 siblings, 1 reply; 4+ messages in thread From: Maarten Lankhorst @ 2017-11-28 11:16 UTC (permalink / raw) To: dri-devel Cc: linux-kernel, daniel.vetter, Thomas Voegtle, intel-gfx, Maarten Lankhorst, stable 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") Cc: <stable@vger.kernel.org> # v4.14+ Reported-by: Thomas Voegtle <tv@lio96.de> --- 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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/fb_helper: Disable all crtc's when initial setup fails. 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 2017-11-28 15:13 ` Thomas Voegtle 0 siblings, 1 reply; 4+ messages in thread From: Daniel Vetter @ 2017-11-28 11:49 UTC (permalink / raw) To: Maarten Lankhorst Cc: dri-devel, linux-kernel, daniel.vetter, Thomas Voegtle, intel-gfx, stable 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 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/fb_helper: Disable all crtc's when initial setup fails. 2017-11-28 11:49 ` Daniel Vetter @ 2017-11-28 15:13 ` Thomas Voegtle 2017-11-29 14:40 ` Maarten Lankhorst 0 siblings, 1 reply; 4+ messages in thread From: Thomas Voegtle @ 2017-11-28 15:13 UTC (permalink / raw) To: Daniel Vetter Cc: Maarten Lankhorst, dri-devel, linux-kernel, daniel.vetter, intel-gfx, stable On Tue, 28 Nov 2017, Daniel Vetter wrote: > 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 I re-checked the latest version of the patch and it indeed fixes the problem. Thanks, Thomas ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] drm/fb_helper: Disable all crtc's when initial setup fails. 2017-11-28 15:13 ` Thomas Voegtle @ 2017-11-29 14:40 ` Maarten Lankhorst 0 siblings, 0 replies; 4+ messages in thread From: Maarten Lankhorst @ 2017-11-29 14:40 UTC (permalink / raw) To: Thomas Voegtle, Daniel Vetter Cc: dri-devel, linux-kernel, daniel.vetter, intel-gfx, stable Op 28-11-17 om 16:13 schreef Thomas Voegtle: > On Tue, 28 Nov 2017, Daniel Vetter wrote: > >> 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 > > I re-checked the latest version of the patch and it indeed fixes the problem. > > Thanks, > > Thomas > Pushed, thanks for the report. :) ~Maarten ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-11-29 14:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <alpine.LSU.2.20.1711281123060.17234@er-systems.de>
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
2017-11-28 15:13 ` Thomas Voegtle
2017-11-29 14:40 ` Maarten Lankhorst
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).