Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1399361

Re: [PATCH v2 5/6] drm/atomic: Add drm_atomic_helper_best_encoder()

From Daniel Vetter <daniel@ffwll.ch>
Newsgroups linux.kernel
Subject Re: [PATCH v2 5/6] drm/atomic: Add drm_atomic_helper_best_encoder()
Date 2016-05-11 19:00 +0200
Message-ID <rxFEm-3D1-11@gated-at.bofh.it> (permalink)
References <rxF1E-3io-7@gated-at.bofh.it> <rxF1E-3io-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, May 11, 2016 at 06:09:21PM +0200, Noralf Trønnes wrote:
> Add (struct drm_connector_helper_funcs *)->best_encoder callback helper
> for connectors that support exactly 1 encoder, statically determined at
> driver init time.
> 
> Signed-off-by: Noralf Trønnes <noralf@tronnes.org>

Applied to drm-misc, thanks.
-Daniel

> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 17 +++++++++++++++++
>  include/drm/drm_atomic_helper.h     |  2 ++
>  2 files changed, 19 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 46a3201..43a0b3d 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -2483,6 +2483,23 @@ backoff:
>  EXPORT_SYMBOL(drm_atomic_helper_connector_dpms);
>  
>  /**
> + * drm_atomic_helper_best_encoder - Helper for &drm_connector_helper_funcs
> + *                                  ->best_encoder callback
> + * @connector: Connector control structure
> + *
> + * This is a &drm_connector_helper_funcs ->best_encoder callback helper for
> + * connectors that support exactly 1 encoder, statically determined at driver
> + * init time.
> + */
> +struct drm_encoder *
> +drm_atomic_helper_best_encoder(struct drm_connector *connector)
> +{
> +	WARN_ON(connector->encoder_ids[1]);
> +	return drm_encoder_find(connector->dev, connector->encoder_ids[0]);
> +}
> +EXPORT_SYMBOL(drm_atomic_helper_best_encoder);
> +
> +/**
>   * DOC: atomic state reset and initialization
>   *
>   * Both the drm core and the atomic helpers assume that there is always the full
> diff --git a/include/drm/drm_atomic_helper.h b/include/drm/drm_atomic_helper.h
> index 0364287..ccca709 100644
> --- a/include/drm/drm_atomic_helper.h
> +++ b/include/drm/drm_atomic_helper.h
> @@ -110,6 +110,8 @@ int drm_atomic_helper_page_flip(struct drm_crtc *crtc,
>  				uint32_t flags);
>  int drm_atomic_helper_connector_dpms(struct drm_connector *connector,
>  				     int mode);
> +struct drm_encoder *
> +drm_atomic_helper_best_encoder(struct drm_connector *connector);
>  
>  /* default implementations for state handling */
>  void drm_atomic_helper_crtc_reset(struct drm_crtc *crtc);
> -- 
> 2.8.2
> 

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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/6] drm: Add various helpers for simple drivers Noralf Trønnes <noralf@tronnes.org> - 2016-05-11 18:20 +0200
  [PATCH v2 4/6] drm/atomic: Don't skip drm_bridge_*() calls if !drm_encoder_helper_funcs Noralf Trønnes <noralf@tronnes.org> - 2016-05-11 18:20 +0200
    Re: [PATCH v2 4/6] drm/atomic: Don't skip drm_bridge_*() calls if  !drm_encoder_helper_funcs Daniel Vetter <daniel@ffwll.ch> - 2016-05-11 19:00 +0200
  [PATCH v2 5/6] drm/atomic: Add drm_atomic_helper_best_encoder() Noralf Trønnes <noralf@tronnes.org> - 2016-05-11 18:20 +0200
    Re: [PATCH v2 5/6] drm/atomic: Add drm_atomic_helper_best_encoder() Daniel Vetter <daniel@ffwll.ch> - 2016-05-11 19:00 +0200
  [PATCH v2 2/6] drm/fb-cma-helper: Hook up to DocBook and fix some docs Noralf Trønnes <noralf@tronnes.org> - 2016-05-11 18:20 +0200
    Re: [PATCH v2 2/6] drm/fb-cma-helper: Hook up to DocBook and fix  some docs Daniel Vetter <daniel@ffwll.ch> - 2016-05-11 18:50 +0200
  [PATCH v2 3/6] drm/fb-cma-helper: Add function drm_fb_cma_create_with_funcs() Noralf Trønnes <noralf@tronnes.org> - 2016-05-11 18:20 +0200
  [PATCH v2 1/6] drm/fb-helper: Remove mention of CONFIG_FB_DEFERRED_IO in docs Noralf Trønnes <noralf@tronnes.org> - 2016-05-11 18:20 +0200

csiph-web