All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrzej Hajda <a.hajda@samsung.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "moderated list:ARM/S5P EXYNOS AR..."
	<linux-samsung-soc@vger.kernel.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	open list <linux-kernel@vger.kernel.org>,
	dri-devel@lists.freedesktop.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"moderated list:ARM/S5P EXYNOS AR..."
	<linux-arm-kernel@lists.infradead.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Subject: Re: [PATCH RFC 3/3] drm/exynos: use pending_components for	components tracking
Date: Tue, 22 Apr 2014 10:43:16 +0200	[thread overview]
Message-ID: <53562BA4.6020902@samsung.com> (raw)
In-Reply-To: <20140418124202.GD24070@n2100.arm.linux.org.uk>

Hi Russel,

My answer little bit later due to Easter.

On 04/18/2014 02:42 PM, Russell King - ARM Linux wrote:
> On Fri, Apr 18, 2014 at 01:27:53PM +0200, Andrzej Hajda wrote:
>> Hi Russel,
>>
>> Thanks for comments.
>>
>> On 04/17/2014 11:47 PM, Russell King - ARM Linux wrote:
>>> On Thu, Apr 17, 2014 at 01:28:50PM +0200, Andrzej Hajda wrote:
>>>> +out:
>>>> +	if (ret != -EPROBE_DEFER)
>>>> +		exynos_drm_dev_ready(&pdev->dev);
>>> So we end up with everyone needing a "ready" call in each sub-driver
>>> back into the main driver... this makes it impossible to write a
>>> generic subcomponent driver which is not tied in any way to the
>>> main driver.
>>>
>>> That is quite some restriction, and would prevent, for example, the
>>> TDA998x driver being used both with Armada DRM, tilcdc and any other
>>> driver.
>> As I see in armada driver drm is deferred in case tda998x is not yet
>> available. The same solution can be still used with pending_devices
>> approach - the main driver will not report its readiness until tda998x
>> is present.
>>
>> Anyway it still seems to be better than componentize every driver which can
>> probably become a part of some superdevice.
>>
>> If you want to get rid of deferred probe one can make global list of
>> 'ready' devices with notifications systems for master devices.
>>
>> Maybe it would be good to consider notification system for devices probe
>> result,
>> it will require that driver register all its interfaces in probe, ie its
>> readiness cannot
>> be reported later but will not require to add new framework. I hope just
>> extending current
>> notification system should be enough.
> You aren't addressing my point.  If I were to convert tda998x to use
> your infrastructure, then I would have to add in ifdefs to tie it into
> armada DRM _and_ a different set of ifdefs to tie it into tilcdc.  Then
> when someone else wanted to use it in their driver, they'd have to add
> yet more ifdefs into it to tie it into their driver.
>
> This does not scale.

As I already answered, you should not use 'my' framework for tda998x
driver, you can still use current approach with deferred probe. I am not
sure
why have you used ifdefs in armada, tilcdc also uses tda998x and without
ifdefs.

'My' framework (I think helper library is a better name) was created to
use with
devices which are closely tied together by another framework - case
of some SoC devices.


>
> So, please address my point: in your system, how can a single component
> be shared between multiple different master drivers?
>

I have answered this question above, again. But your question suggests
you want to componentize
also drivers which are shared by different DRMs. How do you want to do it?
- componentize all DRM drivers sharing given driver?
- componentize shared device in a way that it can used by
non-componentized devices? how? I guess it
will be possible but will have some price.

Regards
Andrzej

WARNING: multiple messages have this Message-ID (diff)
From: a.hajda@samsung.com (Andrzej Hajda)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH RFC 3/3] drm/exynos: use pending_components for	components tracking
Date: Tue, 22 Apr 2014 10:43:16 +0200	[thread overview]
Message-ID: <53562BA4.6020902@samsung.com> (raw)
In-Reply-To: <20140418124202.GD24070@n2100.arm.linux.org.uk>

Hi Russel,

My answer little bit later due to Easter.

On 04/18/2014 02:42 PM, Russell King - ARM Linux wrote:
> On Fri, Apr 18, 2014 at 01:27:53PM +0200, Andrzej Hajda wrote:
>> Hi Russel,
>>
>> Thanks for comments.
>>
>> On 04/17/2014 11:47 PM, Russell King - ARM Linux wrote:
>>> On Thu, Apr 17, 2014 at 01:28:50PM +0200, Andrzej Hajda wrote:
>>>> +out:
>>>> +	if (ret != -EPROBE_DEFER)
>>>> +		exynos_drm_dev_ready(&pdev->dev);
>>> So we end up with everyone needing a "ready" call in each sub-driver
>>> back into the main driver... this makes it impossible to write a
>>> generic subcomponent driver which is not tied in any way to the
>>> main driver.
>>>
>>> That is quite some restriction, and would prevent, for example, the
>>> TDA998x driver being used both with Armada DRM, tilcdc and any other
>>> driver.
>> As I see in armada driver drm is deferred in case tda998x is not yet
>> available. The same solution can be still used with pending_devices
>> approach - the main driver will not report its readiness until tda998x
>> is present.
>>
>> Anyway it still seems to be better than componentize every driver which can
>> probably become a part of some superdevice.
>>
>> If you want to get rid of deferred probe one can make global list of
>> 'ready' devices with notifications systems for master devices.
>>
>> Maybe it would be good to consider notification system for devices probe
>> result,
>> it will require that driver register all its interfaces in probe, ie its
>> readiness cannot
>> be reported later but will not require to add new framework. I hope just
>> extending current
>> notification system should be enough.
> You aren't addressing my point.  If I were to convert tda998x to use
> your infrastructure, then I would have to add in ifdefs to tie it into
> armada DRM _and_ a different set of ifdefs to tie it into tilcdc.  Then
> when someone else wanted to use it in their driver, they'd have to add
> yet more ifdefs into it to tie it into their driver.
>
> This does not scale.

As I already answered, you should not use 'my' framework for tda998x
driver, you can still use current approach with deferred probe. I am not
sure
why have you used ifdefs in armada, tilcdc also uses tda998x and without
ifdefs.

'My' framework (I think helper library is a better name) was created to
use with
devices which are closely tied together by another framework - case
of some SoC devices.


>
> So, please address my point: in your system, how can a single component
> be shared between multiple different master drivers?
>

I have answered this question above, again. But your question suggests
you want to componentize
also drivers which are shared by different DRMs. How do you want to do it?
- componentize all DRM drivers sharing given driver?
- componentize shared device in a way that it can used by
non-componentized devices? how? I guess it
will be possible but will have some price.

Regards
Andrzej

WARNING: multiple messages have this Message-ID (diff)
From: Andrzej Hajda <a.hajda@samsung.com>
To: Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: dri-devel@lists.freedesktop.org,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Inki Dae <inki.dae@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	"moderated list:ARM/S5P EXYNOS AR..." 
	<linux-samsung-soc@vger.kernel.org>,
	Tomasz Figa <t.figa@samsung.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	David Airlie <airlied@linux.ie>,
	open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/S5P EXYNOS AR..." 
	<linux-arm-kernel@lists.infradead.org>,
	Arnd Bergmann <arnd@arndb.de>
Subject: Re: [PATCH RFC 3/3] drm/exynos: use pending_components for	components tracking
Date: Tue, 22 Apr 2014 10:43:16 +0200	[thread overview]
Message-ID: <53562BA4.6020902@samsung.com> (raw)
In-Reply-To: <20140418124202.GD24070@n2100.arm.linux.org.uk>

Hi Russel,

My answer little bit later due to Easter.

On 04/18/2014 02:42 PM, Russell King - ARM Linux wrote:
> On Fri, Apr 18, 2014 at 01:27:53PM +0200, Andrzej Hajda wrote:
>> Hi Russel,
>>
>> Thanks for comments.
>>
>> On 04/17/2014 11:47 PM, Russell King - ARM Linux wrote:
>>> On Thu, Apr 17, 2014 at 01:28:50PM +0200, Andrzej Hajda wrote:
>>>> +out:
>>>> +	if (ret != -EPROBE_DEFER)
>>>> +		exynos_drm_dev_ready(&pdev->dev);
>>> So we end up with everyone needing a "ready" call in each sub-driver
>>> back into the main driver... this makes it impossible to write a
>>> generic subcomponent driver which is not tied in any way to the
>>> main driver.
>>>
>>> That is quite some restriction, and would prevent, for example, the
>>> TDA998x driver being used both with Armada DRM, tilcdc and any other
>>> driver.
>> As I see in armada driver drm is deferred in case tda998x is not yet
>> available. The same solution can be still used with pending_devices
>> approach - the main driver will not report its readiness until tda998x
>> is present.
>>
>> Anyway it still seems to be better than componentize every driver which can
>> probably become a part of some superdevice.
>>
>> If you want to get rid of deferred probe one can make global list of
>> 'ready' devices with notifications systems for master devices.
>>
>> Maybe it would be good to consider notification system for devices probe
>> result,
>> it will require that driver register all its interfaces in probe, ie its
>> readiness cannot
>> be reported later but will not require to add new framework. I hope just
>> extending current
>> notification system should be enough.
> You aren't addressing my point.  If I were to convert tda998x to use
> your infrastructure, then I would have to add in ifdefs to tie it into
> armada DRM _and_ a different set of ifdefs to tie it into tilcdc.  Then
> when someone else wanted to use it in their driver, they'd have to add
> yet more ifdefs into it to tie it into their driver.
>
> This does not scale.

As I already answered, you should not use 'my' framework for tda998x
driver, you can still use current approach with deferred probe. I am not
sure
why have you used ifdefs in armada, tilcdc also uses tda998x and without
ifdefs.

'My' framework (I think helper library is a better name) was created to
use with
devices which are closely tied together by another framework - case
of some SoC devices.


>
> So, please address my point: in your system, how can a single component
> be shared between multiple different master drivers?
>

I have answered this question above, again. But your question suggests
you want to componentize
also drivers which are shared by different DRMs. How do you want to do it?
- componentize all DRM drivers sharing given driver?
- componentize shared device in a way that it can used by
non-componentized devices? how? I guess it
will be possible but will have some price.

Regards
Andrzej




  reply	other threads:[~2014-04-22  8:43 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 11:28 [PATCH RFC 0/3] drm/exynos: refactoring drm initialization/cleanup code Andrzej Hajda
2014-04-17 11:28 ` Andrzej Hajda
2014-04-17 11:28 ` Andrzej Hajda
2014-04-17 11:28 ` [PATCH RFC 1/3] drm/exynos: refactor drm drivers registration code Andrzej Hajda
2014-04-17 11:28   ` Andrzej Hajda
2014-04-17 11:28   ` Andrzej Hajda
2014-04-17 11:28 ` [PATCH RFC 2/3] drivers/base: provide lightweight framework for componentized devices Andrzej Hajda
2014-04-17 11:28   ` Andrzej Hajda
2014-04-17 11:28   ` Andrzej Hajda
2014-04-17 11:28 ` [PATCH RFC 3/3] drm/exynos: use pending_components for components tracking Andrzej Hajda
2014-04-17 11:28   ` Andrzej Hajda
2014-04-17 11:28   ` Andrzej Hajda
2014-04-17 21:47   ` Russell King - ARM Linux
2014-04-17 21:47     ` Russell King - ARM Linux
2014-04-17 21:47     ` Russell King - ARM Linux
2014-04-18 11:27     ` Andrzej Hajda
2014-04-18 11:27       ` Andrzej Hajda
2014-04-18 11:27       ` Andrzej Hajda
2014-04-18 12:42       ` Russell King - ARM Linux
2014-04-18 12:42         ` Russell King - ARM Linux
2014-04-18 12:42         ` Russell King - ARM Linux
2014-04-22  8:43         ` Andrzej Hajda [this message]
2014-04-22  8:43           ` Andrzej Hajda
2014-04-22  8:43           ` Andrzej Hajda
2014-04-17 22:04   ` Russell King - ARM Linux
2014-04-17 22:04     ` Russell King - ARM Linux
2014-04-17 22:04     ` Russell King - ARM Linux
2014-04-18 12:02     ` Andrzej Hajda
2014-04-18 12:02       ` Andrzej Hajda
2014-04-18 12:02       ` Andrzej Hajda
2014-04-18 12:46       ` Russell King - ARM Linux
2014-04-18 12:46         ` Russell King - ARM Linux
2014-04-18 12:46         ` Russell King - ARM Linux
2014-04-22 11:29         ` Andrzej Hajda
2014-04-22 11:29           ` Andrzej Hajda
2014-04-22 11:29           ` Andrzej Hajda
2014-04-22 11:51           ` Russell King - ARM Linux
2014-04-22 11:51             ` Russell King - ARM Linux
2014-04-22 11:51             ` Russell King - ARM Linux
2014-04-23 15:04             ` Andrzej Hajda
2014-04-23 15:04               ` Andrzej Hajda
2014-04-23 15:04               ` Andrzej Hajda
2014-04-23 16:43               ` Russell King - ARM Linux
2014-04-23 16:43                 ` Russell King - ARM Linux
2014-04-23 16:43                 ` Russell King - ARM Linux
2014-04-23 17:13                 ` Russell King - ARM Linux
2014-04-23 17:13                   ` Russell King - ARM Linux
2014-04-23 17:13                   ` Russell King - ARM Linux
2014-04-25 14:36                   ` Andrzej Hajda
2014-04-25 14:36                     ` Andrzej Hajda
2014-04-26 15:30                     ` Russell King - ARM Linux
2014-04-26 15:30                       ` Russell King - ARM Linux

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=53562BA4.6020902@samsung.com \
    --to=a.hajda@samsung.com \
    --cc=arnd@arndb.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.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.