dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Jyri Sarha <jsarha@ti.com>, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 1/6 v2] drm/omap: add new connector types
Date: Wed, 10 May 2017 01:35:56 +0300	[thread overview]
Message-ID: <3422279.XeqUQ1Vfv1@avalon> (raw)
In-Reply-To: <1494314187-12816-1-git-send-email-tomi.valkeinen@ti.com>

Hi Tomi,

Thank you for the patch.

On Tuesday 09 May 2017 10:16:27 Tomi Valkeinen wrote:
> We have been using DRM_MODE_CONNECTOR_Unknown for many of our outputs
> because there has not been a proper connector type for them.
> 
> We now have connector type for DPI so let's take it into use. At the
> same time, add better connector types for the remaining outputs too.
> 
> This patch sets the following outputs to use the following connector
> types:
> 
> DPI -> DPI
> DBI -> DPI (MIPI DBI is very similar to DPI at the bus level)
> SDI -> LVDS (SDI, TI Flatlink 3G, is a type of LVDS)
> VENC -> SVIDEO (it could also be composite, but we don't have that
>         information here, so svideo should be quite good match)
> 
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_drv.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c
> b/drivers/gpu/drm/omapdrm/omap_drv.c index e1f47f0b3ccf..16c537837742
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> @@ -214,6 +214,19 @@ static int get_connector_type(struct omap_dss_device
> *dssdev) return DRM_MODE_CONNECTOR_DVID;
>  	case OMAP_DISPLAY_TYPE_DSI:
>  		return DRM_MODE_CONNECTOR_DSI;
> +	case OMAP_DISPLAY_TYPE_DPI:
> +	case OMAP_DISPLAY_TYPE_DBI:
> +		return DRM_MODE_CONNECTOR_DPI;
> +	case OMAP_DISPLAY_TYPE_VENC:
> +		if (of_device_is_compatible(dssdev->dev->of_node,
> +		    "omapdss,svideo-connector"))
> +			return DRM_MODE_CONNECTOR_SVIDEO;
> +		if (of_device_is_compatible(dssdev->dev->of_node,
> +		    "omapdss,composite-video-connector"))
> +			return DRM_MODE_CONNECTOR_Composite;

Checking the compat string here feels like a bit of a hack to me. Wouldn't it 
be simpler and cleaner to add the connector type to the omap_dss_device 
structure ? That's more work though, so as a first step I think I could 
tolerate this hack if you really feel lazy ;-) Although, maybe we should just 
return SVIDEO unconditionally for VENC for now and fix that later.

> +		return DRM_MODE_CONNECTOR_Unknown;
> +	case OMAP_DISPLAY_TYPE_SDI:
> +		return DRM_MODE_CONNECTOR_LVDS;
>  	default:
>  		return DRM_MODE_CONNECTOR_Unknown;
>  	}

-- 
Regards,

Laurent Pinchart

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2017-05-09 22:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-27 10:27 [PATCH 0/6] drm/omap: misc changes Tomi Valkeinen
2017-04-27 10:27 ` [PATCH 1/6] drm/omap: add new connector types Tomi Valkeinen
2017-05-08 14:21   ` Laurent Pinchart
2017-05-08 14:35     ` Tomi Valkeinen
2017-05-08 16:21       ` Laurent Pinchart
2017-05-09  6:57         ` Tomi Valkeinen
2017-05-09  7:16   ` [PATCH 1/6 v2] " Tomi Valkeinen
2017-05-09  7:36     ` Jyri Sarha
2017-05-09  7:41       ` Tomi Valkeinen
2017-05-09 22:35     ` Laurent Pinchart [this message]
2017-05-10  6:59       ` Tomi Valkeinen
2017-04-27 10:27 ` [PATCH 2/6] drm/omap: remove unused ovl_enabled() Tomi Valkeinen
2017-05-08 14:23   ` Laurent Pinchart
2017-04-27 10:27 ` [PATCH 3/6] drm/omap: remove ovl_set_channel_out Tomi Valkeinen
2017-05-08 14:26   ` Laurent Pinchart
2017-05-09  7:12     ` Tomi Valkeinen
2017-04-27 10:27 ` [PATCH 4/6] drm/omap: remove read_irqenable() Tomi Valkeinen
2017-05-08 14:28   ` Laurent Pinchart
2017-04-27 10:27 ` [PATCH 5/6] drm/omap: 64bit compile fixes Tomi Valkeinen
2017-05-08 14:29   ` Laurent Pinchart
2017-04-27 10:27 ` [PATCH 6/6] drm/omap: define compat_ioctl Tomi Valkeinen
2017-05-08 14:32   ` Laurent Pinchart

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=3422279.XeqUQ1Vfv1@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.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