Message ID | 20230302235356.3148279-3-robdclark@gmail.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp130370wrd; Thu, 2 Mar 2023 15:55:21 -0800 (PST) X-Google-Smtp-Source: AK7set9VCxOFTIUMwVfDDHS62qvgzNYCRQaFYpTP/xN4qmu4HPZxAczmpBGFkkzI2naGUI0MA4eN X-Received: by 2002:a17:906:3b85:b0:8b1:7569:b51a with SMTP id u5-20020a1709063b8500b008b17569b51amr11179951ejf.53.1677801321100; Thu, 02 Mar 2023 15:55:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677801321; cv=none; d=google.com; s=arc-20160816; b=V9Rm/adbVNn4jxrZ55SBSjc61k+86rr9OeNlYgoU8jAz6fSve5/s2+L5M2PzXty82J edDaRLUxzIY6qI6kVlYxU16FZOyCgCRj4G6LR63bEAVEWiMyA+1Io90UVdlr4UfCAmyA U/fehs05N514Jo24gPsXji4361W6PChpq4+EWVpeFg/bQlhBHoJUbysXlu5ivk4Hr2ol 3baexvsHQgE4ZdFnPBNvkdF/M2u23eldKaTFYkVGf4jeePSeaFwDL9soJrW8hsTG0Lep vW7pvsYQ6/hogmsQAGuA4ThgD6sa7syUHC8VAM7wWfEZtQzenkqvcOzHPCLNYeDsD8hC CI9g== 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=MohZmh6ZcfzJn1OmRfs/o8+oM4ZPKLi2FB+4LPpL34o=; b=mjCOpZJEOclO9UAYutf7iBYXxhGWnSQOjxVhQrq071fLtlX/3jqxHDzJcsrLCdz918 vfe1/hMZqvBztfKe8XEHZ/8Ci+1jzd8CWrr5fk24I8FplooO60wcaUGQY9QINZu3UV/2 b+j0PIC5umMeV9bDTRTkbadU+oTOnwhihR/LliiQ951p84OY0oEOQfxGSCDyDuHE8YPQ jejszD1oID+7/DbtpkbQQiQMfXyrjGIrUsxuqB70jaymUruwEpcREoz1p/eHu22Z906N T52JBfzkND/tdlkbyWfRDDmekVP0IdfsYITjITNLe43wNY17+cBP+mRrfWY7lEcYQ93o xcIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NgK5Qtsz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mp28-20020a1709071b1c00b008e649198db8si822561ejc.720.2023.03.02.15.54.53; Thu, 02 Mar 2023 15:55:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NgK5Qtsz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229825AbjCBXyH (ORCPT <rfc822;davidbtadokoro@gmail.com> + 99 others); Thu, 2 Mar 2023 18:54:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229486AbjCBXyE (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 2 Mar 2023 18:54:04 -0500 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42965158AF; Thu, 2 Mar 2023 15:54:03 -0800 (PST) Received: by mail-pl1-x634.google.com with SMTP id ky4so1006482plb.3; Thu, 02 Mar 2023 15:54:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677801243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MohZmh6ZcfzJn1OmRfs/o8+oM4ZPKLi2FB+4LPpL34o=; b=NgK5QtszZ34lTuRCDFR83nPJyn+DB4rxTP0xE2Tk42ck5MrS8xMf8+Res005BFWuUk OiuxWxoPYxy985tYupfANAIrsky/jHuQ0bpw0XrNrep1WFn2j77wuC2WfXhWBQrMh2KG evUciIFKtkiC5/Hmp/8FmBzb9+e5Vo7L6cnn6JIueIthHxAVhn335lRK8rGh5mGIius4 Wa8k5qiZYL/4YmTU7abiVzfN5/DUGErsbDi1RVQ8/Tenm/Tt8tNy7WPC+INzuVg/caoS m+ubGaCAgoPAqn+oSkkBszkky6JbiZxyGBXxNkFY9Ckw1BDh1V34yYFBDyAdvi6yg4k8 BRdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677801243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MohZmh6ZcfzJn1OmRfs/o8+oM4ZPKLi2FB+4LPpL34o=; b=aLSMqimqURe1v3N40fvJemktFtcAcWXWl4UyvHJTmhtYI23nhuq1J0ySCTj1iMuwu3 LM4YMFgVg9HF96tSQ2IRukJXJaUgUCmbIQF/XICzV1KXIDMZkCVcM9BBKmjSvzvMJl1L WklXI5GZAULy/BR0n4iRHRhgOpg3rcT4s5RSLAJPIjz6NNLtCqThmh4Hwqb28xB4jD07 el6rJORFldSmPLvA9x3yteIFYGryuOXJ2LuRIrsXS9T0VbNMjRzeP6fgpKawLUlJkGp/ l79UYkfkxusa+OD/VOBIP+Az4eP7X9cYGjNWy7XqyhlQpDeDqsEma0h5WUfgMLx0FqBN Me9g== X-Gm-Message-State: AO0yUKViUN+mWhdnYTf3R4oZw5kw9jpY/MAgm5FtuXdOvMdM1N7ooRd6 SAX9Gp3OjVhVYKlZrGylWtI= X-Received: by 2002:a05:6a20:12c3:b0:c7:40f8:73d3 with SMTP id v3-20020a056a2012c300b000c740f873d3mr261340pzg.33.1677801242601; Thu, 02 Mar 2023 15:54:02 -0800 (PST) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id 35-20020a631763000000b004ecd14297f2sm227996pgx.10.2023.03.02.15.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 15:54:02 -0800 (PST) From: Rob Clark <robdclark@gmail.com> To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, Daniel Vetter <daniel@ffwll.ch>, =?utf-8?q?Christian_K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>, =?utf-8?q?Michel_D=C3=A4nzer?= <michel@daenzer.net>, Tvrtko Ursulin <tvrtko.ursulin@intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Alex Deucher <alexander.deucher@amd.com>, Pekka Paalanen <ppaalanen@gmail.com>, Simon Ser <contact@emersion.fr>, Luben Tuikov <luben.tuikov@amd.com>, Rob Clark <robdclark@chromium.org>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Sumit Semwal <sumit.semwal@linaro.org>, Gustavo Padovan <gustavo@padovan.org>, linux-media@vger.kernel.org (open list:SYNC FILE FRAMEWORK), linaro-mm-sig@lists.linaro.org (moderated list:DMA BUFFER SHARING FRAMEWORK), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v9 02/15] dma-buf/fence-array: Add fence deadline support Date: Thu, 2 Mar 2023 15:53:24 -0800 Message-Id: <20230302235356.3148279-3-robdclark@gmail.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230302235356.3148279-1-robdclark@gmail.com> References: <20230302235356.3148279-1-robdclark@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759302198033019537?= X-GMAIL-MSGID: =?utf-8?q?1759302198033019537?= |
Series |
dma-fence: Deadline awareness
|
|
Commit Message
Rob Clark
March 2, 2023, 11:53 p.m. UTC
From: Rob Clark <robdclark@chromium.org> Propagate the deadline to all the fences in the array. Signed-off-by: Rob Clark <robdclark@chromium.org> Reviewed-by: Christian König <christian.koenig@amd.com> --- 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 5c8a7084577b..9b3ce8948351 100644 --- a/drivers/dma-buf/dma-fence-array.c +++ b/drivers/dma-buf/dma-fence-array.c @@ -123,12 +123,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);