From patchwork Wed Jul 21 20:13:36 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jason Ekstrand X-Patchwork-Id: 12392073 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,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 4D556C6377A for ; Wed, 21 Jul 2021 20:13:51 +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 110EA60BD3 for ; Wed, 21 Jul 2021 20:13:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 110EA60BD3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=jlekstrand.net 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 9B9A76E169; Wed, 21 Jul 2021 20:13:50 +0000 (UTC) Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by gabe.freedesktop.org (Postfix) with ESMTPS id 22DE06E169 for ; Wed, 21 Jul 2021 20:13:50 +0000 (UTC) Received: by mail-pl1-x62e.google.com with SMTP id n11so1686360plc.2 for ; Wed, 21 Jul 2021 13:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jlekstrand-net.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=gcfgktxwhi2gPaW3PDmABicLcLcpYa8hHzB10quc6oc=; b=tKy5/iXouGwrFGF90VcOOgKMisKvE7XWsDlwiGkyXDWO/mIvMMaMgSJukSrkgg3OPK rl9z4i+etzaiJHr0h95df6ozB5gHfMHsscfHJLK42DKxgDHdBLnF8YvywAKxE61FhJS+ e+mgzP2f39DfBfndorbwB2IG0OsfGjwfKM4gUdXs7yY1fJLOnKsKWiKE4giZIA0UCWda jh7Ji3XQjOiuxgSjJ99LNh33WpbfEJHlkMA3ExTqFDlT06zUDBMf4WYDV6MCDFbTjtPF 2zz1LDnltn7Jt+FAVNzpz7smz6nGnYjl0HKecrZs/0VBiSdm6IllJldb1lGyzSo5r2Jw Ueuw== 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=gcfgktxwhi2gPaW3PDmABicLcLcpYa8hHzB10quc6oc=; b=DK4SXPMOHhDrzq3Z7mhf1z3lisWiSnv8wwq7/isXTZIOuYhkAdvo0rMnK10/H4ILl2 aT5Lw3raPUZgk0KKnB9KjYAYLsGSbKB8Mq3Uff130efz/Uccu+TK1XRdJBC/Jy9cCTo9 LH7UmjAClcHJTFBUSrG2igpZ7gs81jliyjfYe4dwaAUi4vH8dObnmHsFzVUwo/NbMAc9 q6OqOwMhxBW72MIY+Dk8mFKiJ03wnaS8ZjU++PCbjs9bXM2WxC23U5Nxns1OBu5oAvgd wOgpmqPZhkUFQvqL0ruepMq3q1+Q9bGRmqAY2xalxEkz+fOLtWGv0sUORddQcVk34Kfl Kssg== X-Gm-Message-State: AOAM533sKST9fi48KlpS+oA0kylv5ULkfVyuc0Rgc1r/IrwPNqy1rYm7 hy8Xwtr5Pcn2RORSkbFHDZzSTGAYsER5sQ== X-Google-Smtp-Source: ABdhPJxp4btwqWXuywGw24iuxSRhjzPVOmBDW5KpL5aBWZsLAQoJUoAcRXhRop1OxGMQOVl3Pfunsw== X-Received: by 2002:a63:f712:: with SMTP id x18mr37678449pgh.389.1626898429337; Wed, 21 Jul 2021 13:13:49 -0700 (PDT) Received: from omlet.com ([134.134.137.82]) by smtp.gmail.com with ESMTPSA id h24sm28777439pfn.180.2021.07.21.13.13.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jul 2021 13:13:48 -0700 (PDT) From: Jason Ekstrand To: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Date: Wed, 21 Jul 2021 15:13:36 -0500 Message-Id: <20210721201343.2962674-1-jason@jlekstrand.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 0/7] drm/i915: Migrate memory to SMEM when imported cross-device (v8) 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This patch series fixes an issue with discrete graphics on Intel where we allowed dma-buf import while leaving the object in local memory. This breaks down pretty badly if the import happened on a different physical device. v7: - Drop "drm/i915/gem/ttm: Place new BOs in the requested region" - Add a new "drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create()" - Misc. review feedback from Matthew Auld v8: - Misc. review feedback from Matthew Auld Jason Ekstrand (5): drm/i915/gem: Check object_can_migrate from object_migrate drm/i915/gem: Refactor placement setup for i915_gem_object_create* (v2) drm/i915/gem: Call i915_gem_flush_free_objects() in i915_gem_dumb_create() drm/i915/gem: Unify user object creation (v3) drm/i915/gem/ttm: Respect the objection region in placement_from_obj Thomas Hellström (2): drm/i915/gem: Correct the locking and pin pattern for dma-buf (v8) drm/i915/gem: Migrate to system at dma-buf attach time (v7) drivers/gpu/drm/i915/gem/i915_gem_create.c | 177 ++++++++-------- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 58 ++++-- drivers/gpu/drm/i915/gem/i915_gem_object.c | 13 +- drivers/gpu/drm/i915/gem/i915_gem_object.h | 4 + drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 +- .../drm/i915/gem/selftests/i915_gem_dmabuf.c | 190 +++++++++++++++++- .../drm/i915/gem/selftests/i915_gem_migrate.c | 15 -- 7 files changed, 330 insertions(+), 130 deletions(-)