Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1119870ybg; Thu, 4 Jun 2020 01:16:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxHfIk6twufdI+ffyDMr8t5pcwEXzOirx4KlZuzS9C948dymyfAbdxcrej2y7WW4gakRnL8 X-Received: by 2002:a50:b082:: with SMTP id j2mr3210519edd.201.1591258616236; Thu, 04 Jun 2020 01:16:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591258616; cv=none; d=google.com; s=arc-20160816; b=Pa5BRjG9U3e0BXWAeKvkzsKZfzHEzKQ9HPYq2pfJaypbH/Yr8Zt7a/owkUOh8YnC0i X3zsYMcKCt1+LJKbQQg51G7psJxwAbKrd9uOUwE66g+ApCRiVnSvbuQwCFuhPBPwR3p/ J6vRnyl9glwVsVl5DtMqcb212so0AhjFYlxhybkrkICgOC2mQs5ob3Lr1n8RpkPXviaL 1XkaRvZL4lWZ8amFVzTqCvQtr0ADO2MhDP35YQw8bI9wF7jNEfqpPAN/zFfc+69LsKj0 67nBA1XtYDt3So10nIsvSyzNeRWk05K4ztSIIcXNsaKM5IB8Bko1qoprTREXvRbgPGjn vVHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Z86jDMPjYosEVmpvz8g87itNg+tEFmiX7DLzwmjjruY=; b=z91qpP71SI4y8fd0pnXMPo6aCW5jTDJJBKLgyRD1OTWoukTbqFC34sEUe0YqW3uwCy O2inF/34XKMRDpqByC0EN0qphc0vP0gXeEEl4pwNosbxReKO513qdieQI06hIwO+vppA jh+EXwUReN6N1w5++nm66zvC6FTO9QEWLTjfA4D3wSOYEev2uQYxce9Qu74D9O/yHuZ3 8Wc0ly12z8rz5i4FuiAML1gV/SGAeU6RmHmhW9VMP8p2eiibfxQD84rFpC7dYi2ftKbG NtLzwRMybr5PUurZxouDrzRZTI8XE+ee2Glhvg55/L0rpXYwn+IjswsnTENCnca/TvqG TiJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=IqxGBAw7; 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 dm9si1494677ejc.624.2020.06.04.01.16.32; Thu, 04 Jun 2020 01:16:56 -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=pass header.i=@ffwll.ch header.s=google header.b=IqxGBAw7; 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 S1727088AbgFDIMp (ORCPT + 99 others); Thu, 4 Jun 2020 04:12:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727021AbgFDIMm (ORCPT ); Thu, 4 Jun 2020 04:12:42 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA59CC08C5C2 for ; Thu, 4 Jun 2020 01:12:39 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id f185so4619167wmf.3 for ; Thu, 04 Jun 2020 01:12:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Z86jDMPjYosEVmpvz8g87itNg+tEFmiX7DLzwmjjruY=; b=IqxGBAw7Ux8mFxKbZqFfhWHBvUThVxHGPJeIMG6V8JAySneDzg1MMfr9dhIgUYw2Fn OTAZ0xbCrYCL4eXPkPqfd9hDPavzifvRAdCmfeUmSdOIDkGg1FY43BlyAFoqsAL1182F slvaQBsul976QOmZFtX03fE52IJl/0XI4phXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Z86jDMPjYosEVmpvz8g87itNg+tEFmiX7DLzwmjjruY=; b=pnlVtjay7OMA5Q+CaBi5/n5A54OIEvzhNJRcpwwiV218RQ94NynIdx2ObcGz+Y1n95 FzPyX7I0bII0sg4axuzpuwSGB6wvRBrzrFRXwMSmJGn6VLi9f/BwzjfpM1imID8rKt/m zG+TsuLkVwfI2BMpAR8c+ljiS1Nl2DGt/LCmZLXDTyjfE7k7GpiV733og6uILye210aN AUiT4TJUTJSufVbnfGZYWABbmt8YpoZFx51UgH5GpWm0OZcu+Eetfss2AN48qyt8pKxE CR+QYc+P3SRvJ3nPCLyJc5JFwZuZt9TBfcZyltpZRgkDhzgJsVbSd+pugan6WXmy/A4l 20kw== X-Gm-Message-State: AOAM531l/JMcqoj7xyWy7alywC63qEST0RV80MNERM53KoQeddq3DAGu i7glMMnr0QLKr+/Anop50g3nNw== X-Received: by 2002:a7b:c385:: with SMTP id s5mr3041108wmj.121.1591258358519; Thu, 04 Jun 2020 01:12:38 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id f11sm6873305wrj.2.2020.06.04.01.12.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jun 2020 01:12:37 -0700 (PDT) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , LKML , linux-rdma@vger.kernel.org, amd-gfx@lists.freedesktop.org, Daniel Vetter , linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Chris Wilson , Maarten Lankhorst , =?UTF-8?q?Christian=20K=C3=B6nig?= , Daniel Vetter , Rodrigo Siqueira , Haneen Mohammed , Daniel Vetter Subject: [PATCH 05/18] drm/vkms: Annotate vblank timer Date: Thu, 4 Jun 2020 10:12:11 +0200 Message-Id: <20200604081224.863494-6-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200604081224.863494-1-daniel.vetter@ffwll.ch> References: <20200604081224.863494-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is needed to signal the fences from page flips, annotate it accordingly. We need to annotate entire timer callback since if we get stuck anywhere in there, then the timer stops, and hence fences stop. Just annotating the top part that does the vblank handling isn't enough. Cc: linux-media@vger.kernel.org Cc: linaro-mm-sig@lists.linaro.org Cc: linux-rdma@vger.kernel.org Cc: amd-gfx@lists.freedesktop.org Cc: intel-gfx@lists.freedesktop.org Cc: Chris Wilson Cc: Maarten Lankhorst Cc: Christian König Signed-off-by: Daniel Vetter Cc: Rodrigo Siqueira Cc: Haneen Mohammed Cc: Daniel Vetter --- drivers/gpu/drm/vkms/vkms_crtc.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_crtc.c b/drivers/gpu/drm/vkms/vkms_crtc.c index ac85e17428f8..a53a40848a72 100644 --- a/drivers/gpu/drm/vkms/vkms_crtc.c +++ b/drivers/gpu/drm/vkms/vkms_crtc.c @@ -1,5 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ +#include + #include #include #include @@ -14,7 +16,9 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) struct drm_crtc *crtc = &output->crtc; struct vkms_crtc_state *state; u64 ret_overrun; - bool ret; + bool ret, fence_cookie; + + fence_cookie = dma_fence_begin_signalling(); ret_overrun = hrtimer_forward_now(&output->vblank_hrtimer, output->period_ns); @@ -49,6 +53,8 @@ static enum hrtimer_restart vkms_vblank_simulate(struct hrtimer *timer) DRM_DEBUG_DRIVER("Composer worker already queued\n"); } + dma_fence_end_signalling(fence_cookie); + return HRTIMER_RESTART; } -- 2.26.2