diff mbox

[4/8] drm: Add encoder_type field to the drm_bridge structure

Message ID 1476887143-24831-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State New, archived
Headers show

Commit Message

Laurent Pinchart Oct. 19, 2016, 2:25 p.m. UTC
The drm_bridge object models on- or off-chip hardware encoders and
provide an abstract control API to display drivers. In order to help
display drivers creating the right kind of drm_encoder object, expose
the type of the hardware encoder associated with each bridge.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 include/drm/drm_bridge.h | 8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Archit Taneja Oct. 20, 2016, 12:15 p.m. UTC | #1
Hi,

On 10/19/2016 07:55 PM, Laurent Pinchart wrote:
> The drm_bridge object models on- or off-chip hardware encoders and
> provide an abstract control API to display drivers. In order to help
> display drivers creating the right kind of drm_encoder object, expose
> the type of the hardware encoder associated with each bridge.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  include/drm/drm_bridge.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
> index 530a1d6e8cde..e93105bffc3c 100644
> --- a/include/drm/drm_bridge.h
> +++ b/include/drm/drm_bridge.h
> @@ -194,6 +194,14 @@ struct drm_bridge {
>  #endif
>  	struct list_head list;
>
> +	/**
> +	 * @encoder_type:
> +	 *
> +	 * Type of the hardware encoder modeled by the bridge as one of the
> +	 * DRM_MODE_ENCODER_* types. This will usually be identical to the
> +	 * ->encoder.encoder_type for the last bridge in the chain only.

It isn't entirely clear in the comment that we're mentioning
drm_encoder's encoder_type here. Maybe we can give a &drm_encoder
back reference?


> +	 */
> +	int encoder_type;
>  	const struct drm_bridge_funcs *funcs;
>  	void *driver_private;
>  };
>
diff mbox

Patch

diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h
index 530a1d6e8cde..e93105bffc3c 100644
--- a/include/drm/drm_bridge.h
+++ b/include/drm/drm_bridge.h
@@ -194,6 +194,14 @@  struct drm_bridge {
 #endif
 	struct list_head list;
 
+	/**
+	 * @encoder_type:
+	 *
+	 * Type of the hardware encoder modeled by the bridge as one of the
+	 * DRM_MODE_ENCODER_* types. This will usually be identical to the
+	 * ->encoder.encoder_type for the last bridge in the chain only.
+	 */
+	int encoder_type;
 	const struct drm_bridge_funcs *funcs;
 	void *driver_private;
 };