Message ID | 20210712175352.802687-13-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=q1oR=ME=lists.freedesktop.org=intel-gfx-bounces@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 59A5AC11F66 for <intel-gfx@archiver.kernel.org>; Mon, 12 Jul 2021 20:02:35 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 25E8461221 for <intel-gfx@archiver.kernel.org>; Mon, 12 Jul 2021 20:02:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 25E8461221 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 33FC189E0D; Mon, 12 Jul 2021 20:02:15 +0000 (UTC) Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by gabe.freedesktop.org (Postfix) with ESMTPS id 31B5589E05 for <intel-gfx@lists.freedesktop.org>; Mon, 12 Jul 2021 20:02:11 +0000 (UTC) Received: by mail-wr1-x435.google.com with SMTP id k4so20946450wrc.8 for <intel-gfx@lists.freedesktop.org>; Mon, 12 Jul 2021 13:02:11 -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=ezhaA8hTBUICMyc9KfH8N0Ki2qpVtTK3oPL1/iX+DhE=; b=WvivAdaKsVfa79rAQx/9iAZ2ztB0DCmwcyARgn/20xmhYqF4sqZA7xQ1e3vLrWAbir 675MS66KN4C77TJVv66ZnEkHCn6nIX/Y4WBG0hIAlozl+vkh+eL07Olf7MELbvxedSaK LInOPpE+XOQwc5/ldMFb4xJEnWkmkipU9Yv1I= 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=ezhaA8hTBUICMyc9KfH8N0Ki2qpVtTK3oPL1/iX+DhE=; b=c8bTjP96YzsRYwZyDlu6d7YXirOLOqk2ac1YIrtiQ7VTf8oeMkIdPJ9gboUEGuUVUm f7OOCb8fchjjIUex61cnZs3elf8z0rmvraOC2jpXAoqdeTiyNTJjWKfeFGpj1rJA0L+Q a+XvVFm3XZQpZXGsbvdHfRxKVSHbvviIW9uv0xDhEIuAuLZ3R9p8OdgiSU41L0wxRHPw MB4zXwHX5nSVaPVXA8yATd6fCVJhxMbNWF/YWE1T3TgSYQ8NbQAW3KaC8XX6tnxj5Z10 nTbi96Ski99aMVnwT/WRO7Wk3Rtb3cfBi7oNSI+ZIPX3FiGwJiaCwIVkgE3eFr0zuMVA 4TZA== X-Gm-Message-State: AOAM530EuWYps7lBNC+aaRLYsbs6sd7Cyw08QSGl7+SQUIS6X9sZ3cSX vmxmyOnDHC0ilBJ0WV0edCN49A== X-Google-Smtp-Source: ABdhPJzz6Ty+0HbQQD5KqOZq4W2JOaXsv4E/IUMIyzLnldbgzh6U9YV/u0HOsJaD5B3+exw82XQkag== X-Received: by 2002:adf:de84:: with SMTP id w4mr885712wrl.104.1626120129933; Mon, 12 Jul 2021 13:02:09 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id l14sm9858221wrs.22.2021.07.12.13.02.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 12 Jul 2021 13:02:09 -0700 (PDT) From: Daniel Vetter <daniel.vetter@ffwll.ch> To: DRI Development <dri-devel@lists.freedesktop.org> Date: Mon, 12 Jul 2021 19:53:46 +0200 Message-Id: <20210712175352.802687-13-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210712175352.802687-1-daniel.vetter@ffwll.ch> References: <20210712175352.802687-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v4 12/18] drm/sched: Don't store self-dependencies X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development <intel-gfx.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/intel-gfx> List-Post: <mailto:intel-gfx@lists.freedesktop.org> List-Help: <mailto:intel-gfx-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/intel-gfx>, <mailto:intel-gfx-request@lists.freedesktop.org?subject=subscribe> Cc: Andrey Grodzovsky <andrey.grodzovsky@amd.com>, Jack Zhang <Jack.Zhang1@amd.com>, Daniel Vetter <daniel.vetter@ffwll.ch>, Intel Graphics Development <intel-gfx@lists.freedesktop.org>, Luben Tuikov <luben.tuikov@amd.com>, Alex Deucher <alexander.deucher@amd.com>, Daniel Vetter <daniel.vetter@intel.com>, =?utf-8?q?Christian_K=C3=B6nig?= <christian.koenig@amd.com>, Lucas Stach <l.stach@pengutronix.de> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" <intel-gfx-bounces@lists.freedesktop.org> |
Series |
drm/sched dependency tracking and dma-resv fixes
|
expand
|
diff --git a/drivers/gpu/drm/scheduler/sched_main.c b/drivers/gpu/drm/scheduler/sched_main.c index 84c30badb78e..fd52db906b90 100644 --- a/drivers/gpu/drm/scheduler/sched_main.c +++ b/drivers/gpu/drm/scheduler/sched_main.c @@ -660,6 +660,13 @@ int drm_sched_job_await_fence(struct drm_sched_job *job, if (!fence) return 0; + /* if it's a fence from us it's guaranteed to be earlier */ + if (fence->context == job->entity->fence_context || + fence->context == job->entity->fence_context + 1) { + dma_fence_put(fence); + return 0; + } + /* Deduplicate if we already depend on a fence from the same context. * This lets the size of the array of deps scale with the number of * engines involved, rather than the number of BOs.