dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	dri-devel@lists.freedesktop.org
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Subject: Re: [PATCH 3/5] drm/bridge: ti-tfp410: Set connector type based on DT connector node
Date: Tue, 11 Dec 2018 15:00:26 +0200	[thread overview]
Message-ID: <b4de0b9e-2774-3870-0602-af24ecbb06f2@ti.com> (raw)
In-Reply-To: <20181206202610.18167-4-laurent.pinchart@ideasonboard.com>

On 06/12/2018 22:26, Laurent Pinchart wrote:
> The TI TFP410 is a DVI encoder, not a full HDMI encoder. Its output can
> be routed to a DVI-D connector, even if in many cases embedded systems
> will use an HDMI connector to carry the DVI signals.
> 
> Instead of hardcoding the connector type to HDMI, retrieve the connector
> type from its DT node.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---

Reviewed-by: Jyri Sarha <jsarha@ti.com>

>  drivers/gpu/drm/bridge/ti-tfp410.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> index c3e32138c6bb..e4280f5af9f5 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -27,6 +27,7 @@
>  struct tfp410 {
>  	struct drm_bridge	bridge;
>  	struct drm_connector	connector;
> +	unsigned int		connector_type;
>  
>  	struct i2c_adapter	*ddc;
>  	struct gpio_desc	*hpd;
> @@ -126,7 +127,7 @@ static int tfp410_attach(struct drm_bridge *bridge)
>  	drm_connector_helper_add(&dvi->connector,
>  				 &tfp410_con_helper_funcs);
>  	ret = drm_connector_init(bridge->dev, &dvi->connector,
> -				 &tfp410_con_funcs, DRM_MODE_CONNECTOR_HDMIA);
> +				 &tfp410_con_funcs, dvi->connector_type);
>  	if (ret) {
>  		dev_err(dvi->dev, "drm_connector_init() failed: %d\n", ret);
>  		return ret;
> @@ -172,6 +173,11 @@ static int tfp410_get_connector_properties(struct tfp410 *dvi)
>  	if (!connector_node)
>  		return -ENODEV;
>  
> +	if (of_device_is_compatible(connector_node, "hdmi-connector"))
> +		dvi->connector_type = DRM_MODE_CONNECTOR_HDMIA;
> +	else
> +		dvi->connector_type = DRM_MODE_CONNECTOR_DVID;
> +
>  	dvi->hpd = fwnode_get_named_gpiod(&connector_node->fwnode,
>  					"hpd-gpios", 0, GPIOD_IN, "hpd");
>  	if (IS_ERR(dvi->hpd)) {
> 


-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-12-11 13:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-06 20:26 [PATCH 0/5] drm: ti-tfp410 improvements Laurent Pinchart
2018-12-06 20:26 ` [PATCH 1/5] drm/bridge: use bus flags in bridge timings Laurent Pinchart
2018-12-06 20:26 ` [PATCH 2/5] dt-bindings: display: tfp410: Add bus parameters properties Laurent Pinchart
2018-12-06 20:26 ` [PATCH 3/5] drm/bridge: ti-tfp410: Set connector type based on DT connector node Laurent Pinchart
2018-12-11 13:00   ` Jyri Sarha [this message]
2018-12-06 20:26 ` [PATCH 4/5] drm/bridge: ti-tfp410: Add support for the powerdown GPIO Laurent Pinchart
2018-12-11 13:01   ` Jyri Sarha
2018-12-11 14:26     ` Laurent Pinchart
2018-12-06 20:26 ` [PATCH 5/5] drm/bridge: ti-tfp410: Report input bus config through bridge timings Laurent Pinchart
2018-12-11 14:48   ` Jyri Sarha
2018-12-11 15:19     ` Tomi Valkeinen
2018-12-11 15:35       ` Jyri Sarha
2018-12-11 15:43     ` Laurent Pinchart
2018-12-10 13:39 ` [PATCH 0/5] drm: ti-tfp410 improvements Tomi Valkeinen

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=b4de0b9e-2774-3870-0602-af24ecbb06f2@ti.com \
    --to=jsarha@ti.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tomi.valkeinen@ti.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox