From patchwork Thu Jul 4 14:50:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11031575 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 84FE31510 for ; Thu, 4 Jul 2019 14:51:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 700FA28A51 for ; Thu, 4 Jul 2019 14:51:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63E8528A9B; Thu, 4 Jul 2019 14:51:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A27B3287EF for ; Thu, 4 Jul 2019 14:51:04 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8FE746E35B; Thu, 4 Jul 2019 14:51:02 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id E06856E35B for ; Thu, 4 Jul 2019 14:51:01 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id i11so5678655edq.0 for ; Thu, 04 Jul 2019 07:51:01 -0700 (PDT) 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=y0xwVUQwdEb+LRMLRSyBWho/aMizf/qt1VL7C3LPVNE=; b=fwgg/GNFeipPn3onM7vo7xyvwL9g6jlpWJph8aPVFKbFxMR+qiY28c1EyRbkk/Ouhv RyFRlAdzbADDlgVy0kEGB4uIsF2QAIOKGuLBhuiiCXKF4aUtl7uqaugU0mB/PFmE20wR /y3oNS5qO8Pc15Wjzpbd9FxO6rsI/9Zpa2ehQ+MKajB6zb+5FfI+lqeHHmUWPXZaUYN0 gJptm4U38B65SnzlMly6hWGKylNSQMBmbcKvJoF2I79TiNKZ8biYv+dUt/OlyDNRvujl tlkgME7iqojkHkvEDqKlo/cJyzXKL7HcSbJhFQRUhy5F73ye2r8op3Re2/zcQcAxdpPL F4zQ== X-Gm-Message-State: APjAAAXFqIlso61N7heIMkRaNl9Onr43Lvm14lFSlVG+fE0sfVAbVIH5 HFeQEQAE75OsnLryHqs9bLGYXpOAfKs= X-Google-Smtp-Source: APXvYqxWnmjtJJrs+YPT2OwLdrg5/6+Ag02+ie0ifua6Sp2DMGUM/RROr/wGOYxRzvDI3L4M5pX9/A== X-Received: by 2002:a05:6402:6cb:: with SMTP id n11mr49595971edy.101.1562251860249; Thu, 04 Jul 2019 07:51:00 -0700 (PDT) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id e10sm1123567ejx.89.2019.07.04.07.50.58 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 04 Jul 2019 07:50:59 -0700 (PDT) From: Daniel Vetter To: DRI Development Subject: [PATCH] drm/doc: Document kapi doc expectations Date: Thu, 4 Jul 2019 16:50:54 +0200 Message-Id: <20190704145054.5701-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190625203644.4423-1-daniel.vetter@ffwll.ch> References: <20190625203644.4423-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 X-Mailman-Original-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=y0xwVUQwdEb+LRMLRSyBWho/aMizf/qt1VL7C3LPVNE=; b=cP6510ihpdslu9NGQ3J/Q3Di5SYS0sFDdYezt/pAc8jDe5CPI8v3zu1g0UIQikaT/M MCWbOCfE6wJSDGqSxu3VmH49UWhnHlBY3mypnIrGPYviYZDPhH4FibvmWwuu2PYx3ZXh cX1QjyMgLdgymeH/uxo08snmMX+JpdbaFmrHk= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Sam Ravnborg , Maxime Ripard , Daniel Vetter , David Airlie , Jani Nikula , Laurent Pinchart , Daniel Vetter , Sean Paul , Emil Velikov Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP We've had this already for anything new. With my drm_prime.c cleanup I also think documentation for everything already existing is complete, and we can bake this in as a requirements subsystem wide. v2: Improve wording a bit (Laurent), fix typo in commit message (Sam). Acked-by: Emil Velikov Acked-by: Sean Paul Acked-by: Laurent Pinchart Acked-by: Maxime Ripard Acked-by: Sam Ravnborg Acked-by: Jani Nikula Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Jani Nikula Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Acked-by: Alex Deucher --- Documentation/gpu/introduction.rst | 16 ++++++++++++++++ Documentation/gpu/todo.rst | 13 ------------- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/Documentation/gpu/introduction.rst b/Documentation/gpu/introduction.rst index fccbe375244d..25a56e9c0cfd 100644 --- a/Documentation/gpu/introduction.rst +++ b/Documentation/gpu/introduction.rst @@ -51,6 +51,22 @@ and "FIXME" where the interface could be cleaned up. Also read the :ref:`guidelines for the kernel documentation at large `. +Documentation Requirements for kAPI +----------------------------------- + +All kernel APIs exported to other modules must be documented, including their +datastructures and at least a short introductory section explaining the overall +concepts. Documentation should be put into the code itself as kerneldoc comments +as much as reasonable. + +Do not blindly document everything, but document only what's relevant for driver +authors: Internal functions of drm.ko and definitely static functions should not +have formal kerneldoc comments. Use normal C comments if you feel like a comment +is warranted. You may use kerneldoc syntax in the comment, but it shall not +start with a /** kerneldoc marker. Similar for data structures, annotate +anything entirely private with ``/* private: */`` comments as per the +documentation guide. + Getting Started =============== diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index e717f280f9ae..db88969a56ee 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -301,19 +301,6 @@ In the end no .c file should need to include ``drmP.h`` anymore. Contact: Daniel Vetter -Add missing kerneldoc for exported functions --------------------------------------------- - -The DRM reference documentation is still lacking kerneldoc in a few areas. The -task would be to clean up interfaces like moving functions around between -files to better group them and improving the interfaces like dropping return -values for functions that never fail. Then write kerneldoc for all exported -functions and an overview section and integrate it all into the drm book. - -See https://dri.freedesktop.org/docs/drm/ for what's there already. - -Contact: Daniel Vetter - Make panic handling work ------------------------