From mboxrd@z Thu Jan 1 00:00:00 1970 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=-5.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 57085C47094 for ; Thu, 10 Jun 2021 09:18:08 +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 EBE37613ED for ; Thu, 10 Jun 2021 09:18:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EBE37613ED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D5FA76EC90; Thu, 10 Jun 2021 09:18:05 +0000 (UTC) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDD2E6EC8E; Thu, 10 Jun 2021 09:18:03 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id k5-20020a05600c1c85b02901affeec3ef8so6115652wms.0; Thu, 10 Jun 2021 02:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fmb4cueVtOXZ29A3KoEkc9R3bgHt8UwFR2vwnaO9L4o=; b=cLz8LVCjuXmwIs0cUlJEHekrA55mhSzQQpmX2bxPLIrXyH+tB3AyaQVlj/jdabTEjj BngJdUDDdMw+iN2PFR7UwhOFjppSQz2X9iz7AzjRxtBSi8Pv6XYOv025y5A7PKBmdpyX jYLck3rzYgHh3I6x8h+LACBB8BeH0eS+fL8qaoYQnGiFSY9LH0AIIg5RTXpCJ6k8Thsw ctZMvX7q7n4tHWUURcGzkJIHgRHD8kXh19JI+Ql297urgxfO4uaYsjnom4tyYkm0SdNE koLzJWCnmTX8emeC5T6Ig+X6ZRJ74v74A0s6kCPiRcnSNmP+ous7+Lsd01Ki1u5mJpL8 fchQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fmb4cueVtOXZ29A3KoEkc9R3bgHt8UwFR2vwnaO9L4o=; b=ZVlfxuPUDP5Mo8jkW36KFTudsZTKrS7giIa7s/QQ0tNJb6upvFVxk/I1Q9iJA/dBAq atoE58cGp5RZN1tsYfEkP/Z3DIvX44ncbqtgljq17wRV+K3qxnU4Nnwc4shhtJEFfE5z r97PmOVXdlQQ6IGf6aeJ9j6/9FDIG91EL3Bf8XxCRDgBAosbMYKcey5onNmzJFtUuB+C tMnJf7RgyTFgVD7PCI8tppIGExJ6YF6glRA271RNDd7B0Df7z5Emi65XLe5r5VMYRe52 6twUdy/R9XDf3L61U9RNI4fsYw8frFAvYtQv8+lbko+UlnS+gcI7Yb8CuD3tCFItuj8O oLgg== X-Gm-Message-State: AOAM533dRIpD8Nf/YCwsJYmbY6Uu/GMzj3S02H/Tt9QF2Gn438Qv4WfE UnXroeenyi85i5ya3x/o1AZlPW6XC3A= X-Google-Smtp-Source: ABdhPJzXaladOwixE+vJSP7w5UTqwMP1tNW7nfxmDEpeieNhhorC1gVgMhIdsQfiiWTcxL86s62eiQ== X-Received: by 2002:a05:600c:243:: with SMTP id 3mr4000102wmj.35.1623316682565; Thu, 10 Jun 2021 02:18:02 -0700 (PDT) Received: from abel.fritz.box ([2a02:908:1252:fb60:561f:e43a:edf5:8f95]) by smtp.gmail.com with ESMTPSA id v8sm3087445wrc.29.2021.06.10.02.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 02:18:02 -0700 (PDT) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: daniel@ffwll.ch, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: Change how amdgpu stores fences in dma_resv objects Date: Thu, 10 Jun 2021 11:17:53 +0200 Message-Id: <20210610091800.1833-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Since we can't find a consensus on hot to move forward with the dma_resv object I concentrated on changing the approach for amdgpu first. This new approach changes how the driver stores the command submission fence in the dma_resv object in DMA-buf exported BOs. For exported BOs we now store the CS fence in a dma_fence_chain container and assign that one to the exclusive fences slot. During synchronization this dma_fence_chain container is unpacked again and the containing fences handled individually. This has a little bit more overhead than the old approach, but it allows for waiting for the exclusive slot for writes again. Regards, Christian. From mboxrd@z Thu Jan 1 00:00:00 1970 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=-3.5 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=no 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 EC885C47094 for ; Thu, 10 Jun 2021 09:18:05 +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 B3BBB61406 for ; Thu, 10 Jun 2021 09:18:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B3BBB61406 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=amd-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 480E86EC8E; Thu, 10 Jun 2021 09:18:05 +0000 (UTC) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDD2E6EC8E; Thu, 10 Jun 2021 09:18:03 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id k5-20020a05600c1c85b02901affeec3ef8so6115652wms.0; Thu, 10 Jun 2021 02:18:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fmb4cueVtOXZ29A3KoEkc9R3bgHt8UwFR2vwnaO9L4o=; b=cLz8LVCjuXmwIs0cUlJEHekrA55mhSzQQpmX2bxPLIrXyH+tB3AyaQVlj/jdabTEjj BngJdUDDdMw+iN2PFR7UwhOFjppSQz2X9iz7AzjRxtBSi8Pv6XYOv025y5A7PKBmdpyX jYLck3rzYgHh3I6x8h+LACBB8BeH0eS+fL8qaoYQnGiFSY9LH0AIIg5RTXpCJ6k8Thsw ctZMvX7q7n4tHWUURcGzkJIHgRHD8kXh19JI+Ql297urgxfO4uaYsjnom4tyYkm0SdNE koLzJWCnmTX8emeC5T6Ig+X6ZRJ74v74A0s6kCPiRcnSNmP+ous7+Lsd01Ki1u5mJpL8 fchQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=Fmb4cueVtOXZ29A3KoEkc9R3bgHt8UwFR2vwnaO9L4o=; b=ZVlfxuPUDP5Mo8jkW36KFTudsZTKrS7giIa7s/QQ0tNJb6upvFVxk/I1Q9iJA/dBAq atoE58cGp5RZN1tsYfEkP/Z3DIvX44ncbqtgljq17wRV+K3qxnU4Nnwc4shhtJEFfE5z r97PmOVXdlQQ6IGf6aeJ9j6/9FDIG91EL3Bf8XxCRDgBAosbMYKcey5onNmzJFtUuB+C tMnJf7RgyTFgVD7PCI8tppIGExJ6YF6glRA271RNDd7B0Df7z5Emi65XLe5r5VMYRe52 6twUdy/R9XDf3L61U9RNI4fsYw8frFAvYtQv8+lbko+UlnS+gcI7Yb8CuD3tCFItuj8O oLgg== X-Gm-Message-State: AOAM533dRIpD8Nf/YCwsJYmbY6Uu/GMzj3S02H/Tt9QF2Gn438Qv4WfE UnXroeenyi85i5ya3x/o1AZlPW6XC3A= X-Google-Smtp-Source: ABdhPJzXaladOwixE+vJSP7w5UTqwMP1tNW7nfxmDEpeieNhhorC1gVgMhIdsQfiiWTcxL86s62eiQ== X-Received: by 2002:a05:600c:243:: with SMTP id 3mr4000102wmj.35.1623316682565; Thu, 10 Jun 2021 02:18:02 -0700 (PDT) Received: from abel.fritz.box ([2a02:908:1252:fb60:561f:e43a:edf5:8f95]) by smtp.gmail.com with ESMTPSA id v8sm3087445wrc.29.2021.06.10.02.18.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Jun 2021 02:18:02 -0700 (PDT) From: "=?UTF-8?q?Christian=20K=C3=B6nig?=" X-Google-Original-From: =?UTF-8?q?Christian=20K=C3=B6nig?= To: daniel@ffwll.ch, dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org Subject: Change how amdgpu stores fences in dma_resv objects Date: Thu, 10 Jun 2021 11:17:53 +0200 Message-Id: <20210610091800.1833-1-christian.koenig@amd.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" Since we can't find a consensus on hot to move forward with the dma_resv object I concentrated on changing the approach for amdgpu first. This new approach changes how the driver stores the command submission fence in the dma_resv object in DMA-buf exported BOs. For exported BOs we now store the CS fence in a dma_fence_chain container and assign that one to the exclusive fences slot. During synchronization this dma_fence_chain container is unpacked again and the containing fences handled individually. This has a little bit more overhead than the old approach, but it allows for waiting for the exclusive slot for writes again. Regards, Christian. _______________________________________________ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx