All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Sean Paul <seanpaul@chromium.org>
Cc: dri-devel@lists.freedesktop.org, thierry.reding@gmail.com,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH v3 02/12] drm/panel: Move [un]prepare and [dis|en]able functions
Date: Wed, 18 Oct 2017 10:16:54 +0200	[thread overview]
Message-ID: <20171018081654.2yjtzipwhfxdv7yb@phenom.ffwll.local> (raw)
In-Reply-To: <20171017211321.7992-3-seanpaul@chromium.org>

On Tue, Oct 17, 2017 at 05:13:05PM -0400, Sean Paul wrote:
> In preparation for state tracking in drm_panel, move the panel functions
> into drm_panel.c so we beef them up in later patches.
> 
> Signed-off-by: Sean Paul <seanpaul@chromium.org>

I'll take the easy ones, on patches 1&2:

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
> New in v3
> 
>  drivers/gpu/drm/drm_panel.c | 77 ++++++++++++++++++++++++++++++++++++++++++++
>  include/drm/drm_panel.h     | 78 +++------------------------------------------
>  2 files changed, 82 insertions(+), 73 deletions(-)
> 
> diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c
> index 308d442a531b..6f28598a5d0e 100644
> --- a/drivers/gpu/drm/drm_panel.c
> +++ b/drivers/gpu/drm/drm_panel.c
> @@ -126,6 +126,83 @@ int drm_panel_detach(struct drm_panel *panel)
>  }
>  EXPORT_SYMBOL(drm_panel_detach);
>  
> +/**
> + * 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_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_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);
> +
>  #ifdef CONFIG_OF
>  /**
>   * of_drm_find_panel - look up a panel using a device tree node
> diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h
> index ab59d71a24c3..0a9442069d3c 100644
> --- a/include/drm/drm_panel.h
> +++ b/include/drm/drm_panel.h
> @@ -95,79 +95,6 @@ struct drm_panel {
>  	struct list_head list;
>  };
>  
> -/**
> - * 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.
> - */
> -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
> @@ -194,6 +121,11 @@ 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_unprepare(struct drm_panel *panel);
> +int drm_panel_disable(struct drm_panel *panel);
> +int drm_panel_prepare(struct drm_panel *panel);
> +int drm_panel_enable(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
> -- 
> 2.15.0.rc1.287.g2b38de12cc-goog
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2017-10-18  8:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-17 21:13 [PATCH v3 00/12] drm/panel: Remove unnecessary enabled/prepared state Sean Paul
2017-10-17 21:13 ` [PATCH v3 01/12] drm/panel: Fix typo in drm_panel_unprepare docs Sean Paul
2017-10-17 21:13 ` [PATCH v3 02/12] drm/panel: Move [un]prepare and [dis|en]able functions Sean Paul
2017-10-18  8:16   ` Daniel Vetter [this message]
2017-10-17 21:13 ` [PATCH v3 03/12] drm/panel: Keep track of enabled/prepared Sean Paul
2017-10-18  7:54   ` Andrzej Hajda
2017-10-17 21:13 ` [PATCH v3 04/12] drm/panel: vvx10f034n00: Remove enabled/prepared state Sean Paul
2017-10-17 21:13 ` [PATCH v3 05/12] drm/panel: lt070me05000: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 06/12] drm/panel: lq101r1sx01: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 07/12] drm/panel: otm8009a: Remove enabled state Sean Paul
2017-10-17 21:13 ` [PATCH v3 08/12] drm/panel: otm8009a: Properly sequence [un]prepare with backlight Sean Paul
2017-10-17 21:13 ` [PATCH v3 09/12] drm/panel: 43wvf1g: Remove enabled/prepared state Sean Paul
2017-10-17 21:13 ` [PATCH v3 10/12] drm/panel: simple: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 11/12] drm/panel: p079zca: " Sean Paul
2017-10-17 21:13 ` [PATCH v3 12/12] drm/panel: ls043t1le01: " Sean Paul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171018081654.2yjtzipwhfxdv7yb@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=seanpaul@chromium.org \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.