Received: by 2002:ac8:156:0:b0:3e0:cd10:60c8 with SMTP id f22csp6338qtg; Thu, 6 Apr 2023 10:21:21 -0700 (PDT) X-Google-Smtp-Source: AKy350YmCMaeb2yGTqzph7L2fwp4SX47/89gA5YYyu/ad30pQIL2XLtJbzG3lEp9ydI68QOUcnvf X-Received: by 2002:a17:903:11c7:b0:19a:727e:d4f3 with SMTP id q7-20020a17090311c700b0019a727ed4f3mr7285942plh.5.1680801681450; Thu, 06 Apr 2023 10:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680801681; cv=none; d=google.com; s=arc-20160816; b=dj23MQcgrT89sHjIh69AjW8I7zAR54uNURpgjmzQMOIPaWsVtTMuz6ZeQfvQp979xy G82IbpMp6elfPLMxqOgbUW6fe3tTeGNrButxqLjmZXKw0grxgEDiIrpGBFHrRxRxrSk1 K/9OIeJPVd9/YBHXXLCtn1Fdtp4qJIwOz9EcRXmaClQLSYVONOZjFspIeccpKXloZdfn ZXvI2TKSo+y12KND9O9lebKO5t6w/25C1NfOZRQMDJNtSQcouVcVfyA+3gVuGD5Bezhq pE7iR4W0hy+O90Rm4SK7WUUfXqsrN73UKn0Pk9VueLlmdKKwdyidoX5YGbvWx3NV85hU CHqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=zs6V4xSX9ZlfsxZNTadcJVx+Wo1UCjoit8XXqPB91Bs=; b=0ou1fu54xGi4a8nvbUx9I+ORoDtuE+rWmA1UGYP+h7vVhufMehV3c8/gg5/fHvKGTi Wbc1tLJ5DQl/wxceSldmcS7fl78VpKZx81YN5TAeFBTOTW+sTZq+5Y+qbK/UcSoGjw27 aNuSHwUPpuQ6ZhM4m+PjdLkB8LrhJT35zTwgPqMnjDsq5paZiG1fZ6Cr7nwZGM6uXkMG UkN/PZeGHzluOG2nCMBFPETi+2QBVrTvk5GY7XryD9Vr/cwi9NkRsKwVlOe+GdgJCbBV ZVlM28t7kun1zyc7bWGF3Wr6gfnfrX2qokjVijCCqIJokV4ttkqorcL2ajhRPy86XKDN cxfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hynWLQyH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l16-20020a170903121000b001a060012dfcsi2300607plh.114.2023.04.06.10.21.09; Thu, 06 Apr 2023 10:21:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hynWLQyH; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240131AbjDFRUr (ORCPT + 99 others); Thu, 6 Apr 2023 13:20:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57900 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240066AbjDFRUB (ORCPT ); Thu, 6 Apr 2023 13:20:01 -0400 Received: from mail-yw1-x1133.google.com (mail-yw1-x1133.google.com [IPv6:2607:f8b0:4864:20::1133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9AD269ECC; Thu, 6 Apr 2023 10:19:34 -0700 (PDT) Received: by mail-yw1-x1133.google.com with SMTP id 00721157ae682-5416698e889so752556017b3.2; Thu, 06 Apr 2023 10:19:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680801573; x=1683393573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=zs6V4xSX9ZlfsxZNTadcJVx+Wo1UCjoit8XXqPB91Bs=; b=hynWLQyHnbgidmV91dL/pTn/bQ6Fvwdl16G4bV7a0cfNjLvqbo7ZJezWtT71601dZj vyA53QTaqOyxJna1YPWAZZEarfelzHGrcBwBimALxU7yhWeWk2u2q2xxUwbzmAYpGGK6 Y7i6BYF3GFekGu174zZNzsSmnCBetspFUWvpNWr/Ek6eEcl2orfm5riHIUZvohNa2NoT THQ115gs41K86a86xhzjbrzfSumTJSSyT9oie6SH1KzNCEs2IgJqB2q9tj4cAvVE7IIp jujKfsP6+1HzIQ6+/CMRmw7bh3ZuHnygqXkvlaIM0YxkRlYY1rMhipDTo33w14rQtZ70 /DYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680801573; x=1683393573; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zs6V4xSX9ZlfsxZNTadcJVx+Wo1UCjoit8XXqPB91Bs=; b=ImHam+Cmz5wL8Wxjg47hGpz6y80IQtpZVETOtkajKg5EQw3VBgC2bVapar/uRrdpRa jEQhhnuixOn6nVQQULiB4yV9MBP7YJc4Uw2GaAW4ZC7eiUHeGN+4R2Fzkm7Dx0LI57AB Cy4/mKK0DqiV1IwVJRaPnAC7rPlllTtm3mNROGZGc1cRK0zN4Nk8oDHDsJYMAkB54TMc FI1QNvDrr//YFgl5Qkx0CO5FtXO44M1yd70mw3NkKQTc5v60KbQRLsNLTPC27T1iMxX3 KLz+shuUgyTRV05Nl4BowKOcx5Pr1XBHd474I+xRwCSMVoyiaufkwxCJwTXCrV6piRg9 RfAA== X-Gm-Message-State: AAQBX9eDKd4BGCiqBcOkM0QwaHJwp2iAsMPeaZtSqW3qJ+Un27k93PfP TizfptgFuKGqpfTXwmdlzCoY/pegwxckbf6abuM= X-Received: by 2002:a81:c642:0:b0:546:63a:6e23 with SMTP id q2-20020a81c642000000b00546063a6e23mr6185709ywj.0.1680801572930; Thu, 06 Apr 2023 10:19:32 -0700 (PDT) MIME-Version: 1.0 References: <20230307-rust-drm-v1-0-917ff5bc80a8@asahilina.net> <20230307-rust-drm-v1-7-917ff5bc80a8@asahilina.net> In-Reply-To: From: Miguel Ojeda Date: Thu, 6 Apr 2023 19:19:21 +0200 Message-ID: Subject: Re: [PATCH RFC 07/18] rust: drm: mm: Add DRM MM Range Allocator abstraction To: Miguel Ojeda , Asahi Lina , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Miguel Ojeda , Alex Gaynor , Wedson Almeida Filho , Boqun Feng , Gary Guo , =?UTF-8?Q?Bj=C3=B6rn_Roy_Baron?= , Sumit Semwal , =?UTF-8?Q?Christian_K=C3=B6nig?= , Luben Tuikov , Jarkko Sakkinen , Dave Hansen , Alyssa Rosenzweig , Karol Herbst , Ella Stanforth , Faith Ekstrand , Mary , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, rust-for-linux@vger.kernel.org, linux-media@vger.kernel.org, linaro-mm-sig@lists.linaro.org, linux-sgx@vger.kernel.org, asahi@lists.linux.dev Cc: Daniel Vetter Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 6, 2023 at 5:45=E2=80=AFPM Daniel Vetter wrot= e: > > Yeah this all looks great and very hyperlinked. > > I think the only nit I have is that for types with two or more type > variables (like the rbtree) what each of them should represent in the top > intro. I can guess it's and not the other way round, but > confirmation takes quite a bit of scrolling to check with the function > types. Yeah, that is fair. Personally I prefer more descriptive names when there are several or they have a special/asymmetric role. > Otherwise I think perfect api docs. Glad you like it! > Just a quick comment on this, that's the same we do on the C side. Most > overview chapters are actually DOC: sections pulled in from the code. > > What I meant here is that for big overview stuff (like for modesetting ho= w > the display pipe structures tie together as an example: > https://dri.freedesktop.org/docs/drm/gpu/drm-kms.html#overview) > it doesn't make sense to duplicate that in rustdoc once more. Yeah, definitely, if it is already somewhere else for C, we shouldn't duplicate it (that is what I meant by the "shared across C and Rust" exception). > Maybe drm is the exception, but if you look at our .rst files we also hav= e > most of our docs in the code: > > https://cgit.freedesktop.org/drm/drm/tree/Documentation/gpu/drm-kms-helpe= rs.rst > > The rst files just provide the scaffolding because C dosn't have > crates/modules hierarchy that would do this for you automatically. Sorry, I was talking in general in the kernel. That `drm-kms-helpers.rst` looks great. From a quick grep, I think you are indeed one of the big users of `DOC: `, which indeed map closely to what you would do in Rust without the scaffolding need. So I think you will like writing docs in Rust :) Cheers, Miguel