From patchwork Tue Mar 23 08:44:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12157215 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=-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,USER_AGENT_GIT autolearn=unavailable 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 95CDCC433E0 for ; Tue, 23 Mar 2021 08:45:04 +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 AC2B6619AB for ; Tue, 23 Mar 2021 08:45:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AC2B6619AB 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 CE1CD6E0CE; Tue, 23 Mar 2021 08:45:01 +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 5CB936E0C8 for ; Tue, 23 Mar 2021 08:45:00 +0000 (UTC) Received: by mail-wm1-x334.google.com with SMTP id b2-20020a7bc2420000b029010be1081172so10337927wmj.1 for ; Tue, 23 Mar 2021 01:45:00 -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=7ctMAs2ck6qhQkBco0XwNML8tiYEOiG6Y+b8Y6p/AsQ=; b=k0G0WK9sV8PLOfVaSjiR0KLC4w9QmPmfQ3RJzQ2g06W4sdwvTypK/1z4zA7S2u0AoV gdcqFGbhtUl2HlbxOinofPHYfvT7CyqAlaYJx+7ZfURF67a9wvVwMruu2Acxo/0KEqlS g4zfVCe4Hy4hIaQ6ZTs/qUKfuxbWdP1dDCbFc= 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=7ctMAs2ck6qhQkBco0XwNML8tiYEOiG6Y+b8Y6p/AsQ=; b=LdCWTWlzUKs98n4PMsENxL8H8HvmwNeXbxiH/DcohY/1yYC99FiJWVT+UXT1gwzLWw GZPatU8BipHwnHOFC96cth4M0Vmjp/EtehDWzI+lP2RBt6c1K+5vBpW5Zbjq7GtdEthY Z6zKwugsQEkEXC81clZ179J4D2AVaHGGSvxYF0SEkZLifPP2iSOMWEGuk7PO/2MvsX8Z 0WpEwDVsDesqqFNKgxx3nRqXHPI8694zdmx+dSEP8e5yvf8AIhHzZefdh/BHJXbcejGX 9eiVz7nBDvQ70amH2444g0ln+e04GDY6vT8FT5Z5T6s/7sLWPA+IBWvGTNiaWUXpBRPG ouKw== X-Gm-Message-State: AOAM530a4wTHQFxEp7ulysE2tmOFouxjrGR4aK0dUixEShLbFwy4PiCH GzNzZldIwWWD5L/CdcFOyZUoNw== X-Google-Smtp-Source: ABdhPJwQshgo2y6o1jYvCLDYmYmjLnx3OE40p+nYnx2V6Uu+7yXfI8YgW1III2M9Z2QzEPMN2R6+0g== X-Received: by 2002:a7b:c92d:: with SMTP id h13mr2244841wml.147.1616489099002; Tue, 23 Mar 2021 01:44:59 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id g202sm1772835wme.20.2021.03.23.01.44.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 01:44:58 -0700 (PDT) From: Daniel Vetter To: DRI Development , Intel Graphics Development Date: Tue, 23 Mar 2021 09:44:52 +0100 Message-Id: <20210323084453.366863-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 1/2] drm/i915: add gem/gt TODO 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 , Daniel Vetter , Dave Airlie Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" We've discussed a bit how to get the gem/gt team better integrated and collaborate more with the wider community and agreed to the following: - all gem/gt patches are reviewed on dri-devel for now. That's overkill, but in the past there was definitely too little of that. - i915-gem folks are encouraged to cross review core patches from other teams - big features (especially uapi changes) need to be discussed in an rfc patch that documents the interface and big picture design, before we get lost in the details of the code - Also a rough TODO (can be refined as we go ofc) to get gem/gt back on track, like we've e.g. done with DAL/DC to get that in shape. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Jason Ekstrand Cc: Dave Airlie Signed-off-by: Daniel Vetter Acked-by: Rodrigo Vivi --- drivers/gpu/drm/i915/TODO.txt | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 drivers/gpu/drm/i915/TODO.txt diff --git a/drivers/gpu/drm/i915/TODO.txt b/drivers/gpu/drm/i915/TODO.txt new file mode 100644 index 000000000000..d2e5bbb6339d --- /dev/null +++ b/drivers/gpu/drm/i915/TODO.txt @@ -0,0 +1,36 @@ +gem/gt TODO items +----------------- + +- For discrete memory manager, merge enough dg1 to be able to refactor it to + TTM. Then land pci ids (just in case that turns up an uapi problem). TTM has + improved a lot the past 2 years, there's no reason anymore not to use it. + +- Come up with a plan what to do with drm/scheduler and how to get there. + +- There's a lot of complexity added past few years to make relocations faster. + That doesn't make sense given hw and gpu apis moved away from this model years + ago: + 1. Land a modern pre-bound uapi like VM_BIND + 2. Any complexity added in this area past few years which can't be justified + with VM_BIND using userspace should be removed. Looking at amdgpu dma_resv on + the bo and vm, plus some lru locks is all that needed. No complex rcu, + refcounts, caching, ... on everything. + This is the matching task on the vm side compared to ttm/dma_resv on the + backing storage side. + +- i915_sw_fence seems to be the main structure for the i915-gem dma_fence model. + How-to-dma_fence is core and drivers really shouldn't build their own world + here, treating everything else as a fixed platform. i915_sw_fence concepts + should be moved to dma_fence, drm/scheduler or atomic commit helpers. Or + removed if dri-devel consensus is that it's not a good idea. Once that's done + maybe even remove it if there's nothing left. + +Smaller things: +- i915_utils.h needs to be moved to the right places. + +- dma_fence_work should be in drivers/dma-buf + +- i915_mm.c should be moved to the right places. Some of the helpers also look a + bit fishy: + + https://lore.kernel.org/linux-mm/20210301083320.943079-1-hch@lst.de/ From patchwork Tue Mar 23 08:44:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 12157217 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=-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,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 4EC45C433E1 for ; Tue, 23 Mar 2021 08:45:06 +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 C2FD9619AB for ; Tue, 23 Mar 2021 08:45:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C2FD9619AB 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 065C26E84D; Tue, 23 Mar 2021 08:45:05 +0000 (UTC) Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by gabe.freedesktop.org (Postfix) with ESMTPS id 64E966E84D for ; Tue, 23 Mar 2021 08:45:03 +0000 (UTC) Received: by mail-wr1-x431.google.com with SMTP id j18so19861532wra.2 for ; Tue, 23 Mar 2021 01:45:03 -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=EVmj/JgXHiOknipjFzQEKiQ+vNpvGhie2Jf7GtdWuRA=; b=RHmqlDskazU4hnG1lgqVnlGvOcZOMpDn/IKsdvG6La5G1DZXFzNVKfzyYy1rOq7wxg +tUYom2c/yVs3rHXoT/1jDGPI680NetGWbkcpgC7cYy2UBZa76jAjQhHtSYPaW5G1UsS +l6QIecnq12Irl/uvoVRFvJuOs2Ug/UTk6R28= 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=EVmj/JgXHiOknipjFzQEKiQ+vNpvGhie2Jf7GtdWuRA=; b=oImCZWbDZDtmBSFrLCgFO8LJzhjdwF6R0I1WJcfvn89YUlLWOxUL2yTPDP6jsjs2++ AfsO89kECMNnZtzV1QKSjqxHSW0MjSucB0RiImDWcGPyk34FMumhN2EVuis0xZZRlkB5 uWUGRWngERbyr76/RN33rZhaRwjyPDfxaqmjhrClaHGww8/4ygDNwzQRhj/NQUeqJvyO x/wSztMhNd8vfv9uLDaOS8KqZ5PzRznYu08iupPZ8HB7MQiRXGHsMFLwpJOn5vrWrFnT EacFxdw8fbYxYD8dJ+ZbIUfprvsBMw+2o5LBxy5VjULZqFKUNSU+TE6NaND2idCw7Om1 cIFA== X-Gm-Message-State: AOAM5301MUJ2m2EiQ0KQ2CGDcjnNYiVYfyuCMTCNmm2GrGYCsAZOuDXI ksXYnBn73GD0anQ+LXk8NsAzKA== X-Google-Smtp-Source: ABdhPJzaRTtncl3Um+eFvF0cNs1yuH1tPrvlYSdvrYKJptlvFpjSEOk9fZQm+CwM8xOIJ4BqcJmJAg== X-Received: by 2002:a5d:4b06:: with SMTP id v6mr2827113wrq.41.1616489101966; Tue, 23 Mar 2021 01:45:01 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id g202sm1772835wme.20.2021.03.23.01.44.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Mar 2021 01:44:59 -0700 (PDT) From: Daniel Vetter To: DRI Development , Intel Graphics Development Date: Tue, 23 Mar 2021 09:44:53 +0100 Message-Id: <20210323084453.366863-2-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.31.0 In-Reply-To: <20210323084453.366863-1-daniel.vetter@ffwll.ch> References: <20210323084453.366863-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH 2/2] drm/doc: Add RFC section 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 , Daniel Vetter , Dave Airlie Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Motivated by the pre-review process for i915 gem/gt features, but probably useful in general for complex stuff. Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Jason Ekstrand Cc: Dave Airlie Signed-off-by: Daniel Vetter Acked-by: Rodrigo Vivi Acked-by: Dave Airlie --- Documentation/gpu/index.rst | 1 + Documentation/gpu/rfc.rst | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 Documentation/gpu/rfc.rst diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst index c9a51e3bfb5a..df58cb826d68 100644 --- a/Documentation/gpu/index.rst +++ b/Documentation/gpu/index.rst @@ -16,6 +16,7 @@ Linux GPU Driver Developer's Guide vga-switcheroo vgaarbiter todo + rfc .. only:: subproject and html diff --git a/Documentation/gpu/rfc.rst b/Documentation/gpu/rfc.rst new file mode 100644 index 000000000000..9d0ff2921af8 --- /dev/null +++ b/Documentation/gpu/rfc.rst @@ -0,0 +1,16 @@ +=============== +GPU RFC Section +=============== + +For complex work, especially new uapi, it is often good to nail the high level +design issues before getting lost in the code details. This section is meant to +host such documentation: + +* Each RFC should be a section in this file, explaining the goal and main design + considerations. + +* For uapi structures add a file to this directory with and then pull the + kerneldoc in like with real uapi headers. + +* Once the code has landed move all the documentation to the right places in + the main core, helper or driver sections.