diff mbox series

[1/2] drm/connector: Document the optional margin props in the HDMI section

Message ID 20190327095916.16032-1-boris.brezillon@collabora.com (mailing list archive)
State New, archived
Headers show
Series [1/2] drm/connector: Document the optional margin props in the HDMI section | expand

Commit Message

Boris Brezillon March 27, 2019, 9:59 a.m. UTC
HDMI connectors can optionally be attached margin props. Let's
document them.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
 drivers/gpu/drm/drm_connector.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

Comments

Daniel Vetter March 27, 2019, 11:19 a.m. UTC | #1
On Wed, Mar 27, 2019 at 10:59:15AM +0100, Boris Brezillon wrote:
> HDMI connectors can optionally be attached margin props. Let's
> document them.
> 
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> ---
>  drivers/gpu/drm/drm_connector.c | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> index 2355124849db..95dfb322b14e 100644
> --- a/drivers/gpu/drm/drm_connector.c
> +++ b/drivers/gpu/drm/drm_connector.c
> @@ -1116,6 +1116,23 @@ EXPORT_SYMBOL(drm_mode_create_dvi_i_properties);
>   *	Drivers can set up this property by calling
>   *	drm_connector_attach_content_type_property(). Decoding to
>   *	infoframe values is done through drm_hdmi_avi_infoframe_content_type().
> + *
> + * TV margins (optional):
> + *	Defines invisible area of a screen so that the CRTC driver can possibly
> + *	scale the output image and move it to make it entirely visible. All
> + *	margins are defined in pixels and the valid range is 0 - 100.

Maybe add the usual hints for driver writers too:

"Drivers can set this up by calling
drm_connector_attach_tv_margin_properties(), the values are stored in
&drm_connector_state.tv."

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

I'm also not entirely sure it's in pixels, but *shrug*
-Daniel


> + *
> + *	left margin:
> + *		Left margin
> + *
> + *	right margin:
> + *		Left margin
> + *
> + *	top margin:
> + *		Top margin
> + *
> + *	bottom margin:
> + *		Bottom margin
>   */
>  
>  /**
> -- 
> 2.20.1
>
Boris Brezillon March 27, 2019, 12:27 p.m. UTC | #2
On Wed, 27 Mar 2019 12:19:30 +0100
Daniel Vetter <daniel@ffwll.ch> wrote:

> On Wed, Mar 27, 2019 at 10:59:15AM +0100, Boris Brezillon wrote:
> > HDMI connectors can optionally be attached margin props. Let's
> > document them.
> > 
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
> > ---
> >  drivers/gpu/drm/drm_connector.c | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
> > index 2355124849db..95dfb322b14e 100644
> > --- a/drivers/gpu/drm/drm_connector.c
> > +++ b/drivers/gpu/drm/drm_connector.c
> > @@ -1116,6 +1116,23 @@ EXPORT_SYMBOL(drm_mode_create_dvi_i_properties);
> >   *	Drivers can set up this property by calling
> >   *	drm_connector_attach_content_type_property(). Decoding to
> >   *	infoframe values is done through drm_hdmi_avi_infoframe_content_type().
> > + *
> > + * TV margins (optional):
> > + *	Defines invisible area of a screen so that the CRTC driver can possibly
> > + *	scale the output image and move it to make it entirely visible. All
> > + *	margins are defined in pixels and the valid range is 0 - 100.  
> 
> Maybe add the usual hints for driver writers too:
> 
> "Drivers can set this up by calling
> drm_connector_attach_tv_margin_properties(), the values are stored in
> &drm_connector_state.tv."
> 
> With that: Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> 
> I'm also not entirely sure it's in pixels, but *shrug*

I'm sure the VC4 driver considers it's expressed in pixels :P. This was
decided after the discussion we had with Ville (when I submitted
margins support for VC4).

> -Daniel
> 
> 
> > + *
> > + *	left margin:
> > + *		Left margin
> > + *
> > + *	right margin:
> > + *		Left margin
> > + *
> > + *	top margin:
> > + *		Top margin
> > + *
> > + *	bottom margin:
> > + *		Bottom margin
> >   */
> >  
> >  /**
> > -- 
> > 2.20.1
> >   
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c
index 2355124849db..95dfb322b14e 100644
--- a/drivers/gpu/drm/drm_connector.c
+++ b/drivers/gpu/drm/drm_connector.c
@@ -1116,6 +1116,23 @@  EXPORT_SYMBOL(drm_mode_create_dvi_i_properties);
  *	Drivers can set up this property by calling
  *	drm_connector_attach_content_type_property(). Decoding to
  *	infoframe values is done through drm_hdmi_avi_infoframe_content_type().
+ *
+ * TV margins (optional):
+ *	Defines invisible area of a screen so that the CRTC driver can possibly
+ *	scale the output image and move it to make it entirely visible. All
+ *	margins are defined in pixels and the valid range is 0 - 100.
+ *
+ *	left margin:
+ *		Left margin
+ *
+ *	right margin:
+ *		Left margin
+ *
+ *	top margin:
+ *		Top margin
+ *
+ *	bottom margin:
+ *		Bottom margin
  */
 
 /**