All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: dri-devel@lists.freedesktop.org, Dave Airlie <airlied@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Rob Clark <robdclark@gmail.com>
Subject: Re: [PATCH v5 00/23]
Date: Sun, 2 Feb 2014 18:23:49 +0000	[thread overview]
Message-ID: <20140202182349.GJ26684@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140202190606.6fa193ce@armhf>

On Sun, Feb 02, 2014 at 07:06:06PM +0100, Jean-Francois Moine wrote:
> On Sun, 2 Feb 2014 12:43:58 +0000
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Wed, Jan 29, 2014 at 10:01:22AM +0100, Jean-Francois Moine wrote:
> > > This patch set contains various extensions to the tda998x driver:
> > > 
> > > - simplify the i2c read/write
> > > - code cleanup and fix some small errors
> > > - use global constants
> > > - don't read write-only registers
> > > - add DT support
> > > - use IRQ for connection status and EDID read
> > 
> > I discussed these patches with Rob Clark recently, and the conclusion
> > we came to is that I'll merge them into a git tree, test them, and
> > once I'm happy I'll send a pull request as appropriate.
> > 
> > I'll go through them later today.  Those patches which have been re-
> > posted without any change for the last few times (the first few) I'll
> > take into my git tree today so you don't have to keep re-posting them
> > (more importantly, I won't have to keep on looking at them either.)
> 
> Thanks.
> 
> BTW, I found some problems with the patch 12 'add DT support' you
> already acked:
> 
> - the .of_match_table is not needed because the i2c client is created by
>   the i2c subsystem from the 'reg' in the DT,

Okay - may it be a good idea to have someone knowledgable of I2C give it
a review?

> - on encoder_destroy(), the function drm_i2c_encoder_destroy()
>   unregisters the i2c client, so, with a DT, a second encoder_init()
>   would crash.

I think this is one of the down-sides of trying to bolt DT into this:
the drm encoder slave support is not designed to cope with an i2c client
device pre-created.

In fact, I can't see how this stuff comes anywhere close to working in
a DT setup: in such a scenario, you declare that there's a tda998x
device in DT.  I2C parses this, and creates an i2c_client itself for
the tda998x.

When the TDA998x driver initialises, it finds this i2c client and
binds to it, calling tda998x_probe(), which does nothing.

However, the only way to attach a slave encoder to a DRM device is via
a call to drm_i2c_encoder_init(), which unconditionally calls
i2c_new_device().  This creates a _new_ i2c_client structure, again
unconditionally, for the tda998x.  This must be bound by the I2C
subsystem to a driver - hopefully the tda998x driver, which then
calls it's encoder_init function.

None of this will happen if DT has already created an i2c_client at
the appropriate address, because DRMs i2c_new_device() will fail.

My hypothesis is that you have other patches to I2C and/or DRM to
sort this out which you haven't been posting with this series.  So,
could you please provide some hints as to how this works?

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

WARNING: multiple messages have this Message-ID (diff)
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 00/23]
Date: Sun, 2 Feb 2014 18:23:49 +0000	[thread overview]
Message-ID: <20140202182349.GJ26684@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140202190606.6fa193ce@armhf>

On Sun, Feb 02, 2014 at 07:06:06PM +0100, Jean-Francois Moine wrote:
> On Sun, 2 Feb 2014 12:43:58 +0000
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Wed, Jan 29, 2014 at 10:01:22AM +0100, Jean-Francois Moine wrote:
> > > This patch set contains various extensions to the tda998x driver:
> > > 
> > > - simplify the i2c read/write
> > > - code cleanup and fix some small errors
> > > - use global constants
> > > - don't read write-only registers
> > > - add DT support
> > > - use IRQ for connection status and EDID read
> > 
> > I discussed these patches with Rob Clark recently, and the conclusion
> > we came to is that I'll merge them into a git tree, test them, and
> > once I'm happy I'll send a pull request as appropriate.
> > 
> > I'll go through them later today.  Those patches which have been re-
> > posted without any change for the last few times (the first few) I'll
> > take into my git tree today so you don't have to keep re-posting them
> > (more importantly, I won't have to keep on looking at them either.)
> 
> Thanks.
> 
> BTW, I found some problems with the patch 12 'add DT support' you
> already acked:
> 
> - the .of_match_table is not needed because the i2c client is created by
>   the i2c subsystem from the 'reg' in the DT,

Okay - may it be a good idea to have someone knowledgable of I2C give it
a review?

> - on encoder_destroy(), the function drm_i2c_encoder_destroy()
>   unregisters the i2c client, so, with a DT, a second encoder_init()
>   would crash.

I think this is one of the down-sides of trying to bolt DT into this:
the drm encoder slave support is not designed to cope with an i2c client
device pre-created.

In fact, I can't see how this stuff comes anywhere close to working in
a DT setup: in such a scenario, you declare that there's a tda998x
device in DT.  I2C parses this, and creates an i2c_client itself for
the tda998x.

When the TDA998x driver initialises, it finds this i2c client and
binds to it, calling tda998x_probe(), which does nothing.

However, the only way to attach a slave encoder to a DRM device is via
a call to drm_i2c_encoder_init(), which unconditionally calls
i2c_new_device().  This creates a _new_ i2c_client structure, again
unconditionally, for the tda998x.  This must be bound by the I2C
subsystem to a driver - hopefully the tda998x driver, which then
calls it's encoder_init function.

None of this will happen if DT has already created an i2c_client at
the appropriate address, because DRMs i2c_new_device() will fail.

My hypothesis is that you have other patches to I2C and/or DRM to
sort this out which you haven't been posting with this series.  So,
could you please provide some hints as to how this works?

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

WARNING: multiple messages have this Message-ID (diff)
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Jean-Francois Moine <moinejf@free.fr>
Cc: Rob Clark <robdclark@gmail.com>, Dave Airlie <airlied@gmail.com>,
	linux-arm-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 00/23]
Date: Sun, 2 Feb 2014 18:23:49 +0000	[thread overview]
Message-ID: <20140202182349.GJ26684@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20140202190606.6fa193ce@armhf>

On Sun, Feb 02, 2014 at 07:06:06PM +0100, Jean-Francois Moine wrote:
> On Sun, 2 Feb 2014 12:43:58 +0000
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> 
> > On Wed, Jan 29, 2014 at 10:01:22AM +0100, Jean-Francois Moine wrote:
> > > This patch set contains various extensions to the tda998x driver:
> > > 
> > > - simplify the i2c read/write
> > > - code cleanup and fix some small errors
> > > - use global constants
> > > - don't read write-only registers
> > > - add DT support
> > > - use IRQ for connection status and EDID read
> > 
> > I discussed these patches with Rob Clark recently, and the conclusion
> > we came to is that I'll merge them into a git tree, test them, and
> > once I'm happy I'll send a pull request as appropriate.
> > 
> > I'll go through them later today.  Those patches which have been re-
> > posted without any change for the last few times (the first few) I'll
> > take into my git tree today so you don't have to keep re-posting them
> > (more importantly, I won't have to keep on looking at them either.)
> 
> Thanks.
> 
> BTW, I found some problems with the patch 12 'add DT support' you
> already acked:
> 
> - the .of_match_table is not needed because the i2c client is created by
>   the i2c subsystem from the 'reg' in the DT,

Okay - may it be a good idea to have someone knowledgable of I2C give it
a review?

> - on encoder_destroy(), the function drm_i2c_encoder_destroy()
>   unregisters the i2c client, so, with a DT, a second encoder_init()
>   would crash.

I think this is one of the down-sides of trying to bolt DT into this:
the drm encoder slave support is not designed to cope with an i2c client
device pre-created.

In fact, I can't see how this stuff comes anywhere close to working in
a DT setup: in such a scenario, you declare that there's a tda998x
device in DT.  I2C parses this, and creates an i2c_client itself for
the tda998x.

When the TDA998x driver initialises, it finds this i2c client and
binds to it, calling tda998x_probe(), which does nothing.

However, the only way to attach a slave encoder to a DRM device is via
a call to drm_i2c_encoder_init(), which unconditionally calls
i2c_new_device().  This creates a _new_ i2c_client structure, again
unconditionally, for the tda998x.  This must be bound by the I2C
subsystem to a driver - hopefully the tda998x driver, which then
calls it's encoder_init function.

None of this will happen if DT has already created an i2c_client at
the appropriate address, because DRMs i2c_new_device() will fail.

My hypothesis is that you have other patches to I2C and/or DRM to
sort this out which you haven't been posting with this series.  So,
could you please provide some hints as to how this works?

-- 
FTTC broadband for 0.8mile line: 5.8Mbps down 500kbps up.  Estimation
in database were 13.1 to 19Mbit for a good line, about 7.5+ for a bad.
Estimate before purchase was "up to 13.2Mbit".

  reply	other threads:[~2014-02-02 18:24 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29  9:01 [PATCH v5 00/23] Jean-Francois Moine
2014-01-29  9:01 ` Jean-Francois Moine
2014-01-29  9:01 ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 23/23] drm/i2c: tda998x: adjust the audio clock divider for S/PDIF Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 17/23] drm/i2c: tda998x: set the PLL division factor in range 0..3 Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-29 15:16   ` Joe Perches
2014-01-29 15:16     ` Joe Perches
2014-01-25 17:14 ` [PATCH v5 16/23] drm/i2c: tda998x: fix the ENABLE_SPACE register Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 15/23] drm/i2c: tda998x: add DT documentation Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 13/23] drm/i2c: tda998x: always enable EDID read IRQ Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 14/23] drm/i2c: tda998x: use irq for connection status and EDID read Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 22/23] drm/i2c: tda998x: code optimization Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 21/23] drm/i2c: tda998x: change the frequence in the audio channel Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 20/23] drm/i2c: tda998x: add the active aspect in HDMI AVI frame Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 18/23] drm/i2c: tda998x: make the audio code more readable Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 19/23] drm/i2c: tda998x: remove the unused variable ca_i2s Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 08/23] drm/i2c: tda998x: use HDMI constants Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 12/23] drm/i2c: tda998x: add DT support Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 09/23] drm/i2c: tda998x: don't read write-only registers Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-02-02 16:23   ` Russell King - ARM Linux
2014-02-02 16:23     ` Russell King - ARM Linux
2014-02-02 17:45     ` Jean-Francois Moine
2014-02-02 17:45       ` Jean-Francois Moine
2014-02-02 17:45       ` Jean-Francois Moine
2014-02-02 17:57       ` Russell King - ARM Linux
2014-02-02 17:57         ` Russell King - ARM Linux
2014-01-25 17:14 ` [PATCH v5 10/23] drm/i2c: tda998x: free the CEC device on encoder_destroy Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 11/23] drm/i2c: tda998x: check the CEC device creation Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 07/23] drm/i2c: tda998x: fix bad value in the AIF Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 05/23] drm/i2c: tda998x: don't freeze the system at audio startup time Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 02/23] drm/i2c: tda998x: check more I/O errors Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-02-02 16:20   ` Russell King - ARM Linux
2014-02-02 16:20     ` Russell King - ARM Linux
2014-02-02 17:30     ` Jean-Francois Moine
2014-02-02 17:30       ` Jean-Francois Moine
2014-02-02 17:30       ` Jean-Francois Moine
2014-02-02 17:56       ` Russell King - ARM Linux
2014-02-02 17:56         ` Russell King - ARM Linux
2014-01-25 17:14 ` [PATCH v5 06/23] drm/i2c: tda998x: force the page register at startup time Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 03/23] drm/i2c: tda998x: code cleanup Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 04/23] drm/i2c: tda998x: change probe message origin Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14 ` [PATCH v5 01/23] drm/i2c: tda998x: simplify the i2c read/write functions Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-01-25 17:14   ` Jean-Francois Moine
2014-02-02 12:43 ` [PATCH v5 00/23] Russell King - ARM Linux
2014-02-02 12:43   ` Russell King - ARM Linux
2014-02-02 12:43   ` Russell King - ARM Linux
2014-02-02 18:04   ` Russell King - ARM Linux
2014-02-02 18:04     ` Russell King - ARM Linux
2014-02-02 19:00     ` Jean-Francois Moine
2014-02-02 19:00       ` Jean-Francois Moine
2014-02-02 19:00       ` Jean-Francois Moine
2014-02-02 18:06   ` Jean-Francois Moine
2014-02-02 18:06     ` Jean-Francois Moine
2014-02-02 18:23     ` Russell King - ARM Linux [this message]
2014-02-02 18:23       ` Russell King - ARM Linux
2014-02-02 18:23       ` Russell King - ARM Linux
2014-02-02 18:41       ` Sebastian Hesselbarth
2014-02-02 18:41         ` Sebastian Hesselbarth
2014-02-02 18:54       ` Jean-Francois Moine
2014-02-02 18:54         ` Jean-Francois Moine
2014-02-02 18:54         ` Jean-Francois Moine
2014-02-02 19:15         ` Russell King - ARM Linux
2014-02-02 19:15           ` Russell King - ARM Linux
2014-02-02 20:07           ` Jean-Francois Moine
2014-02-02 20:07             ` Jean-Francois Moine
2014-02-02 20:07             ` Jean-Francois Moine
2014-02-03 12:46     ` Mark Brown
2014-02-03 12:46       ` Mark Brown

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=20140202182349.GJ26684@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=airlied@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moinejf@free.fr \
    --cc=robdclark@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.