All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	thomas.petazzoni@free-electrons.com,
	linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 1/9] drm/fb-cma-helper: Add drm_fbdev_cma_set_suspend_unlocked()
Date: Mon, 23 Jan 2017 10:07:13 +0100	[thread overview]
Message-ID: <20170123090713.s3dctg7iofcjfdql@phenom.ffwll.local> (raw)
In-Reply-To: <20170122181117.8210-2-noralf@tronnes.org>

On Sun, Jan 22, 2017 at 07:11:09PM +0100, Noralf Trønnes wrote:
> Add a CMA version of drm_fb_helper_set_suspend_unlocked().
> 
> Cc: laurent.pinchart@ideasonboard.com
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
>  drivers/gpu/drm/drm_fb_cma_helper.c | 18 ++++++++++++++++++
>  include/drm/drm_fb_cma_helper.h     |  2 ++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
> index 4364abf..0ef8b28 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -622,3 +622,21 @@ void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state)
>  		drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
>  }
>  EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);

Random idea for a cleanup series: Getting rid of
drm_fb_helper_set_suspend. I thinkf for almost all drivers we can use the
unlocked one, which has the upside that it doesn't stall the resume path
on the contended console_lock.

Anyway, applied this one here, thanks.
-Daniel

> +
> +/**
> + * drm_fbdev_cma_set_suspend_unlocked - wrapper around
> + *                                      drm_fb_helper_set_suspend_unlocked
> + * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
> + * @state: desired state, zero to resume, non-zero to suspend
> + *
> + * Calls drm_fb_helper_set_suspend, which is a wrapper around
> + * fb_set_suspend implemented by fbdev core.
> + */
> +void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
> +					int state)
> +{
> +	if (fbdev_cma)
> +		drm_fb_helper_set_suspend_unlocked(&fbdev_cma->fb_helper,
> +						   state);
> +}
> +EXPORT_SYMBOL(drm_fbdev_cma_set_suspend_unlocked);
> diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h
> index 9f4e34e..8dd6e55 100644
> --- a/include/drm/drm_fb_cma_helper.h
> +++ b/include/drm/drm_fb_cma_helper.h
> @@ -26,6 +26,8 @@ void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
>  void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
>  void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
>  void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
> +void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
> +					int state);
>  
>  void drm_fb_cma_destroy(struct drm_framebuffer *fb);
>  int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
> -- 
> 2.10.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: "Noralf Trønnes" <noralf@tronnes.org>
Cc: thomas.petazzoni@free-electrons.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	laurent.pinchart@ideasonboard.com
Subject: Re: [PATCH 1/9] drm/fb-cma-helper: Add drm_fbdev_cma_set_suspend_unlocked()
Date: Mon, 23 Jan 2017 10:07:13 +0100	[thread overview]
Message-ID: <20170123090713.s3dctg7iofcjfdql@phenom.ffwll.local> (raw)
In-Reply-To: <20170122181117.8210-2-noralf@tronnes.org>

On Sun, Jan 22, 2017 at 07:11:09PM +0100, Noralf Trønnes wrote:
> Add a CMA version of drm_fb_helper_set_suspend_unlocked().
> 
> Cc: laurent.pinchart@ideasonboard.com
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
> ---
>  drivers/gpu/drm/drm_fb_cma_helper.c | 18 ++++++++++++++++++
>  include/drm/drm_fb_cma_helper.h     |  2 ++
>  2 files changed, 20 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_fb_cma_helper.c b/drivers/gpu/drm/drm_fb_cma_helper.c
> index 4364abf..0ef8b28 100644
> --- a/drivers/gpu/drm/drm_fb_cma_helper.c
> +++ b/drivers/gpu/drm/drm_fb_cma_helper.c
> @@ -622,3 +622,21 @@ void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state)
>  		drm_fb_helper_set_suspend(&fbdev_cma->fb_helper, state);
>  }
>  EXPORT_SYMBOL(drm_fbdev_cma_set_suspend);

Random idea for a cleanup series: Getting rid of
drm_fb_helper_set_suspend. I thinkf for almost all drivers we can use the
unlocked one, which has the upside that it doesn't stall the resume path
on the contended console_lock.

Anyway, applied this one here, thanks.
-Daniel

> +
> +/**
> + * drm_fbdev_cma_set_suspend_unlocked - wrapper around
> + *                                      drm_fb_helper_set_suspend_unlocked
> + * @fbdev_cma: The drm_fbdev_cma struct, may be NULL
> + * @state: desired state, zero to resume, non-zero to suspend
> + *
> + * Calls drm_fb_helper_set_suspend, which is a wrapper around
> + * fb_set_suspend implemented by fbdev core.
> + */
> +void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
> +					int state)
> +{
> +	if (fbdev_cma)
> +		drm_fb_helper_set_suspend_unlocked(&fbdev_cma->fb_helper,
> +						   state);
> +}
> +EXPORT_SYMBOL(drm_fbdev_cma_set_suspend_unlocked);
> diff --git a/include/drm/drm_fb_cma_helper.h b/include/drm/drm_fb_cma_helper.h
> index 9f4e34e..8dd6e55 100644
> --- a/include/drm/drm_fb_cma_helper.h
> +++ b/include/drm/drm_fb_cma_helper.h
> @@ -26,6 +26,8 @@ void drm_fbdev_cma_fini(struct drm_fbdev_cma *fbdev_cma);
>  void drm_fbdev_cma_restore_mode(struct drm_fbdev_cma *fbdev_cma);
>  void drm_fbdev_cma_hotplug_event(struct drm_fbdev_cma *fbdev_cma);
>  void drm_fbdev_cma_set_suspend(struct drm_fbdev_cma *fbdev_cma, int state);
> +void drm_fbdev_cma_set_suspend_unlocked(struct drm_fbdev_cma *fbdev_cma,
> +					int state);
>  
>  void drm_fb_cma_destroy(struct drm_framebuffer *fb);
>  int drm_fb_cma_create_handle(struct drm_framebuffer *fb,
> -- 
> 2.10.2
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

-- 
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-01-23  9:07 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-22 18:11 [PATCH 0/9] drm: Add support for tiny LCD displays Noralf Trønnes
2017-01-22 18:11 ` Noralf Trønnes
2017-01-22 18:11 ` [PATCH 1/9] drm/fb-cma-helper: Add drm_fbdev_cma_set_suspend_unlocked() Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-23  9:07   ` Daniel Vetter [this message]
2017-01-23  9:07     ` Daniel Vetter
2017-01-22 18:11 ` [PATCH 2/9] drm: debugfs: Remove all files automatically on cleanup Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-23  9:10   ` Daniel Vetter
2017-01-23  9:10     ` Daniel Vetter
2017-01-22 18:11 ` [PATCH 3/9] drm/simple-helpers: Add missing includes Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-22 18:11 ` [PATCH 4/9] drm: Add DRM support for tiny LCD displays Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-23  9:28   ` Daniel Vetter
2017-01-24 16:35     ` Noralf Trønnes
2017-01-24 17:48       ` Jani Nikula
2017-01-22 18:11 ` [PATCH 5/9] drm/tinydrm: Add helper functions Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-23  9:32   ` Daniel Vetter
2017-01-22 18:11 ` [PATCH 6/9] drm/tinydrm: Add MIPI DBI support Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-22 18:11 ` [PATCH 7/9] of: Add vendor prefix for Multi-Inno Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-23 20:33   ` Rob Herring
2017-01-23 20:33     ` Rob Herring
2017-01-22 18:11 ` [PATCH 8/9] dt-bindings: Add Multi-Inno MI0283QT binding Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes
2017-01-23 20:43   ` Rob Herring
2017-01-23 20:43     ` Rob Herring
2017-01-22 18:11 ` [PATCH 9/9] drm/tinydrm: Add support for Multi-Inno MI0283QT display Noralf Trønnes
2017-01-22 18:11   ` Noralf Trønnes

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=20170123090713.s3dctg7iofcjfdql@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=noralf@tronnes.org \
    --cc=thomas.petazzoni@free-electrons.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.