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: <7f99af28-f4ef-303b-2844-89dc266d1ace@foss.st.com>
Date:   Fri, 28 May 2021 16:01:29 +0200
From:   yannick Fertre <yannick.fertre@...s.st.com>
To:     Philippe Cornu <philippe.cornu@...s.st.com>,
        Antonio Borneo <antonio.borneo@...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>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>, "Marek Vasut" <marex@...x.de>
Subject: Re: [PATCH] drm/stm: Remove usage of drm_display_mode_to_videomode()


Hi Philippe,
I have already reviewed this patch on January 7, 2020.
(https://lore.kernel.org/dri-devel/0ab4ee45-4437-3b02-cf63-0e3b1b53920f@st.com/)
Could you please review it and merge it?

Best regards

Yannick

On 5/28/21 10:05 AM, Yannick Fertre wrote:
> There is not much value in the extra conversion step, the calculations
> required for the LTDC IP are different than what is used in the
> drm_display_mode_to_videomode(), so just do the right ones in the LTDC
> driver right away.
> 
> Signed-off-by: Marek Vasut <marex@...x.de>
> Signed-off-by: Yannick Fertre <yannick.fertre@...s.st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 32 +++++++++++++++++---------------
>   1 file changed, 17 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index e99771b947b6..d113b9be12c0 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -570,31 +570,33 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
>   		}
>   	}
>   
> -	drm_display_mode_to_videomode(mode, &vm);
> -
>   	DRM_DEBUG_DRIVER("CRTC:%d mode:%s\n", crtc->base.id, mode->name);
> -	DRM_DEBUG_DRIVER("Video mode: %dx%d", vm.hactive, vm.vactive);
> +	DRM_DEBUG_DRIVER("Video mode: %dx%d", mode->hdisplay, mode->vdisplay);
>   	DRM_DEBUG_DRIVER(" hfp %d hbp %d hsl %d vfp %d vbp %d vsl %d\n",
> -			 vm.hfront_porch, vm.hback_porch, vm.hsync_len,
> -			 vm.vfront_porch, vm.vback_porch, vm.vsync_len);
> +			 mode->hsync_start - mode->hdisplay,
> +			 mode->htotal - mode->hsync_end,
> +			 mode->hsync_end - mode->hsync_start,
> +			 mode->vsync_start - mode->vdisplay,
> +			 mode->vtotal - mode->vsync_end,
> +			 mode->vsync_end - mode->vsync_start);
>   
>   	/* Convert video timings to ltdc timings */
> -	hsync = vm.hsync_len - 1;
> -	vsync = vm.vsync_len - 1;
> -	accum_hbp = hsync + vm.hback_porch;
> -	accum_vbp = vsync + vm.vback_porch;
> -	accum_act_w = accum_hbp + vm.hactive;
> -	accum_act_h = accum_vbp + vm.vactive;
> -	total_width = accum_act_w + vm.hfront_porch;
> -	total_height = accum_act_h + vm.vfront_porch;
> +	hsync = mode->hsync_end - mode->hsync_start - 1;
> +	vsync = mode->vsync_end - mode->vsync_start - 1;
> +	accum_hbp = mode->htotal - mode->hsync_start - 1;
> +	accum_vbp = mode->vtotal - mode->vsync_start - 1;
> +	accum_act_w = accum_hbp + mode->hdisplay;
> +	accum_act_h = accum_vbp + mode->vdisplay;
> +	total_width = mode->htotal - 1;
> +	total_height = mode->vtotal - 1;
>   
>   	/* Configures the HS, VS, DE and PC polarities. Default Active Low */
>   	val = 0;
>   
> -	if (vm.flags & DISPLAY_FLAGS_HSYNC_HIGH)
> +	if (mode->flags & DRM_MODE_FLAG_PHSYNC)
>   		val |= GCR_HSPOL;
>   
> -	if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
> +	if (mode->flags & DRM_MODE_FLAG_PVSYNC)
>   		val |= GCR_VSPOL;
>   
>   	if (bus_flags & DRM_BUS_FLAG_DE_LOW)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ