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] [day] [month] [year] [list]
Message-ID: <1538145120.5186.6.camel@synopsys.com>
Date:   Fri, 28 Sep 2018 14:32:01 +0000
From:   Eugeniy Paltsev <eugeniy.paltsev@...opsys.com>
To:     "ville.syrjala@...ux.intel.com" <ville.syrjala@...ux.intel.com>,
        "Eugeniy.Paltsev@...opsys.com" <Eugeniy.Paltsev@...opsys.com>
CC:     "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "alexey.brodkin@...opsys.com" <alexey.brodkin@...opsys.com>,
        "sean@...rly.run" <sean@...rly.run>,
        "airlied@...ux.ie" <airlied@...ux.ie>,
        "linux-snps-arc@...ts.infradead.org" 
        <linux-snps-arc@...ts.infradead.org>
Subject: Re: [PATCH] DRM: VBLANK: provide valid timestamp for EVENT_FLIP

On Wed, 2018-09-26 at 19:37 +0300, Ville Syrjälä wrote:
> On Wed, Sep 26, 2018 at 05:25:35PM +0300, Eugeniy Paltsev wrote:
> > If driver/HW doesn't support vblank functionality (for example
> > UDL driver, ARCPGU driver, ...) we always have vblank->time == 0.
> > In result we always provide zero timestamp for
> > DRM_EVENT_FLIP_COMPLETE. This breaks userspace apps (for example
> > weston) which relies on timestamp value.
> > 
> > Setup time to provide valid timestamp for DRM_EVENT_FLIP_COMPLETE
> > event.
> > 
> > Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@...opsys.com>
> > ---
> >  drivers/gpu/drm/drm_vblank.c | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c
> > index 28cdcf76b6f9..0d19aca48782 100644
> > --- a/drivers/gpu/drm/drm_vblank.c
> > +++ b/drivers/gpu/drm/drm_vblank.c
> > @@ -911,6 +911,15 @@ void drm_crtc_send_vblank_event(struct drm_crtc *crtc,
> >  
> >  	if (dev->num_crtcs > 0) {
> 
> If those drivers don't support vblank stuff why are they calling
> bldrm_vank_init() w/ num_crtcs > 0? If they didn't they'd take the
> else branch which already does what you want.

Hmm...
As I can see UDL call drm_vblank_init() with num_crtcs = 1 but UDL HW
doesn't support vblank at all.
I guess I need to fix it.

> >  		seq = drm_vblank_count_and_time(dev, pipe, &now);
> > +
> > +		/*
> > +		 * If driver/HW doesn't support vblank functionality we
> > +		 * always have vblank->time == 0. Setup time to provide valid
> > +		 * timestamp for DRM_EVENT_FLIP_COMPLETE event.
> > +		 */
> > +		if (!now && e->event.base.type == DRM_EVENT_FLIP_COMPLETE)
> > +			now = ktime_get();
> > +
> >  	} else {
> >  		seq = 0;
> >  
> > -- 
> > 2.14.4
> > 
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@...ts.freedesktop.org
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freedesktop.org_mailman_listinfo_dri-2Ddevel&d=DwIDAw&c=DPL6_X_6JkXFx7AXWqB0tg&r=ZlJN1M
> > riPUTkBKCrPSx67GmaplEUGcAEk9yPtCLdUXI&m=5bbb9SeVXTMPDa1bXQxqlBIOnSdKaKY5W0BkMCgwijE&s=50EhApCZAeMMDUEd6FVpXf5owd1Bi3vn5GaBt0KE2Cw&e=
> 
> 
-- 
 Eugeniy Paltsev

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ