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, 31 Jul 2018 12:17:17 +0000
From:   Leonard Crestez <leonard.crestez@....com>
To:     "p.zabel@...gutronix.de" <p.zabel@...gutronix.de>,
        "stefan@...er.ch" <stefan@...er.ch>,
        "marex@...x.de" <marex@...x.de>,
        "shawnguo@...nel.org" <shawnguo@...nel.org>
CC:     dl-linux-imx <linux-imx@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Robert Chiras <robert.chiras@....com>,
        Fabio Estevam <fabio.estevam@....com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        Anson Huang <anson.huang@....com>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "l.stach@...gutronix.de" <l.stach@...gutronix.de>,
        "kernel@...gutronix.de" <kernel@...gutronix.de>
Subject: Re: [PATCH v2] drm/mxsfb: Fix runtime PM for unpowering lcdif block

On Tue, 2018-07-31 at 13:54 +0200, Philipp Zabel wrote:
> On Tue, 2018-07-17 at 13:48 +0300, Leonard Crestez wrote:
> > Adding lcdif nodes to a power domain currently does work, it results in
> > black/corrupted screens or hangs. While the driver does enable runtime
> > pm it does not deal correctly with the block being unpowered.
> > 
> > Ensure power is on when required by adding pm_runtime_get/put_sync to
> > mxsfb_pipe_enable/disable.
> > 
> > Since power is lost on suspend implement PM_SLEEP_OPS using
> > drm_mode_config_helper_suspend/resume.
> > 
> > The mxsfb_plane_atomic_update function can get called before
> > mxsfb_pipe_enable while the block is not yet powered. When this happens
> > the write to LCDIF_NEXT_BUF is lost causing corrupt display on unblank
> > until a refresh.
> 
> Why does this happen?

I'm not sure what you're asking but register writes to unpowered or
unclocked blocks are not expected to "just work". Here the write is
ignored/lost but I think on imx8 it can even cause a bus error.

The approach here is to only set the framebuffer address as part of
activating the display.

> > Fix this by not writing gem->paddr if the block is not enabled and
> > instead delaying the write until the next mxsfb_crtc_mode_set_nofb call.
> > At that point also update cur_buf to avoid an initial corrupt frame
> > after resume.
> > 
> > Signed-off-by: Leonard Crestez <leonard.crestez@....com>
> 
> Tested-by: Philipp Zabel <p.zabel@...gutronix.de>
> 
> on imx6ull-evk, this fixes the initial corrupt frame.

Cool!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ