From patchwork Tue Jul 6 10:12:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12360215 Return-Path: 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=-11.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,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 DA30BC07E9C for ; Tue, 6 Jul 2021 10:12:18 +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 24DB2619A2 for ; Tue, 6 Jul 2021 10:12:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24DB2619A2 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 9AE048969E; Tue, 6 Jul 2021 10:12:17 +0000 (UTC) Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by gabe.freedesktop.org (Postfix) with ESMTPS id BF604896B0 for ; Tue, 6 Jul 2021 10:12:16 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id i2-20020a05600c3542b02902058529ea07so1852941wmq.3 for ; Tue, 06 Jul 2021 03:12:16 -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:mime-version :content-transfer-encoding; bh=GJFjpnfi1CrXf9Xlto1Y0oqA4kGU3rsK5ujAK/B2UD0=; b=RLSr0BMa2WuqooB9WTidkm9M10gQONkPGEe2TtNROAgiPX8sJYVD+SO8G65+hw5uvH wkS1+bLSKgnX1/3P7A81eDCwdpGH9URQJn/HxAvqKI3fP88t/xCIT7cvqEx1kvHtpLFL TjWvDsncXw0DDxGnoPlvjHfdZr0OK8sGDEx2k= 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:mime-version :content-transfer-encoding; bh=GJFjpnfi1CrXf9Xlto1Y0oqA4kGU3rsK5ujAK/B2UD0=; b=hYDCmJj770DLio7cgl43LnEcsfNxuJm6X4VTMC0TLo/DK/t3q0gSXpf7zSAWxjq30E a8rfngNvThkHwDmD4KyqMRMuyhmDfCJmyjKDgBtVIHGfOi3yGHa2v6HHCEbGk92isafA H41J76JO4H3wDdrIAC0jZnvejbO3GBKFA9D6asGczzZf42w14P6o5blOpPbwCiWXjHco Ss4wJTIbPb8163HcU7o5O6bdosrtM5a+sOJP8B6CZQ8civ1hpfeFntskBRMXbFMPec6y 7rnKiMLn7sO2EXJkXgf7RQSXt9/Xm1L3vALsbIi1MIuM3QSvCi+aslxpNaz4J7Pr31Tl 4zTQ== X-Gm-Message-State: AOAM532hEjggiTOw/2ipdf4KJTkPRi/vNDWe4TtvHC79qfyuJL3fQC5G DLp3+A8AkVhVNtngYxaxxYdTgg== X-Google-Smtp-Source: ABdhPJxDM9mfVZ/s7nd08cWobUUsT4n1KrJ55qceNrVz76A6WO7wHcLc/WGZ/OlJwJjbN9bjf0bqFg== X-Received: by 2002:a1c:4e0c:: with SMTP id g12mr3886074wmh.120.1625566335334; Tue, 06 Jul 2021 03:12:15 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id u2sm9862739wmc.42.2021.07.06.03.12.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Jul 2021 03:12:14 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 6 Jul 2021 12:12:02 +0200 Message-Id: <20210706101209.3034092-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 0/7] dma-resv fence DAG fixes X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , Intel Graphics Development Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Hi all, Finally I think I got them all in trying to audit all drivers for how they deal with dma-resv dependencies in their command submission ioctl. This series is incomplete, it also needs a few things from Christian - nouveau fix for waiting for all fences - various patches for fixing up dma-buf/resv functions to always wait for all fences (dma-buf poll, is_signalled, ...) - I do include the one msm patch from Christian here since there was another issue in msm that needed fixing, and to make sure we have the complete set for msm Two main things: - fix drivers that currently can break the DAG. I opted for the dumbest possible way and not for rolling out dma_fence_chain - this can be fixed later on if needed. - allow shared fences to be decoupled from the exclusive slot, which mostly means we can't skip waiting for the exclusive fence if there's shared fences present, we have to wait for all fences. This is a semantic change compared to what we've had thus far, but really makes a ton of sense given where things are heading towards. Note that this means the import/export patches from Jason need to be adjusted too to fit. Plus some docs for dma-resv, they've been rather lacking. Testing and review highly welcome. Christian König (1): drm/msm: always wait for the exclusive fence Daniel Vetter (6): drm/msm: Don't break exclusive fence ordering drm/etnaviv: Don't break exclusive fence ordering drm/i915: delete exclude argument from i915_sw_fence_await_reservation drm/i915: Always wait for the exclusive fence drm/i915: Don't break exclusive fence ordering dma-resv: Give the docs a do-over drivers/dma-buf/dma-resv.c | 22 +++- drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 8 +- drivers/gpu/drm/i915/display/intel_display.c | 4 +- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 2 +- .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 8 +- drivers/gpu/drm/i915/i915_sw_fence.c | 10 +- drivers/gpu/drm/i915/i915_sw_fence.h | 1 - drivers/gpu/drm/msm/msm_gem.c | 16 ++- drivers/gpu/drm/msm/msm_gem_submit.c | 3 +- include/linux/dma-resv.h | 104 +++++++++++++++++- 10 files changed, 142 insertions(+), 36 deletions(-)