From mboxrd@z Thu Jan 1 00:00:00 1970 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=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 BDE7FC433FF for ; Mon, 5 Aug 2019 10:45:40 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 8C83F20679 for ; Mon, 5 Aug 2019 10:45:40 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Gp1jyU5Z"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="nBxG6lfm" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8C83F20679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sOjDtYDtPlTwUWg9RS/r68l7XThyru26f+Os/ARVBus=; b=Gp1jyU5Zgv4m8j hEvrB0ulzv+gcxu8gZOmdI95WMg+rQUqu5gzu6LtWUP5oGspmaFh95D9YXuzo9vr6pmZJ4MBWM4TC GMV2HRwQ3cuUN8pCw2A6UST61itNrdroDHvoZ7w+9EhO5UBMPPQgVSwwbBpyVbO7etsGsLPHzG6Rh w/36AhuY4jBRAiqkfYeaJd04x/eD/YUdHq376g+q9JuIepYgxW68de7YgZjuCmQxrpRKbZALsyEDl wIGjvyxMRhFmNsM2mXFmxT7ztX9kdnCqpm14y5wA2tiV+pxRMH1u3lSunqXrDCWgjzTxwhCyiHTqk ZPXHSoiN1XeUvE90thJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1huaUi-0000nD-1I; Mon, 05 Aug 2019 10:45:36 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1huaUY-0000lP-R1 for linux-arm-kernel@lists.infradead.org; Mon, 05 Aug 2019 10:45:30 +0000 Received: from pendragon.ideasonboard.com (dfj612yhrgyx302h3jwwy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:ce28:277f:58d7:3ca4]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 78CCA2F9; Mon, 5 Aug 2019 12:45:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1565001917; bh=g7Pp29Mgg/gZ2YsNt1ThUlqv1p+7aPpCapxhy4OXn+w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nBxG6lfmjq8e2op+WOyy21pYLWM+0AUNucYtwffECcWzYEZUa11K2zfn7wlxuia2W Lgzn3KjgPSzMabMcxeBYz8juvhZfEQOeWUFfF1Epq83f0jUtL8WyGslw/+3Sy7Pp8/ dZD+0OAwIrFaKPWXpABtCoHloEh9j7+KGiN0ez3Y= Date: Mon, 5 Aug 2019 13:45:15 +0300 From: Laurent Pinchart To: Sam Ravnborg Subject: Re: [PATCH v1 11/16] drm/panel: move drm_panel functions to .c file Message-ID: <20190805104515.GF29747@pendragon.ideasonboard.com> References: <20190804201637.1240-1-sam@ravnborg.org> <20190804201637.1240-12-sam@ravnborg.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190804201637.1240-12-sam@ravnborg.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190805_034527_955014_77051351 X-CRM114-Status: GOOD ( 27.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Neil Armstrong , David Airlie , Linus Walleij , dri-devel@lists.freedesktop.org, Andrzej Hajda , Thierry Reding , Benjamin Gaignard , Fabio Estevam , Marek Vasut , Laurent Pinchart , Joonyoung Shim , Vincent Abriou , Krzysztof Kozlowski , Jonathan Hunter , Maxime Ripard , Kukjin Kim , linux-arm-kernel@lists.infradead.org, Philipp Zabel , NXP Linux Team , Pengutronix Kernel Team , Jonas Karlman , Sascha Hauer , Alison Wang , Maarten Lankhorst , Gwan-gyeong Mun , Inki Dae , Alexios Zavras , linux-samsung-soc@vger.kernel.org, Stefan Agner , linux-tegra@vger.kernel.org, Thomas Gleixner , Sean Paul , Allison Randal , Jernej Skrabec , Shawn Guo , Seung-Woo Kim , Kyungmin Park , Daniel Vetter , Enrico Weigelt Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Sam, Thank you for the patch. On Sun, Aug 04, 2019 at 10:16:32PM +0200, Sam Ravnborg wrote: > Move inline functions from include/drm/drm_panel.h to drm_panel.c. > This is in preparation for follow-up patches that will add extra > logic to the functions. > As they are no longer static inline, EXPORT them. > > Signed-off-by: Sam Ravnborg > Cc: Thierry Reding > Cc: Sam Ravnborg > Cc: Maarten Lankhorst > Cc: Maxime Ripard > Cc: Sean Paul > Cc: David Airlie > Cc: Daniel Vetter > --- > drivers/gpu/drm/drm_panel.c | 96 +++++++++++++++++++++++++++++++++++ > include/drm/drm_panel.h | 99 +++---------------------------------- > 2 files changed, 104 insertions(+), 91 deletions(-) > > diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c > index dbd5b873e8f2..9946b8d9bacc 100644 > --- a/drivers/gpu/drm/drm_panel.c > +++ b/drivers/gpu/drm/drm_panel.c > @@ -54,6 +54,102 @@ void drm_panel_init(struct drm_panel *panel) > } > EXPORT_SYMBOL(drm_panel_init); > > +/** > + * drm_panel_prepare - power on a panel > + * @panel: DRM panel > + * > + * Calling this function will enable power and deassert any reset signals to > + * the panel. After this has completed it is possible to communicate with any > + * integrated circuitry via a command bus. > + * > + * Return: 0 on success or a negative error code on failure. > + */ > +int drm_panel_prepare(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->prepare) > + return panel->funcs->prepare(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > +EXPORT_SYMBOL(drm_panel_prepare); > + > +/** > + * drm_panel_enable - enable a panel > + * @panel: DRM panel > + * > + * Calling this function will cause the panel display drivers to be turned on > + * and the backlight to be enabled. Content will be visible on screen after > + * this call completes. > + * > + * Return: 0 on success or a negative error code on failure. > + */ > +int drm_panel_enable(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->enable) > + return panel->funcs->enable(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > +EXPORT_SYMBOL(drm_panel_enable); > + > +/** > + * drm_panel_disable - disable a panel > + * @panel: DRM panel > + * > + * This will typically turn off the panel's backlight or disable the display > + * drivers. For smart panels it should still be possible to communicate with > + * the integrated circuitry via any command bus after this call. > + * > + * Return: 0 on success or a negative error code on failure. > + */ > +int drm_panel_disable(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->disable) > + return panel->funcs->disable(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > +EXPORT_SYMBOL(drm_panel_disable); > + > +/** > + * drm_panel_unprepare - power off a panel > + * @panel: DRM panel > + * > + * Calling this function will completely power off a panel (assert the panel's > + * reset, turn off power supplies, ...). After this function has completed, it > + * is usually no longer possible to communicate with the panel until another > + * call to drm_panel_prepare(). > + * > + * Return: 0 on success or a negative error code on failure. > + */ > +int drm_panel_unprepare(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->unprepare) > + return panel->funcs->unprepare(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > +EXPORT_SYMBOL(drm_panel_unprepare); > + > +/** > + * drm_panel_get_modes - probe the available display modes of a panel > + * @panel: DRM panel > + * > + * The modes probed from the panel are automatically added to the connector > + * that the panel is attached to. > + * > + * Return: The number of modes available from the panel on success or a > + * negative error code on failure. > + */ > +int drm_panel_get_modes(struct drm_panel *panel) > +{ > + if (panel && panel->funcs && panel->funcs->get_modes) > + return panel->funcs->get_modes(panel); > + > + return panel ? -ENOSYS : -EINVAL; > +} > +EXPORT_SYMBOL(drm_panel_get_modes); > + > /** > * drm_panel_add - add a panel to the global registry > * @panel: panel to add > diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h > index 26377836141c..053d611656b9 100644 > --- a/include/drm/drm_panel.h > +++ b/include/drm/drm_panel.h > @@ -97,97 +97,6 @@ struct drm_panel { > struct list_head list; > }; > > -/** > - * drm_disable_unprepare - power off a panel > - * @panel: DRM panel > - * > - * Calling this function will completely power off a panel (assert the panel's > - * reset, turn off power supplies, ...). After this function has completed, it > - * is usually no longer possible to communicate with the panel until another > - * call to drm_panel_prepare(). > - * > - * Return: 0 on success or a negative error code on failure. > - */ > -static inline int drm_panel_unprepare(struct drm_panel *panel) > -{ > - if (panel && panel->funcs && panel->funcs->unprepare) > - return panel->funcs->unprepare(panel); > - > - return panel ? -ENOSYS : -EINVAL; > -} > - > -/** > - * drm_panel_disable - disable a panel > - * @panel: DRM panel > - * > - * This will typically turn off the panel's backlight or disable the display > - * drivers. For smart panels it should still be possible to communicate with > - * the integrated circuitry via any command bus after this call. > - * > - * Return: 0 on success or a negative error code on failure. > - */ > -static inline int drm_panel_disable(struct drm_panel *panel) > -{ > - if (panel && panel->funcs && panel->funcs->disable) > - return panel->funcs->disable(panel); > - > - return panel ? -ENOSYS : -EINVAL; > -} > - > -/** > - * drm_panel_prepare - power on a panel > - * @panel: DRM panel > - * > - * Calling this function will enable power and deassert any reset signals to > - * the panel. After this has completed it is possible to communicate with any > - * integrated circuitry via a command bus. > - * > - * Return: 0 on success or a negative error code on failure. > - */ > -static inline int drm_panel_prepare(struct drm_panel *panel) > -{ > - if (panel && panel->funcs && panel->funcs->prepare) > - return panel->funcs->prepare(panel); > - > - return panel ? -ENOSYS : -EINVAL; > -} > - > -/** > - * drm_panel_enable - enable a panel > - * @panel: DRM panel > - * > - * Calling this function will cause the panel display drivers to be turned on > - * and the backlight to be enabled. Content will be visible on screen after > - * this call completes. > - * > - * Return: 0 on success or a negative error code on failure. > - */ > -static inline int drm_panel_enable(struct drm_panel *panel) > -{ > - if (panel && panel->funcs && panel->funcs->enable) > - return panel->funcs->enable(panel); > - > - return panel ? -ENOSYS : -EINVAL; > -} > - > -/** > - * drm_panel_get_modes - probe the available display modes of a panel > - * @panel: DRM panel > - * > - * The modes probed from the panel are automatically added to the connector > - * that the panel is attached to. > - * > - * Return: The number of modes available from the panel on success or a > - * negative error code on failure. > - */ > -static inline int drm_panel_get_modes(struct drm_panel *panel) > -{ > - if (panel && panel->funcs && panel->funcs->get_modes) > - return panel->funcs->get_modes(panel); > - > - return panel ? -ENOSYS : -EINVAL; > -} > - > void drm_panel_init(struct drm_panel *panel); > > int drm_panel_add(struct drm_panel *panel); > @@ -196,6 +105,14 @@ void drm_panel_remove(struct drm_panel *panel); > int drm_panel_attach(struct drm_panel *panel, struct drm_connector *connector); > int drm_panel_detach(struct drm_panel *panel); > > +int drm_panel_prepare(struct drm_panel *panel); > +int drm_panel_unprepare(struct drm_panel *panel); > + > +int drm_panel_enable(struct drm_panel *panel); > +int drm_panel_disable(struct drm_panel *panel); Nitpicking, I would keep the order of the declarations aligned with the definitions. prepare - enable - disable - unprepare and prepare - unprepare - enable - disable are both fine with me, as long as they're consistent. Apart from that, Reviewed-by: Laurent Pinchart > + > +int drm_panel_get_modes(struct drm_panel *panel); > + > #if defined(CONFIG_OF) && defined(CONFIG_DRM_PANEL) > struct drm_panel *of_drm_find_panel(const struct device_node *np); > #else -- Regards, Laurent Pinchart _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel