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]
Message-ID: <69cced11-c30a-da6c-0465-79b632901b62@st.com>
Date:   Thu, 23 Jan 2020 09:47:22 +0000
From:   Philippe CORNU <philippe.cornu@...com>
To:     Yannick FERTRE <yannick.fertre@...com>,
        Benjamin GAIGNARD <benjamin.gaignard@...com>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        "Alexandre TORGUE" <alexandre.torgue@...com>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-stm32@...md-mailman.stormreply.com" 
        <linux-stm32@...md-mailman.stormreply.com>,
        "linux-arm-kernel@...ts.infradead.org" 
        <linux-arm-kernel@...ts.infradead.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/stm: ltdc: enable/disable depends on encoder

Dear Yannick,
Thank you for your patch,

Acked-by: Philippe Cornu <philippe.cornu@...com>

Philippe :-)

On 1/20/20 2:46 PM, Yannick Fertre wrote:
> From: Yannick Fertré <yannick.fertre@...com>
> 
> When connected to a dsi host, the ltdc display controller
> must send frames only after the end of the dsi panel
> initialization to avoid errors when the dsi host sends
> commands to the dsi panel (dsi px fifo full).
> To avoid this issue, the display controller must be
> enabled/disabled when the encoder is enabled/disabled.
> 
> Signed-off-by: Yannick Fertré <yannick.fertre@...com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 14 ++++++++------
>   1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 719dfc5..9ef125d 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -437,9 +437,6 @@ static void ltdc_crtc_atomic_enable(struct drm_crtc *crtc,
>   	/* Commit shadow registers = update planes at next vblank */
>   	reg_set(ldev->regs, LTDC_SRCR, SRCR_VBR);
>   
> -	/* Enable LTDC */
> -	reg_set(ldev->regs, LTDC_GCR, GCR_LTDCEN);
> -
>   	drm_crtc_vblank_on(crtc);
>   }
>   
> @@ -453,9 +450,6 @@ static void ltdc_crtc_atomic_disable(struct drm_crtc *crtc,
>   
>   	drm_crtc_vblank_off(crtc);
>   
> -	/* disable LTDC */
> -	reg_clear(ldev->regs, LTDC_GCR, GCR_LTDCEN);
> -
>   	/* disable IRQ */
>   	reg_clear(ldev->regs, LTDC_IER, IER_RRIE | IER_FUIE | IER_TERRIE);
>   
> @@ -1058,9 +1052,13 @@ static const struct drm_encoder_funcs ltdc_encoder_funcs = {
>   static void ltdc_encoder_disable(struct drm_encoder *encoder)
>   {
>   	struct drm_device *ddev = encoder->dev;
> +	struct ltdc_device *ldev = ddev->dev_private;
>   
>   	DRM_DEBUG_DRIVER("\n");
>   
> +	/* Disable LTDC */
> +	reg_clear(ldev->regs, LTDC_GCR, GCR_LTDCEN);
> +
>   	/* Set to sleep state the pinctrl whatever type of encoder */
>   	pinctrl_pm_select_sleep_state(ddev->dev);
>   }
> @@ -1068,6 +1066,7 @@ static void ltdc_encoder_disable(struct drm_encoder *encoder)
>   static void ltdc_encoder_enable(struct drm_encoder *encoder)
>   {
>   	struct drm_device *ddev = encoder->dev;
> +	struct ltdc_device *ldev = ddev->dev_private;
>   
>   	DRM_DEBUG_DRIVER("\n");
>   
> @@ -1078,6 +1077,9 @@ static void ltdc_encoder_enable(struct drm_encoder *encoder)
>   	 */
>   	if (encoder->encoder_type == DRM_MODE_ENCODER_DPI)
>   		pinctrl_pm_select_default_state(ddev->dev);
> +
> +	/* Enable LTDC */
> +	reg_set(ldev->regs, LTDC_GCR, GCR_LTDCEN);
>   }
>   
>   static const struct drm_encoder_helper_funcs ltdc_encoder_helper_funcs = {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ