From patchwork Sun Aug 4 20:16:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 11074913 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 40AF61395 for ; Sun, 4 Aug 2019 20:17:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 31D00287A0 for ; Sun, 4 Aug 2019 20:17:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 256C028803; Sun, 4 Aug 2019 20:17:40 +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 B0A2F287A0 for ; Sun, 4 Aug 2019 20:17:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C4E5089EA3; Sun, 4 Aug 2019 20:17:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id DF9E889EA3 for ; Sun, 4 Aug 2019 20:17:36 +0000 (UTC) Received: by mail-lj1-x244.google.com with SMTP id z28so23210839ljn.4 for ; Sun, 04 Aug 2019 13:17:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=TFw8aj8TVKqYV1qdWp7H7PSv0EjnAL5XrV9yT7wyYzI=; b=awyh6ttas3jrP0WOdYbrbDdIPsbWAWahaKFs3FKmQFybiMpwDahLiraN5a/W0Fzq/s OEkKvDj9X3JVffs+uwY7ivrWamfV49S68C02ZpluhlkcHzvprsIgOGki2aqhYhbsdEZv s/7B6D5Vnf5qLS6A11lIMJG9DxVsWbyIuK6OitRwJ0MhHy5UzpqwUsyCMVHAZsEvJFq7 Eg1uXvW11Rd6ToFPHdgAQCBbEqiaJJmEsdMpp0bXCm5/VZ3CWnZHAfVVsm9Z4bzW+Gyr PNu5HqFxx5cxn4dcZm4xmggXZZej3lG3DlwEwrPIkyAvJUxuIGzjej3sbdul8PrOjY56 vMjw== X-Gm-Message-State: APjAAAUBAPK7ZP8im7ONZtxVHLVeW7lzNe5WLH7BbKvEoWbBOdIwYi7k qg2tTroIU4K3cfzgTqOHnREuvMdFT8NzZg== X-Google-Smtp-Source: APXvYqyoAufw1JJb+gisc/+GrH+nZNn6Oe74hLjpr94kfXr5VFnqYqHplX0Q3NQsQ1CxOz1UwLnarA== X-Received: by 2002:a2e:b0ea:: with SMTP id h10mr31006790ljl.50.1564949855034; Sun, 04 Aug 2019 13:17:35 -0700 (PDT) Received: from saturn.lan (18.158-248-194.customer.lyse.net. [158.248.194.18]) by smtp.gmail.com with ESMTPSA id p87sm16540794ljp.50.2019.08.04.13.17.32 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 04 Aug 2019 13:17:34 -0700 (PDT) From: Sam Ravnborg To: dri-devel@lists.freedesktop.org, Thierry Reding Subject: [PATCH v1 12/16] drm/panel: use inline comments in drm_panel.h Date: Sun, 4 Aug 2019 22:16:33 +0200 Message-Id: <20190804201637.1240-13-sam@ravnborg.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190804201637.1240-1-sam@ravnborg.org> References: <20190804201637.1240-1-sam@ravnborg.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=TFw8aj8TVKqYV1qdWp7H7PSv0EjnAL5XrV9yT7wyYzI=; b=rwd7igj5BUr8/KxH5fDWHXDr9Bb3jwowv9EXwDKoBAF6i6RKSOD2641bxv40d1HHKN 90PRk5+MErpunsqUa+ibcmpfyC1UfMifTvwajUbZ8ZqHuCMYFJKBBAjwFBo2W68OzUai G53Jvo1D5DDJzo+gKXvmakpxb/DH5/PhMw8aEahnixPu/po32d3aI+NDSSadM47kTbM/ lqjP4OcW0y9Bk1NfPNwspN6J3RHQ7WY7F72jJQW2++3tGl6ZnUz3D5o0HtacBnaewCu6 3kXeiK7YR5BoUUssAQyLfTo21VXL0dOrPgDks3dsZ86AAQ5AoD6rN4Cu2hcIz7NKG/Ie NLxA== 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: Neil Armstrong , David Airlie , Laurent Pinchart , Marek Vasut , Laurent Pinchart , Sam Ravnborg , Krzysztof Kozlowski , Jonathan Hunter , Maxime Ripard , Kukjin Kim , Allison Randal , NXP Linux Team , Pengutronix Kernel Team , Jonas Karlman , Alison Wang , Gwan-gyeong Mun , Alexios Zavras , linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, Thomas Gleixner , Sean Paul , linux-arm-kernel@lists.infradead.org, Jernej Skrabec , Shawn Guo , Seung-Woo Kim , Vincent Abriou , Kyungmin Park , Enrico Weigelt Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Inline comments provide better space for additional comments. Comments was slightly edited to follow the normal style, but no change to actual content. Used the opportuniy to change the order in drm_panel_funcs to follow the order they will be used by a panel. Signed-off-by: Sam Ravnborg Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Sean Paul Cc: Thierry Reding Cc: Sam Ravnborg Cc: David Airlie Cc: Daniel Vetter Reviewed-by: Laurent Pinchart --- include/drm/drm_panel.h | 82 +++++++++++++++++++++++++++++++++-------- 1 file changed, 66 insertions(+), 16 deletions(-) diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index 053d611656b9..5e62deea49ba 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -36,14 +36,6 @@ struct display_timing; /** * struct drm_panel_funcs - perform operations on a given panel - * @disable: disable panel (turn off back light, etc.) - * @unprepare: turn off panel - * @prepare: turn on panel and perform set up - * @enable: enable panel (turn on back light, etc.) - * @get_modes: add modes to the connector that the panel is attached to and - * return the number of modes added - * @get_timings: copy display timings into the provided array and return - * the number of display timings available * * The .prepare() function is typically called before the display controller * starts to transmit video data. Panel drivers can use this to turn the panel @@ -69,31 +61,89 @@ struct display_timing; * the panel. This is the job of the .unprepare() function. */ struct drm_panel_funcs { - int (*disable)(struct drm_panel *panel); - int (*unprepare)(struct drm_panel *panel); + /** + * @prepare: + * + * Turn on panel and perform set up. + */ int (*prepare)(struct drm_panel *panel); + + /** + * @enable: + * + * Enable panel (turn on back light, etc.). + */ int (*enable)(struct drm_panel *panel); + + /** + * @disable: + * + * Disable panel (turn off back light, etc.). + */ + int (*disable)(struct drm_panel *panel); + + /** + * @unprepare: + * + * Turn off panel. + */ + int (*unprepare)(struct drm_panel *panel); + + /** + * @get_modes: + * + * Add modes to the connector that the panel is attached to and + * return the number of modes added. + */ int (*get_modes)(struct drm_panel *panel); + + /** + * @get_timings: + * + * Copy display timings into the provided array and return + * the number of display timings available. + */ int (*get_timings)(struct drm_panel *panel, unsigned int num_timings, struct display_timing *timings); }; /** * struct drm_panel - DRM panel object - * @drm: DRM device owning the panel - * @connector: DRM connector that the panel is attached to - * @dev: parent device of the panel - * @link: link from panel device (supplier) to DRM device (consumer) - * @funcs: operations that can be performed on the panel - * @list: panel entry in registry */ struct drm_panel { + /** + * @drm: + * + * DRM device owning the panel. + */ struct drm_device *drm; + + /** + * @connector: + * + * DRM connector that the panel is attached to. + */ struct drm_connector *connector; + + /** + * @dev: + * + * Parent device of the panel. + */ struct device *dev; + /** + * @funcs: + * + * Operations that can be performed on the panel. + */ const struct drm_panel_funcs *funcs; + /** + * @list: + * + * Panel entry in registry. + */ struct list_head list; };