dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: devicetree@vger.kernel.org,
	Jernej Skrabec <jernej.skrabec@siol.net>,
	Neil Armstrong <narmstrong@baylibre.com>,
	David Airlie <airlied@linux.ie>,
	linux-arm-msm@vger.kernel.org, Jonas Karlman <jonas@kwiboo.se>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	dri-devel@lists.freedesktop.org,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andrzej Hajda <a.hajda@samsung.com>,
	Vinod Koul <vkoul@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 3/4] drm/bridge: Introduce LT9611 DSI to HDMI bridge
Date: Wed, 22 Jul 2020 16:14:30 +0300	[thread overview]
Message-ID: <20200722131430.GJ5833@pendragon.ideasonboard.com> (raw)
In-Reply-To: <20200719171806.GA55541@ravnborg.org>

Hello,

On Sun, Jul 19, 2020 at 07:18:06PM +0200, Sam Ravnborg wrote:
> Hi Vinod.
> 
> Three trivial points below.
> The rest looks good.
> 
> With these fixed you can add:
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
> 
> 	Sam
> 
> On Wed, Jul 08, 2020 at 04:05:58PM +0530, Vinod Koul wrote:
> > Lontium Lt9611 is a DSI to HDMI bridge which supports two DSI ports and
> > I2S port as an input and HDMI port as output
> > 
> > Co-developed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> > Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Tested-by: John Stultz <john.stultz@linaro.org>
> > Signed-off-by: Vinod Koul <vkoul@kernel.org>
> > ---
> >  drivers/gpu/drm/bridge/Kconfig          |   13 +
> >  drivers/gpu/drm/bridge/Makefile         |    1 +
> >  drivers/gpu/drm/bridge/lontium-lt9611.c | 1142 +++++++++++++++++++++++
> >  3 files changed, 1156 insertions(+)
> >  create mode 100644 drivers/gpu/drm/bridge/lontium-lt9611.c
> > 
> > +
> > +#include <drm/drm_probe_helper.h>
> > +#include <drm/drm_atomic_helper.h>
> > +#include <drm/drm_bridge.h>
> > +#include <drm/drm_mipi_dsi.h>
> > +#include <drm/drm_print.h>
> 
> In alphabetical order. drm_probe_helper needs to be moved.
> 
> > +
> > +#define EDID_SEG_SIZE	256
> > +#define EDID_LEN	32
> > +#define EDID_LOOP	8
> > +#define KEY_DDC_ACCS_DONE 0x02
> > +#define DDC_NO_ACK	0x50
> > +
> 
> > +static void lt9611_pcr_setup(struct lt9611 *lt9611, const struct drm_display_mode *mode)
> > +{
> > +	const struct reg_sequence reg_cfg[] = {
> > +		{ 0x830b, 0x01 },
> > +		{ 0x830c, 0x10 },
> > +		{ 0x8348, 0x00 },
> > +		{ 0x8349, 0x81 },
> > +
> > +		/* stage 1 */
> > +		{ 0x8321, 0x4a },
> > +		{ 0x8324, 0x71 },
> > +		{ 0x8325, 0x30 },
> > +		{ 0x832a, 0x01 },
> > +
> > +		/* stage 2 */
> > +		{ 0x834a, 0x40 },
> > +		{ 0x831d, 0x10 },
> > +
> > +		/* MK limit */
> > +		{ 0x832d, 0x38 },
> > +		{ 0x8331, 0x08 },
> > +	};
> > +	const struct reg_sequence reg_cfg2[] = {
> > +			{ 0x830b, 0x03 },
> > +			{ 0x830c, 0xd0 },
> > +			{ 0x8348, 0x03 },
> > +			{ 0x8349, 0xe0 },
> > +			{ 0x8324, 0x72 },
> > +			{ 0x8325, 0x00 },
> > +			{ 0x832a, 0x01 },
> > +			{ 0x834a, 0x10 },
> > +			{ 0x831d, 0x10 },
> > +			{ 0x8326, 0x37 },
> 
> Block above is indented one tab too much.
> 
> > +static int lt9611_bridge_attach(struct drm_bridge *bridge,
> > +				enum drm_bridge_attach_flags flags)
> > +{
> > +	struct lt9611 *lt9611 = bridge_to_lt9611(bridge);
> > +	int ret;
> > +
> > +	if (!(flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR)) {
> > +		dev_err(lt9611->dev, "Fix bridge driver to make connector optional!");
> > +		return -EINVAL;
> > +	}
>
> This should say that the display driver should be fixed.
> If a display driver expects this bridge to create the connector
> it would not work.

Actually, for new bridge drivers, connector creation should be optional
from the start. We don't want a failure in that case, the feature should
be implemented.

-- 
Regards,

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

  parent reply	other threads:[~2020-07-22 13:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08 10:35 [PATCH v5 0/4] Add LT9611 DSI to HDMI bridge Vinod Koul
2020-07-08 10:35 ` [PATCH v5 1/4] dt-bindings: vendor-prefixes: Add Lontium vendor prefix Vinod Koul
2020-07-08 10:35 ` [PATCH v5 2/4] dt-bindings: display: bridge: Add documentation for LT9611 Vinod Koul
2020-07-08 10:35 ` [PATCH v5 3/4] drm/bridge: Introduce LT9611 DSI to HDMI bridge Vinod Koul
2020-07-19 17:18   ` Sam Ravnborg
2020-07-20  4:03     ` Vinod Koul
2020-07-22 13:14     ` Laurent Pinchart [this message]
2020-07-23 10:41       ` Vinod Koul
2020-07-23 11:39         ` Sam Ravnborg
2020-07-23 12:10           ` Vinod Koul
2020-07-08 10:35 ` [PATCH v5 4/4] drm/msm/dsi: attach external bridge with DRM_BRIDGE_ATTACH_NO_CONNECTOR Vinod Koul
2020-07-19 16:03 ` [PATCH v5 0/4] Add LT9611 DSI to HDMI bridge Vinod Koul

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=20200722131430.GJ5833@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=bjorn.andersson@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=jernej.skrabec@siol.net \
    --cc=jonas@kwiboo.se \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vkoul@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).