Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp989677imj; Thu, 7 Feb 2019 15:29:34 -0800 (PST) X-Google-Smtp-Source: AHgI3IbQ7OqyAApUOijIrZo9PFBfk9B9mT62i2pK+cXn8vnQpIvdUsBEI9UGPlbF3VOmzCE8nWW0 X-Received: by 2002:a17:902:be11:: with SMTP id r17mr19366437pls.308.1549582174832; Thu, 07 Feb 2019 15:29:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549582174; cv=none; d=google.com; s=arc-20160816; b=MgmW5d18mkEA3Om7dtiUYfLiQx6kI8bj30Nan2usDWvYwxdnQnNszI3NMnZc6KUnkg uj0GAoFuxhaaC3m/bNptGdbrqMcZvrH0ukLdmhFoEVGILyV+lKywHlE76ME3xXwxXVmU gxrzkFasM69R3dPeX0I81ghiJnqSI5UogfxS5qPzfr0PVqJgNRCm6hoCTvuz3q+qZbJm pzof/GYcHKAeDps5Ehl078DcP1tiLn2Q4U4iyOKr/M6wLomCoaF7mx+5b74LLlje23PR NaQvrwgJ0/synq3qPBWLShiI+wtE+cJlIb5Ui0a+klDAuueiC0lXJX6t/G/ffMSKSEpc XaAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+HG60zShCoHZ92dPA33wq6HlorvfHtvDV7Yrof+DOvQ=; b=QNykjhRGk0zHx8kh16c9lwCaxvU5kUbbwMT2sXn1GpIvo/MRa0flJJ1hXmfJUf/nhM DewO4MB0yavakiRA/vo2Q3KevGckRqLYK2YFqgVl4ZcHH/FOx89iTJ0qDfxGyJ3/WAWM jZuE93qmb+L55gn9S0DWGmXgbULgo8PeoxMR0HAODifTmh+CP0lE3EKVqBTJpI3qYXi5 PXuwNLGkET0OskVeN0s6Hio+3gTdn3Jn7PkKz+3fP0oN5xCh1rAhnELAH5w+goMB/Awu 8tw0fYtaTFtIrAPurUYjYQQgWU9vMeC4BEitbAO261kCn02MfQ8wGak1/Gp11gR1vchK Beng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=MpaFc4XH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t18si368443plr.50.2019.02.07.15.29.18; Thu, 07 Feb 2019 15:29:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=MpaFc4XH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727080AbfBGX2W (ORCPT + 99 others); Thu, 7 Feb 2019 18:28:22 -0500 Received: from mail-ed1-f67.google.com ([209.85.208.67]:36010 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726969AbfBGX2K (ORCPT ); Thu, 7 Feb 2019 18:28:10 -0500 Received: by mail-ed1-f67.google.com with SMTP id d12so1339650edy.3 for ; Thu, 07 Feb 2019 15:28:09 -0800 (PST) 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=+HG60zShCoHZ92dPA33wq6HlorvfHtvDV7Yrof+DOvQ=; b=MpaFc4XH9XKIvDbSQ9PpthHVHvRsJcnYhOATGV1soMyGOb2tw/IIqx+x36AP/8gNKr BwszuYke4LPrnL4Ip+6m4MRrCRbwlRs4SDH7MYD1zw3HAlg31y3tndX0xcRjsq62w9Vl tnVXsPJIqNou8LjKvEjWnV2kv0gBpVZx7KLq8= 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=+HG60zShCoHZ92dPA33wq6HlorvfHtvDV7Yrof+DOvQ=; b=ZsdtHqzWmpeOT2aBhXGsEZjLt3nrI5dVCT1wnw4AE1cKS3dErMGbtVSCu41lPVMEUn fQwhn1MsnL7aieJQaZVK4EEedrPh6w8lYC+L7kkK4/7427qat5zgOFpCIPWGRJXzItGK pHo642+gH13v8GCW4FF2r/QcSwbeYAr0lhxYLXG+z2K41F3VPNt6isHDsB2O5V3YOAKX vIkMPzh97vbKLL8HBHhbkGs7fG+cEklA/b+HhZHbIn4HM1twee2V2vY20YEzvVasOllk +d31G5cz7i3rTKdtAncv9hdAa12V39xXodRXUBXAqkill2fimdtqj7CereAHv2e8crox DPkw== X-Gm-Message-State: AHQUAua5rGKBr6SN12niDmF62WkmnIFW86ni/f4td8sCmADYQss7PJdm nIdXvceqcPSuqR4if7baYyG2OA== X-Received: by 2002:a17:906:4344:: with SMTP id z4mr13366580ejm.27.1549582088484; Thu, 07 Feb 2019 15:28:08 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:569e:0:3106:d637:d723:e855]) by smtp.gmail.com with ESMTPSA id p7sm145079ejb.15.2019.02.07.15.28.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 Feb 2019 15:28:07 -0800 (PST) From: Daniel Vetter To: DRI Development Cc: Intel Graphics Development , LKML , Daniel Vetter , Russell King - ARM Linux admin , Daniel Vetter Subject: [PATCH 3/4] drm/doc: document recommended component helper usage Date: Fri, 8 Feb 2019 00:27:58 +0100 Message-Id: <20190207232759.14553-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207232759.14553-1-daniel.vetter@ffwll.ch> References: <20190207232759.14553-1-daniel.vetter@ffwll.ch> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that component has docs it's worth spending a few words and hyperlinks on recommended best practices in drm. Cc: Russell King - ARM Linux admin Signed-off-by: Daniel Vetter --- Documentation/driver-api/component.rst | 2 ++ Documentation/gpu/drm-internals.rst | 5 +++++ drivers/gpu/drm/drm_drv.c | 14 ++++++++++++++ 3 files changed, 21 insertions(+) diff --git a/Documentation/driver-api/component.rst b/Documentation/driver-api/component.rst index 2da4a8f20607..57e37590733f 100644 --- a/Documentation/driver-api/component.rst +++ b/Documentation/driver-api/component.rst @@ -1,3 +1,5 @@ +.. _component: + ====================================== Component Helper for Aggregate Drivers ====================================== diff --git a/Documentation/gpu/drm-internals.rst b/Documentation/gpu/drm-internals.rst index 3ae23a5454ac..966bd2d9f0cc 100644 --- a/Documentation/gpu/drm-internals.rst +++ b/Documentation/gpu/drm-internals.rst @@ -93,6 +93,11 @@ Device Instance and Driver Handling Driver Load ----------- +Component Helper Usage +~~~~~~~~~~~~~~~~~~~~~~ + +.. kernel-doc:: drivers/gpu/drm/drm_drv.c + :doc: component helper usage recommendations IRQ Helper Library ~~~~~~~~~~~~~~~~~~ diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 381581b01d48..aae413003705 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -456,6 +456,20 @@ static void drm_fs_inode_free(struct inode *inode) } } +/** + * DOC: component helper usage recommendations + * + * DRM drivers that drive hardware where a logical device consists of a pile of + * independent hardware blocks are recommended to use the :ref:`component helper + * library`. The entire device initialization procedure should be run + * from the &component_master_ops.master_bind callback, starting with + * drm_dev_init(), then binding all components with component_bind_all() and + * finishing with drm_dev_register(). For consistency and easier sharing of + * components across drivers the opaque pointer passed to all components through + * component_bind_all() should point at &struct drm_device of the device + * instance, not some driver specific private structure. + */ + /** * drm_dev_init - Initialise new DRM device * @dev: DRM device -- 2.20.1