From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/vkms: Solve bug on kms_crc_cursor tests Date: Thu, 28 Feb 2019 11:14:12 +0100 Message-ID: <20190228101412.GM2665@phenom.ffwll.local> References: <20190225142606.gov32asdq3qe375q@smtp.gmail.com> <20190228101107.GL2665@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190228101107.GL2665@phenom.ffwll.local> Sender: linux-kernel-owner@vger.kernel.org To: Shayenne Moura , Ville =?iso-8859-1?Q?Syrj=E4l=E4?= Cc: Rodrigo Siqueira , Haneen Mohammed , Daniel Vetter , David Airlie , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org On Thu, Feb 28, 2019 at 11:11:07AM +0100, Daniel Vetter wrote: > On Mon, Feb 25, 2019 at 11:26:06AM -0300, Shayenne Moura wrote: > > vkms_crc_work_handle needs the value of the actual frame to > > schedule the workqueue that calls periodically the vblank > > handler and the destroy state functions. However, the frame > > value returned from vkms_vblank_simulate is updated and > > diminished in vblank_get_timestamp because it is not in a > > vblank interrupt, and return an inaccurate value. > > > > Solve this getting the actual vblank frame directly from the > > vblank->count inside the `struct drm_crtc`, instead of using > > the `drm_accurate_vblank_count` function. > > > > Signed-off-by: Shayenne Moura > > Sorry for the delay, I'm a bit swamped right now :-/ > > Debug work you're doing here is really impressive! But I have no idea > what's going on. It doesn't look like it's just papering over a bug (like > the in_vblank_irq check we've discussed on irc), but I also have no idea > why it works. > > I'll pull in Ville, he understands this better than me. Works better if I actually add Ville ... -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch