dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Boris Brezillon <boris.brezillon@free-electrons.com>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Jianwei Wang <jianwei.wang.chn@gmail.com>,
	Meng Yi <meng.yi@nxp.com>,
	Xiubo Li <lixiubo@cmss.chinamobile.com>,
	Emil Velikov <emil.l.velikov@gmail.com>,
	Alison Wang <alison.wang@nxp.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	dri-devel@lists.freedesktop.org,
	Alexandre Belloni <alexandre.belloni@free-electrons.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Subject: Re: [PATCH v3 1/2] drm: bridge: Add sii902x driver
Date: Tue, 3 May 2016 11:39:15 +0200	[thread overview]
Message-ID: <20160503113915.21e91ac7@bbrezillon> (raw)
In-Reply-To: <20160502110557.GO17159@lukather>

Hi Maxime,

On Mon, 2 May 2016 13:05:57 +0200
Maxime Ripard <maxime.ripard@free-electrons.com> wrote:



> > +static void sii902x_reset(struct sii902x *sii902x)
> > +{
> > +	gpiod_set_value(sii902x->reset_gpio, 1);
> > +
> > +	msleep(100);  
> 
> Sleeping for 100ms seems like a lot. Is it required, or is it just a
> leftover from an early development?

I wish I had the answer, unfortunately I don't have the datasheet and
the implementation I based my work on [1] is sleeping 100ms.

> 
> > +
> > +	gpiod_set_value(sii902x->reset_gpio, 0);
> > +}
> > +
> > +static void sii902x_connector_destroy(struct drm_connector *connector)
> > +{
> > +	drm_connector_unregister(connector);
> > +	drm_connector_cleanup(connector);
> > +}
> > +
> > +static enum drm_connector_status
> > +sii902x_connector_detect(struct drm_connector *connector, bool force)
> > +{
> > +	struct sii902x *sii902x = connector_to_sii902x(connector);
> > +	unsigned int status;
> > +
> > +	regmap_read(sii902x->regmap, SI902X_INT_STATUS, &status);
> > +
> > +	return (status & SI902X_PLUGGED_STATUS) ?
> > +	       connector_status_connected : connector_status_disconnected;
> > +}
> > +
> > +static const struct drm_connector_funcs sii902x_atomic_connector_funcs = {
> > +	.dpms = drm_atomic_helper_connector_dpms,
> > +	.detect = sii902x_connector_detect,
> > +	.fill_modes = drm_helper_probe_single_connector_modes,
> > +	.destroy = sii902x_connector_destroy,
> > +	.reset = drm_atomic_helper_connector_reset,
> > +	.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
> > +	.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
> > +};
> > +
> > +static const struct drm_connector_funcs sii902x_connector_funcs = {
> > +	.dpms = drm_atomic_helper_connector_dpms,

Should be drm_atomic_helper_dpms here.

> > +	.detect = sii902x_connector_detect,
> > +	.fill_modes = drm_helper_probe_single_connector_modes,
> > +	.destroy = sii902x_connector_destroy,
> > +};  
> 
> I'm guessing this is to support both atomic and !atomic drivers. I
> thought it was working automatically?

Hm, the dw-hdmi driver is providing both, but maybe it's not needed.
Daniel, any comments?

Thanks for the review.

Boris

[1]https://github.com/linux4sam/linux-at91/blob/linux-3.10-at91/drivers/hdmi/encoder-sii9022.c#L92

-- 
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-05-03  9:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 14:14 [PATCH v3 1/2] drm: bridge: Add sii902x driver Boris Brezillon
2016-03-16 14:14 ` [PATCH v3 2/2] drm: bridge: add sii902x DT bindings doc Boris Brezillon
2016-04-22  9:58 ` [PATCH v3 1/2] drm: bridge: Add sii902x driver Meng Yi
2016-04-22 11:32   ` Boris Brezillon
2016-05-02 11:05 ` Maxime Ripard
2016-05-03  9:39   ` Boris Brezillon [this message]
2016-05-03  9:53     ` Daniel Vetter
2016-05-03 10:03       ` Boris Brezillon
2016-05-03 12:54         ` Daniel Vetter

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=20160503113915.21e91ac7@bbrezillon \
    --to=boris.brezillon@free-electrons.com \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=alison.wang@nxp.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=jianwei.wang.chn@gmail.com \
    --cc=lixiubo@cmss.chinamobile.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=meng.yi@nxp.com \
    --cc=nicolas.ferre@atmel.com \
    --cc=plagnioj@jcrosoft.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