lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 28 Nov 2017 12:49:43 +0100
From:   Daniel Vetter <daniel@...ll.ch>
To:     Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>
Cc:     dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
        daniel.vetter@...ll.ch, Thomas Voegtle <tv@...96.de>,
        intel-gfx@...ts.freedesktop.org, stable@...r.kernel.org
Subject: Re: [PATCH] drm/fb_helper: Disable all crtc's when initial setup
 fails.

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@...ux.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@...r.kernel.org> # v4.14+
> Reported-by: Thomas Voegtle <tv@...96.de>

Reviewed-by: Daniel Vetter <daniel.vetter@...ll.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ