Message ID | 20230308155322.344664-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 v21csp428634wrd; Wed, 8 Mar 2023 08:19:21 -0800 (PST) X-Google-Smtp-Source: AK7set+rdX1MqmVkH0Q0SoduON24tNvFGTYm4rHTdvansZRVlOsrclwabhiYm0DCvuXLx+uon+JV X-Received: by 2002:a17:90b:4a4f:b0:233:fdfd:710c with SMTP id lb15-20020a17090b4a4f00b00233fdfd710cmr19503828pjb.37.1678292360947; Wed, 08 Mar 2023 08:19:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678292360; cv=none; d=google.com; s=arc-20160816; b=X97xUsM2pPi1N50pS0jfbRzJx3vJqF1oQojyF0TabKlqe93eHPwXWJamwz6YjykkLc hJFUkuhq7Mkmi9qdLRAhtviSKzBVw73ZB3WiVf2l4gQJttWbdHJ+vhrSmdz/O8bAJIM1 lVH3mL3KuBoX2KsdeJot2K6NgJvmFoNO3m4ow4niIH3ndi1J8D3L8u2ceTL4t577RFmN FsZecBv12F7mdvA2v2HRxOfNDfdPl+NUNU4dvny/RaXP9AcrqBNTPJwxvlIYjysoiDf4 4V4RvzQI+bUScbb4fOgZRPd6VebZYUUDfh8gDLai6CykfRifzlG6kdiG2OH459fk1SHI k3Yg== 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=iRbyMbeEc1g04CNRPycSMV1Llvla2kLsSk+TytIEmsk=; b=oMpOpFE+Lz890cfwCXlZgM1q8pIm7YSC3zgJ2VtGTzlP6wvveF+McQd3y5s52wPW5k YMwcR+KqP/llDXIthEFzEbQY0lXPkpsoaWG9KxY30VxJQWpEhHDszWBS4najBlDl7Z8G MGxFjwLtD6w/LKQDS+XL8HWxBfMg0d4ymuaL+Qm/bOA+tQeYMtKnRfxow48BUrnUuJga /tSAI21cIcYZbbDGHr/CXP9oN0MW2UfTumJCa/YuDkyvzL8+0VVNn6KDjy1K0Dr1k9X8 fDewNBzP+hg6Oul+U6pKPWw4aloa8WQqTDtpUh46innQF7Be9vUpjOnG7fffNYBfsoiW lqOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E8F1gMxo; 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 145-20020a630297000000b0050726756ee8si12072204pgc.93.2023.03.08.08.19.05; Wed, 08 Mar 2023 08:19:20 -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=E8F1gMxo; 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 S232105AbjCHPxo (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 8 Mar 2023 10:53:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232012AbjCHPxf (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 8 Mar 2023 10:53:35 -0500 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1D935DCAE; Wed, 8 Mar 2023 07:53:33 -0800 (PST) Received: by mail-pl1-x635.google.com with SMTP id h8so18034488plf.10; Wed, 08 Mar 2023 07:53:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678290813; 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=iRbyMbeEc1g04CNRPycSMV1Llvla2kLsSk+TytIEmsk=; b=E8F1gMxoQi0pjd5J8Y6jydRjSAIw7Rqa8bmWluE0DJDyJZamKjSmyYHmicDKUAwwOC DQnKhprOqhc0JTNy+sNnE+urwNiknzVmXk5HUXLv/5fJW1DelsQr9V6lzlC2C/fBuROh dQlC9fHbBdG8RGLCVsgfvMowoZ2Tl2CmLHqlPv8EjfQxnvTBDu/RpJJx7iFwMlFw2PyV xPv4elub5ZEWEK3KKrtxxxySXJKaza7NBM6oYqynNIPvldcOtpF8ekHdqQYc+CKou2ta q0eWopDJcM86skChVL/X3tfUtoAE/NnPmjB29i3AHiXjxIjt05hzj6/+bqxy3PBQ2wAb 0PaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678290813; 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=iRbyMbeEc1g04CNRPycSMV1Llvla2kLsSk+TytIEmsk=; b=3v3XdKnxqmBCoxKux0rFDYZnKkQLTBiOJ5uEdr50yp045eqp6tXhoXiG1NWCDL076m cS5IZHi4vnCbCs5LvVSIvbhdoSpqF8O3ngTuCX7jbv9i8MMAXD/3jz+/Xryo2IhLVbrk kYuvs+5TZScIDtWI2r8qqDb+FWxHPDRBxc7ki/KW1No2guetGGSIIzV72/ibQ4Cxyujk skH2zbDh2ZzINW0VhwM2ZhER5z9zI/eKrrV9hYLFatTeXPxivWkrs+LjBIMA3MHdwPVL kr6nR7kPE1EmFi6YhbkhU8eoRNE63NETVe2fZUeCPzt8p1ys8luNkeUBBsoK5PaXcTQU OEHQ== X-Gm-Message-State: AO0yUKVFk2mUbIE82QGOqy8IcIzTDinybnG67EbanNfaCmthdyDMMAHX GVvk4jKKld7O8lfyKw9vL/0= X-Received: by 2002:a17:903:41c3:b0:19e:699e:9b64 with SMTP id u3-20020a17090341c300b0019e699e9b64mr23933457ple.65.1678290813286; Wed, 08 Mar 2023 07:53:33 -0800 (PST) Received: from localhost ([2a00:79e1:abd:4a00:61b:48ed:72ab:435b]) by smtp.gmail.com with ESMTPSA id jx15-20020a170903138f00b0019468fe44d3sm9996583plb.25.2023.03.08.07.53.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Mar 2023 07:53:32 -0800 (PST) From: Rob Clark <robdclark@gmail.com> To: dri-devel@lists.freedesktop.org Cc: freedreno@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, Luben Tuikov <luben.tuikov@amd.com>, =?utf-8?q?Christian_K=C3=B6nig?= <ckoenig.leichtzumerken@gmail.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Matt Turner <mattst88@gmail.com>, Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>, 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 v10 02/15] dma-buf/fence-array: Add fence deadline support Date: Wed, 8 Mar 2023 07:52:53 -0800 Message-Id: <20230308155322.344664-3-robdclark@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230308155322.344664-1-robdclark@gmail.com> References: <20230308155322.344664-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?1759817090728155013?= X-GMAIL-MSGID: =?utf-8?q?1759817090728155013?= |
Series |
dma-fence: Deadline awareness
|
|
Commit Message
Rob Clark
March 8, 2023, 3:52 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);