Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp172654pxa; Tue, 4 Aug 2020 02:36:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw76y7pxCpJy+b4x7ieUSE0Yhns4dN7UGc4+6gAHRbFHrmoM83LtA/dctzWtxYaW38xetHB X-Received: by 2002:a17:906:bcf3:: with SMTP id op19mr20046733ejb.1.1596533779851; Tue, 04 Aug 2020 02:36:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596533779; cv=none; d=google.com; s=arc-20160816; b=k1CzfXxKjZ7oEcN1+R5piLnaEEKulN230bPs1/dUbj+dJidoacKTBQIw39p+yvOvnZ sVxg3G/hnhDEd6n8wZBcna3hPSFfNAeamnNq+41PV+uAmgeibtkXgyjFsbQwPWqL3O0z XM09/ntkR0dyOU9InXWF3JeHKr2LlYr8RPEi2rupKUlj3nLum/d5ckVafKGLER6blnfE rvTDWxJwZuLYpPXqa2la829UTocF+/Z04Q7vKiN82IcscrC/xEWJQumlE/VzZvQlBGXE 7QCI97yqjTVEDl4rpqHrNolW+6e1UoDWHQIYly7SDN9w5NSjCyn3Ox2oYKhiz/fWp535 xKkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:from:date:dkim-signature; bh=NFwnBuUV6bVAwnm6zIwLZz6xFgzPWKISMQC0BJF3oys=; b=A9J+ucw1f0XETcWfcMMutvDb3/dN/KkES1DEgwpfvkqUkhHX+qVGrP6xZ+qkugK4T7 0nFsl3HdfSTqFMp7eaSglaboTPQEzRMGenZzkzj0TxZDWMAAlDF3wbVy4CoGjmO31F9t DED8hZhCUsAoL/UnkRWeQRpSZ79zsGveqH2gkMzdt/epHLf84pkIxbfXFOAz+czQzYBA e0JbPZTFGjABa/SEf0mqVuPq52nwdEMAoqoP86MF4rYXrZ/NwJf+rc3WhtbukplQtp3j RBZihbwVkp3uKJtmUIJL2ljhtk1RBZ3QlNewc9VdfoFvU7fdBwjV627w0uKO3SrvVkEQ gSuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=UoPVoVRz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r10si12075257eds.138.2020.08.04.02.35.57; Tue, 04 Aug 2020 02:36:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@ffwll.ch header.s=google header.b=UoPVoVRz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726807AbgHDJd6 (ORCPT + 99 others); Tue, 4 Aug 2020 05:33:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725832AbgHDJd5 (ORCPT ); Tue, 4 Aug 2020 05:33:57 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 66FA2C06174A for ; Tue, 4 Aug 2020 02:33:55 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id c80so2049615wme.0 for ; Tue, 04 Aug 2020 02:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=NFwnBuUV6bVAwnm6zIwLZz6xFgzPWKISMQC0BJF3oys=; b=UoPVoVRzcsw6cieJIVlsnj/wuU9LmN3VfVRrZ+MKwKQQxr+9xLbRnacDmgsrLkpFk8 OLqylsQVWdcyLNjSoixDW1lfZwEglNY276klOaFmuPYng2Iu/NInbg46Xd78hATFLAYi 8Mx23cu3tS+0KXJx89zbDDgmGsZE2Hm/gm9LA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :content-transfer-encoding:in-reply-to; bh=NFwnBuUV6bVAwnm6zIwLZz6xFgzPWKISMQC0BJF3oys=; b=h8JNxkDtQa+6Ap31SpgWGWrr4UlUQfipMY4OiypaU79aOAiVE1ux6AEACrXBoploWW aysqNbTD1lOi5e+MF1RPWC7x2UApwfbRVRBU9xcD8gkW3ygz1k55R0z8St4AsOILCffW GQ1za9m4dwt01e+8xNlGhxJ9PqQWwVOlYT1NeTnD97JO9jgOiRGaqTUNBm5aVOR4s8Lb MlgKKwmi3psQRUXFxcbJnQ0P4nKqwvg6/TDNE3XFap3UhQM3i6D8EpAdaIebv9uh9tyx iTJI9YvhW8NJzEBAdrApHPeyuSfrXS9gc4wzoLm4xgffCIZPvfzPDMxcF06B+aaTxjSf G/rA== X-Gm-Message-State: AOAM531evhL4Hvkm4y4V+clGsqUm6BNdzkRHz3d6E6ZsFoBoQNu1idqR BsNOBVEWejjTrkE0o7igAkOWCA== X-Received: by 2002:a1c:ba83:: with SMTP id k125mr3240823wmf.160.1596533634127; Tue, 04 Aug 2020 02:33:54 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id q5sm28336286wrp.60.2020.08.04.02.33.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Aug 2020 02:33:53 -0700 (PDT) Date: Tue, 4 Aug 2020 11:33:51 +0200 From: daniel@ffwll.ch Cc: Sidong Yang , Rodrigo Siqueira , Haneen Mohammed , Daniel Vetter , David Airlie , LKML , DRI Development Subject: Re: [PATCH] drm/vkms: modify sequence disable/plane/enable in commit_tail Message-ID: <20200804093351.GI6419@phenom.ffwll.local> Mail-Followup-To: Melissa Wen , Sidong Yang , Rodrigo Siqueira , Haneen Mohammed , David Airlie , LKML , DRI Development References: <20200729152231.13249-1-realwakka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Operating-System: Linux phenom 5.7.0-1-amd64 To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Aug 01, 2020 at 04:30:23PM -0300, Melissa Wen wrote: > On Wed, Jul 29, 2020 at 12:22 PM Sidong Yang wrote: > > > > This patch modifies function call sequence in commit tail. This is for > > the problem that raised when kms_cursor_crc test is tested repeatedly. > > In second test, there is an bug that crtc commit doesn't start vblank events. > > Because there is some error about vblank's refcount. in commit_flush() that > > called from commit_plane, drm_vblank_get() is called and vblank is enabled > > in normal case. But in second test, vblank isn't enable for vblank->refcount > > is already increased in previous test. Increased refcount will be decreased > > in drm_atomic_helper_commit_modeset_enables() after commit_plane. > > Therefore, commit_plane should be called after commit_modeset_enable. > > > > In this situation, there is a warning raised in get_vblank_timestamp(). > > hrtimer.node.expires and vblank->time are zero for no vblank events before. > > This patch returns current time when vblank is not enabled. > > > Hi Sidong, > > I think this patch tries to solve two different issues. > > I am not a maintainer, but I believe you can split it. > > Everything indicates that changing the commit tail sequence does not > ideally solve the problem of subtests getting stuck (as we have dicussed); > however, for me, the treatment of the warning is valid and it is also related > to other IGT tests using VKMS. Yeah I think (but haven't tested, definitely need to confirm that) that the vblank get/put fix from Melissa is the correct fix for all these issues. > One option is to send a patch that only treats the warning. I believe that > in the body of the commit message, it would be nice to have the warning > that this patch addresses, and when it appears by running an IGT test. > Also, say why it should be done this way in vkms. > This info could help future debugging. Yeah I think splitting out the warning fix is the right thing to do here. -Daniel > > Off-topic: I removed the group's mailing list of the University of S?o > Paulo (kernel-usp) from the cc, since I believe you had no intention of > sending the patch to them. > > Best regards, > > Melissa > > > Cc: Daniel Vetter > > Cc: Rodrigo Siqueira > > Cc: Haneen Mohammed > > > > Signed-off-by: Sidong Yang > > --- > > drivers/gpu/drm/vkms/vkms_crtc.c | 5 +++++ > > drivers/gpu/drm/vkms/vkms_drv.c | 4 ++-- > > 2 files changed, 7 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c > > index ac85e17428f8..09c012d54d58 100644 > > --- a/drivers/gpu/drm/vkms/vkms_crtc.c > > +++ b/drivers/gpu/drm/vkms/vkms_crtc.c > > @@ -86,6 +86,11 @@ static bool vkms_get_vblank_timestamp(struct drm_crtc *crtc, > > struct vkms_output *output = &vkmsdev->output; > > struct drm_vblank_crtc *vblank = &dev->vblank[pipe]; > > > > + if (!READ_ONCE(vblank->enabled)) { > > + *vblank_time = ktime_get(); > > + return true; > > + } > > + > > *vblank_time = READ_ONCE(output->vblank_hrtimer.node.expires); > > > > if (WARN_ON(*vblank_time == vblank->time)) > > diff --git a/drivers/gpu/drm/vkms/vkms_drv.c b/drivers/gpu/drm/vkms/vkms_drv.c > > index 1e8b2169d834..c2c83a01d4a7 100644 > > --- a/drivers/gpu/drm/vkms/vkms_drv.c > > +++ b/drivers/gpu/drm/vkms/vkms_drv.c > > @@ -76,10 +76,10 @@ static void vkms_atomic_commit_tail(struct drm_atomic_state *old_state) > > > > drm_atomic_helper_commit_modeset_disables(dev, old_state); > > > > - drm_atomic_helper_commit_planes(dev, old_state, 0); > > - > > drm_atomic_helper_commit_modeset_enables(dev, old_state); > > > > + drm_atomic_helper_commit_planes(dev, old_state, 0); > > + > > drm_atomic_helper_fake_vblank(old_state); > > > > drm_atomic_helper_commit_hw_done(old_state); > > -- > > 2.17.1 > > > > -- > > You received this message because you are subscribed to the Google Groups "Kernel USP" group. > > To unsubscribe from this group and stop receiving emails from it, send an email to kernel-usp+unsubscribe@googlegroups.com. > > To view this discussion on the web visit https://groups.google.com/d/msgid/kernel-usp/20200729152231.13249-1-realwakka%40gmail.com. -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch