Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp748691pxb; Fri, 3 Sep 2021 12:31:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzHPB4GdZNx4BopvxCJUGfeCn/UZoUi1EdJYhO5l5Ymfy/izX/TOcv9EoxqDmk9JR1w4Y+v X-Received: by 2002:a05:6e02:1d95:: with SMTP id h21mr363652ila.231.1630697514881; Fri, 03 Sep 2021 12:31:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630697514; cv=none; d=google.com; s=arc-20160816; b=x0bqDs7cgvV1tv2/X1pfBCMrHR8olT1xK+A4ZUqQlkUuAB7BB890PlkkarFHYel+LJ SHLYYKV0nMQdjXvHps6jnZnrW/Iq2uosvRCWSjgc2lDDLbHtcx8ltrhl+0djcGc1ZQdH jKC7/WM1z4ne6TvP97mgbVO5I4DJmch+C2Momxh4Mic/PWw0xau20TWYYqdMxVjNjW31 XYsm7uwJUY4+JQmopFzZO/cCgspuNI6TetX7Mtdnn53YOJ374BQfwYABR+Nq8s814VeJ h7BWbt+IMSbvOHMDC7MRBjkqZLveOzVdLEolCm/eHLyexmpUNayemb7WOUPGsp+pCCho 9OeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ePxJybomMw7KwNl/06F/f9BuSUg0DBEjdIp9sOebF7o=; b=siHrozwdudQdJnau7GU9KpdRfOeVtS8eQwrdDNJxERPlPZVNEvFHjEOrYCFP9W85xz d4mtlnB+BcCzhrxYVIdCgPIW9Ar/4Q8iMsPvym866MSw/OV2m76tqJTOt9VevjuXuv3b DA3Qm9OMbybrkjqKLaYYH4ZEfjYAahYa1gH/wq/dZbzgbsinrHo4OuCKkVItBNwN5fvd wZ2gkpRoEWhYlYcPRuu2RwSfOsMtvMtP+KZJBGm83BGMDwUIGrkaCwcumXfA7qOpHZwb aX4943wpKwT1KTCPYHH8RtWktq9eLwbabd0dTpgf5WHUc27DJAGeLB5YttUSMle9A8TJ IKsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=BvMTOHBo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si157616ilc.169.2021.09.03.12.31.42; Fri, 03 Sep 2021 12:31:54 -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=@gmail.com header.s=20210112 header.b=BvMTOHBo; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350169AbhICSpZ (ORCPT + 99 others); Fri, 3 Sep 2021 14:45:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350056AbhICSpQ (ORCPT ); Fri, 3 Sep 2021 14:45:16 -0400 Received: from mail-pf1-x432.google.com (mail-pf1-x432.google.com [IPv6:2607:f8b0:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B3AEC061764; Fri, 3 Sep 2021 11:44:16 -0700 (PDT) Received: by mail-pf1-x432.google.com with SMTP id 7so185985pfl.10; Fri, 03 Sep 2021 11:44:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ePxJybomMw7KwNl/06F/f9BuSUg0DBEjdIp9sOebF7o=; b=BvMTOHBoJQkt0BIhnKLwCwWsS493zyVEfOi0uWmcJC2buz2melLUXyaqwMUK4fSo3I y3aDAag69Mz6ynkPjigXyEg9Jl0nV+MYC1ndP1ma/Lh44jH/QjHOSs6x/3U/H1rD3bHS mGsKVnKN3FCYSTm655cSyebyavRCqtX2W3RFDB86rHu6twvqj4jx5KGUAgBKK/nWaiND dPap3WbMNgoBPMYK+DkbLTNIVDSf/Zi0N/glyV5rQz1uZ+3yUxXWiSjQrQONKO06UL+g gCo2fQMcpUmwzjBRHMY/2iVs3gkNmgkKjLnhHIvrWnKiOFne/vCmrW31siHiRvex8buq e2cg== 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=ePxJybomMw7KwNl/06F/f9BuSUg0DBEjdIp9sOebF7o=; b=pb+sm67XgTj147EiaPWXOcnpb+cON0rWdoJ0Sa/uuSXwXAHfvVPCkDhhlN2NnTMRJ2 CobIYIM9BgC0u95f5eGyzKmxbTZqUaVd7f+kCGdMLTbGWVIIWexqMRtE3xQypxLWtE2i 8A4A794NMnV3pnVaf0PK5KBfr45dg2IyUlzuKN/zNzkAd741siPeDafIiNSiVuYNVnBw zo3OLTiNvYiFOgfHn9F9P9zB2baRVdkntzZdB4wbti/m+K1NHUlvnYuuSaqQxAuAmO0B Ke1nTwb9dp/B+i8mp1bO+en284C1KyykES6Z3hOA2a4AhiJqG7exdRYkJOiJWP8zMKkD Fnaw== X-Gm-Message-State: AOAM533Xi5ir52tqwpSGJ6+zziJSy4Gj93q478uA6aHjd/f8xtiJoULn FKoEgHzQRwb3pAquZI3K/fI= X-Received: by 2002:a63:6f83:: with SMTP id k125mr365747pgc.379.1630694655988; Fri, 03 Sep 2021 11:44:15 -0700 (PDT) Received: from localhost (c-73-25-156-94.hsd1.or.comcast.net. [73.25.156.94]) by smtp.gmail.com with ESMTPSA id n13sm113692pff.164.2021.09.03.11.44.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Sep 2021 11:44:15 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Cc: Daniel Vetter , =?UTF-8?q?Christian=20K=C3=B6nig?= , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Pekka Paalanen , Rob Clark , Sumit Semwal , Gustavo Padovan , =?UTF-8?q?Christian=20K=C3=B6nig?= , linux-media@vger.kernel.org (open list:SYNC FILE FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v3 6/9] dma-buf/fence-array: Add fence deadline support Date: Fri, 3 Sep 2021 11:47:57 -0700 Message-Id: <20210903184806.1680887-7-robdclark@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210903184806.1680887-1-robdclark@gmail.com> References: <20210903184806.1680887-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rob Clark Signed-off-by: Rob Clark --- drivers/dma-buf/dma-fence-array.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/dma-buf/dma-fence-array.c b/drivers/dma-buf/dma-fence-array.c index d3fbd950be94..8d194b09ee3d 100644 --- a/drivers/dma-buf/dma-fence-array.c +++ b/drivers/dma-buf/dma-fence-array.c @@ -119,12 +119,23 @@ static void dma_fence_array_release(struct dma_fence *fence) dma_fence_free(fence); } +static void dma_fence_array_set_deadline(struct dma_fence *fence, + ktime_t deadline) +{ + struct dma_fence_array *array = to_dma_fence_array(fence); + unsigned i; + + for (i = 0; i < array->num_fences; ++i) + dma_fence_set_deadline(array->fences[i], deadline); +} + const struct dma_fence_ops dma_fence_array_ops = { .get_driver_name = dma_fence_array_get_driver_name, .get_timeline_name = dma_fence_array_get_timeline_name, .enable_signaling = dma_fence_array_enable_signaling, .signaled = dma_fence_array_signaled, .release = dma_fence_array_release, + .set_deadline = dma_fence_array_set_deadline, }; EXPORT_SYMBOL(dma_fence_array_ops); -- 2.31.1