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: <20200713160621.GQ3278063@phenom.ffwll.local>
Date:   Mon, 13 Jul 2020 18:06:21 +0200
From:   Daniel Vetter <daniel@...ll.ch>
To:     Melissa Wen <melissa.srw@...il.com>
Cc:     Daniel Vetter <daniel@...ll.ch>, Sidong Yang <realwakka@...il.com>,
        Haneen Mohammed <hamohammed.sa@...il.com>,
        Rodrigo Siqueira <rodrigosiqueiramelo@...il.com>,
        David Airlie <airlied@...ux.ie>,
        Emil Velikov <emil.l.velikov@...il.com>,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH] drm/vkms: add wait_for_vblanks in atomic_commit_tail

On Fri, Jul 10, 2020 at 02:05:33PM -0300, Melissa Wen wrote:
> On 07/02, Daniel Vetter wrote:
> > On Wed, Jul 01, 2020 at 03:31:34PM +0000, Sidong Yang wrote:
> > > there is an error when igt test is run continuously. vkms_atomic_commit_tail()
> > > need to call drm_atomic_helper_wait_for_vblanks() for give up ownership of
> > > vblank events. without this code, next atomic commit will not enable vblank
> > > and raise timeout error.
> > > 
> > > Signed-off-by: Sidong Yang <realwakka@...il.com>
> > > ---
> > >  drivers/gpu/drm/vkms/vkms_drv.c | 2 ++
> > >  1 file changed, 2 insertions(+)
> > > 
> > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c
> > > index 1e8b2169d834..10b9be67a068 100644
> > > --- a/drivers/gpu/drm/vkms/vkms_drv.c
> > > +++ b/drivers/gpu/drm/vkms/vkms_drv.c
> > > @@ -93,6 +93,8 @@ static void vkms_atomic_commit_tail(struct drm_atomic_state *old_state)
> > >  		flush_work(&vkms_state->composer_work);
> > >  	}
> > >  
> > > +	drm_atomic_helper_wait_for_vblanks(dev, old_state);
> > 
> > Uh, we have a wait_for_flip_done right above, which should be doing
> > exactly the same, but more precisely: Instead of just waiting for any
> > vblank to happen, we wait for exactly the vblank corresponding to this
> > atomic commit. So no races possible. If this is papering over some issue,
> > then I think more debugging is needed.
> > 
> > What exactly is going wrong here for you?
> 
> Hi Daniel and Sidong,
> 
> I noticed a similar issue when running the IGT test kms_cursor_crc. For
> example, a subtest that passes on the first run (alpha-opaque) fails on
> the second due to a kind of busy waiting in subtest preparation (the
> subtest fails before actually running).
> 
> In addition, in the same test, the dpms subtest started to fail since
> the commit that change from wait_for_vblanks to wait_for_flip_done. By
> reverting this commit, the dpms subtest passes again and the sequential
> subtests return to normal.
> 
> I am trying to figure out what's missing from using flip_done op on
> vkms, since I am also interested in solving this problem and I
> understand that the change for flip_done has been discussed in the past.
> 
> Do you have any idea?

Uh, not at all. This is indeed rather surprising ...

What exactly is the failure mode when running a test the 2nd time? Full
igt logs might give me an idea. But yeah this is kinda surprising.

Also happy to chat on irc for debugging ideas, that might be faster (I'm
danvet on #dri-devel on freenode).
-Daniel

> 
> Melissa
> 
> > -Daniel
> > 
> > > +
> > >  	drm_atomic_helper_cleanup_planes(dev, old_state);
> > >  }
> > >  
> > > -- 
> > > 2.17.1
> > > 
> > 
> > -- 
> > Daniel Vetter
> > Software Engineer, Intel Corporation
> > http://blog.ffwll.ch
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@...ts.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ