From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4E6A9C76188 for ; Wed, 5 Apr 2023 12:25:27 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9C44110E919; Wed, 5 Apr 2023 12:25:22 +0000 (UTC) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0617510E90A; Wed, 5 Apr 2023 12:25:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680697521; x=1712233521; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=pOpaS/VzVZdJzObenZMlvFf1Tou6jErgD6Bwf6oEvXo=; b=SwCDo21AqMhlH6pSZwmehNQTpt6lqhISdzuH8NBBEab2n+kNFR/TzE6K TqZYa7rMXoQVtHMPA3sduII97bHBNX0gEIARQi+zN0PJ+l4aXnkE+HNie WpIZtbBn0Ul5x+pg91U8XL0ZvEvWE06NO8E7l05gCMoe2tLRzzGo73/D/ gaW0IbNqHxhN28Zt4A7neVDZkiZYIuWNs0O3/1+qYY2pyl85O+DRP6S9Y N1mPTySn7S1e8wlrM70EQFXhdcd2+VwPlXG0bSXNd3gqV997Jsxi368rS SUsr++6zozjSDMJyduoevUwT6X7YvBqY1BGT9LPU5CoitLlDzXAgkJ5Bq g==; X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="345017360" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="345017360" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 05:25:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="719300576" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="719300576" Received: from stinkpipe.fi.intel.com (HELO stinkbox) ([10.237.72.70]) by orsmga001.jf.intel.com with SMTP; 05 Apr 2023 05:25:16 -0700 Received: by stinkbox (sSMTP sendmail emulation); Wed, 05 Apr 2023 15:25:15 +0300 Date: Wed, 5 Apr 2023 15:25:15 +0300 From: Ville =?iso-8859-1?Q?Syrj=E4l=E4?= To: Daniel Vetter Message-ID: References: <20230405081650.797972-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230405081650.797972-1-daniel.vetter@ffwll.ch> X-Patchwork-Hint: comment Subject: Re: [Intel-gfx] [PATCH] drm/atomic-helper: Don't set deadline for modesets X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Clark , Intel Graphics Development , DRI Development , Thomas Zimmermann , Dmitry Baryshkov , Daniel Vetter Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Wed, Apr 05, 2023 at 10:16:50AM +0200, Daniel Vetter wrote: > If the crtc is being switched on or off then the semantics of > computing the timestampe of the next vblank is somewhat ill-defined. > And indeed, the code splats with a warning in the timestamp > computation code. Specifically it hits the check to make sure that > atomic drivers have full set up the timing constants in the drm_vblank > structure, and that's just not the case before the crtc is actually > on. > > For robustness it seems best to just not set deadlines for modesets. > > Link: https://lore.kernel.org/dri-devel/dfc21f18-7e1e-48f0-c05a-d659b9c90b91@linaro.org/ > Fixes: d39e48ca80c0 ("drm/atomic-helper: Set fence deadline for vblank") > Cc: Rob Clark > Cc: Daniel Vetter > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Thomas Zimmermann > Reported-by: Dmitry Baryshkov > Tested-by: Dmitry Baryshkov # test patch only > Cc: Dmitry Baryshkov > Signed-off-by: Daniel Vetter > --- > drivers/gpu/drm/drm_atomic_helper.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c > index f21b5a74176c..6640d80d84f3 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -1528,6 +1528,9 @@ static void set_fence_deadline(struct drm_device *dev, > for_each_new_crtc_in_state (state, crtc, new_crtc_state, i) { > ktime_t v; > > + if (drm_atomic_crtc_needs_modeset(new_crtc_state)) > + continue; Should this stuff also be skipped when !new_crtc_state->active? I didn't actually check what drm_crtc_next_vblank_start() ends up doing in that case. > + > if (drm_crtc_next_vblank_start(crtc, &v)) > continue; > > -- > 2.40.0 -- Ville Syrjälä Intel