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: <1731001.VqgqlKjhFN@e123338-lin>
Date:   Thu, 19 Sep 2019 14:43:35 +0000
From:   Mihail Atanassov <Mihail.Atanassov@....com>
To:     "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
CC:     nd <nd@....com>, Daniel Vetter <daniel@...ll.ch>,
        Liviu Dudau <Liviu.Dudau@....com>,
        "james qian wang (Arm Technology China)" <james.qian.wang@....com>,
        Brian Starkey <Brian.Starkey@....com>,
        David Airlie <airlied@...ux.ie>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] drm/komeda: Fix FLIP_COMPLETE timestamp on CRTC enable

On Thursday, 19 September 2019 14:30:02 BST Mihail Atanassov wrote:
> When initially turning a crtc on, drm_reset_vblank_timestamp will
> set the vblank timestamp to 0 for any driver that doesn't provide
> a ->get_vblank_timestamp() hook.
> 
> Unfortunately, the FLIP_COMPLETE event depends on that timestamp,
> and the only way to regenerate a valid one is to have vblank
> interrupts enabled and have a valid in-ISR call to
> drm_crtc_handle_vblank.
> 
> Wrap the call to komeda_crtc_do_flush in ->atomic_enable() with a
> drm_crtc_vblank_{get,put} pair so we can have a vblank ISR prior to
> the FLIP_COMPLETE ISR (or more likely, they'll get handled in the same
> ISR, which is equally valid).
> 
> Cc: Daniel Vetter <daniel@...ll.ch>
> Cc: Liviu Dudau <Liviu.Dudau@....com>
> Signed-off-by: Mihail Atanassov <mihail.atanassov@....com>
> ---
>  drivers/gpu/drm/arm/display/komeda/komeda_crtc.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> index f4400788ab94..87420a767bc4 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_crtc.c
> @@ -258,7 +258,9 @@ komeda_crtc_atomic_enable(struct drm_crtc *crtc,
>  {
>  	komeda_crtc_prepare(to_kcrtc(crtc));
>  	drm_crtc_vblank_on(crtc);
> +	WARN_ON(drm_crtc_vblank_get(crtc));
>  	komeda_crtc_do_flush(crtc, old);
> +	drm_crtc_vblank_put(crtc);
>  }
>  
>  static void
> 

Please ignore, this doesn't work (page flips after 5 seconds don't get
an updated timestamp because of the delayed vsync disable). I'll push
a v2 soon where vsync on/off tracks crtc enable/disable.

-- 
Mihail



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ