All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sekhar Nori <nsekhar@ti.com>
To: Mike Turquette <mturquette@linaro.org>
Cc: Afzal Mohammed <afzal@ti.com>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 12/12] video: da8xx-fb: set upstream clock rate (if reqd)
Date: Wed, 16 Jan 2013 05:14:10 +0000	[thread overview]
Message-ID: <50F63452.1060004@ti.com> (raw)
In-Reply-To: <20130115153222.23734.7924@quantum>

On 1/15/2013 9:02 PM, Mike Turquette wrote:
> Quoting Afzal Mohammed (2013-01-15 05:44:36)
>> LCDC IP has a clock divider to adjust pixel clock, this limits pixel
>> clock range to fck/255 - fck/2(fck - rate of input clock to LCDC IP).
>> In the case of AM335x, where this IP is present, default fck is not
>> sufficient to provide normal pixel clock rates, hence rendering this
>> driver unusable on AM335x.
>>
>> If input clock too is configurable, allowable range of pixel clock
>> would increase. Here initially it is checked whether with present fck,
>> divider in IP could be configured to obtain required rate, if not,
>> fck is adjusted. This makes it usable on AM335x.
>>
>> Note:
>> A better (if allowable) solution may be to represent clock divider in
>> LCDC IP as a basic divider clock - the one defined in common clock
>> framework. But for this to happen, all the platform's using this driver
>> should be using common clock framework (DaVinci is yet to be converted
>> to use common clock framework). And it has to be determined whether
>> common clock framework allows this kind of a clock modelling inside a
>> driver and for this to be part of clock tree. Advantage of doing so
>> would be better resolution for pixel clock, even though without this
>> existing use cases are working properly. Or another extreme alternative
>> would be to replicate clk-divider of common clock framework inside the
>> driver, but that probably is not preferred and not worth as it would be
>> duplication and without much advantage to existing users.
>>
> 
> Afzal,
> 
> Modeling the divider inside your IP block as a clock is supported in the
> common clock framework.  Linking up these sorts of clocks to the clock
> tree was one of the original design goals of CCF.
> 
> Regarding DaVinci: converting that platform over to use CCF would be the
> best approach.

This is work in progress. There are patches that have been posted. Work
has been slow on this though due to lack of bandwidth.

> An alternative would be that you could break
> single-image boot for AM335x and DaVinci, by having AM335x use CCF and
> DaVinci use the legacy clock framework.  From the LCDC driver's

Single image for DaVinci and AM335x is not possible anyway since ARMv5
and ARMv6+ cannot be supported in a single image.

> perspective this should not matter and is indeed the purpose of the
> clk.h api and clkdev interfaces, however looking at this driver I can
> see there would still be a lot ifdef-ery going on... better to just
> convert everything over to CCF.

Waiting for DaVinci CCF to complete will be too long a wait. Probably
convert to CCF just for AM335x ATM. There would be some ifdef'ry but
hopefully that need not be inside function bodies. Would have to see the
implementation, I guess.

Thanks,
Sekhar

WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: Mike Turquette <mturquette@linaro.org>
Cc: Afzal Mohammed <afzal@ti.com>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>,
	linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org,
	devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 12/12] video: da8xx-fb: set upstream clock rate (if reqd)
Date: Wed, 16 Jan 2013 10:32:10 +0530	[thread overview]
Message-ID: <50F63452.1060004@ti.com> (raw)
In-Reply-To: <20130115153222.23734.7924@quantum>

On 1/15/2013 9:02 PM, Mike Turquette wrote:
> Quoting Afzal Mohammed (2013-01-15 05:44:36)
>> LCDC IP has a clock divider to adjust pixel clock, this limits pixel
>> clock range to fck/255 - fck/2(fck - rate of input clock to LCDC IP).
>> In the case of AM335x, where this IP is present, default fck is not
>> sufficient to provide normal pixel clock rates, hence rendering this
>> driver unusable on AM335x.
>>
>> If input clock too is configurable, allowable range of pixel clock
>> would increase. Here initially it is checked whether with present fck,
>> divider in IP could be configured to obtain required rate, if not,
>> fck is adjusted. This makes it usable on AM335x.
>>
>> Note:
>> A better (if allowable) solution may be to represent clock divider in
>> LCDC IP as a basic divider clock - the one defined in common clock
>> framework. But for this to happen, all the platform's using this driver
>> should be using common clock framework (DaVinci is yet to be converted
>> to use common clock framework). And it has to be determined whether
>> common clock framework allows this kind of a clock modelling inside a
>> driver and for this to be part of clock tree. Advantage of doing so
>> would be better resolution for pixel clock, even though without this
>> existing use cases are working properly. Or another extreme alternative
>> would be to replicate clk-divider of common clock framework inside the
>> driver, but that probably is not preferred and not worth as it would be
>> duplication and without much advantage to existing users.
>>
> 
> Afzal,
> 
> Modeling the divider inside your IP block as a clock is supported in the
> common clock framework.  Linking up these sorts of clocks to the clock
> tree was one of the original design goals of CCF.
> 
> Regarding DaVinci: converting that platform over to use CCF would be the
> best approach.

This is work in progress. There are patches that have been posted. Work
has been slow on this though due to lack of bandwidth.

> An alternative would be that you could break
> single-image boot for AM335x and DaVinci, by having AM335x use CCF and
> DaVinci use the legacy clock framework.  From the LCDC driver's

Single image for DaVinci and AM335x is not possible anyway since ARMv5
and ARMv6+ cannot be supported in a single image.

> perspective this should not matter and is indeed the purpose of the
> clk.h api and clkdev interfaces, however looking at this driver I can
> see there would still be a lot ifdef-ery going on... better to just
> convert everything over to CCF.

Waiting for DaVinci CCF to complete will be too long a wait. Probably
convert to CCF just for AM335x ATM. There would be some ifdef'ry but
hopefully that need not be inside function bodies. Would have to see the
implementation, I guess.

Thanks,
Sekhar

WARNING: multiple messages have this Message-ID (diff)
From: Sekhar Nori <nsekhar@ti.com>
To: Mike Turquette <mturquette@linaro.org>
Cc: Afzal Mohammed <afzal@ti.com>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Grant Likely <grant.likely@secretlab.ca>,
	Rob Herring <rob.herring@calxeda.com>,
	Rob Landley <rob@landley.net>, <linux-omap@vger.kernel.org>,
	<linux-fbdev@vger.kernel.org>,
	<devicetree-discuss@lists.ozlabs.org>,
	<linux-doc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 12/12] video: da8xx-fb: set upstream clock rate (if reqd)
Date: Wed, 16 Jan 2013 10:32:10 +0530	[thread overview]
Message-ID: <50F63452.1060004@ti.com> (raw)
In-Reply-To: <20130115153222.23734.7924@quantum>

On 1/15/2013 9:02 PM, Mike Turquette wrote:
> Quoting Afzal Mohammed (2013-01-15 05:44:36)
>> LCDC IP has a clock divider to adjust pixel clock, this limits pixel
>> clock range to fck/255 - fck/2(fck - rate of input clock to LCDC IP).
>> In the case of AM335x, where this IP is present, default fck is not
>> sufficient to provide normal pixel clock rates, hence rendering this
>> driver unusable on AM335x.
>>
>> If input clock too is configurable, allowable range of pixel clock
>> would increase. Here initially it is checked whether with present fck,
>> divider in IP could be configured to obtain required rate, if not,
>> fck is adjusted. This makes it usable on AM335x.
>>
>> Note:
>> A better (if allowable) solution may be to represent clock divider in
>> LCDC IP as a basic divider clock - the one defined in common clock
>> framework. But for this to happen, all the platform's using this driver
>> should be using common clock framework (DaVinci is yet to be converted
>> to use common clock framework). And it has to be determined whether
>> common clock framework allows this kind of a clock modelling inside a
>> driver and for this to be part of clock tree. Advantage of doing so
>> would be better resolution for pixel clock, even though without this
>> existing use cases are working properly. Or another extreme alternative
>> would be to replicate clk-divider of common clock framework inside the
>> driver, but that probably is not preferred and not worth as it would be
>> duplication and without much advantage to existing users.
>>
> 
> Afzal,
> 
> Modeling the divider inside your IP block as a clock is supported in the
> common clock framework.  Linking up these sorts of clocks to the clock
> tree was one of the original design goals of CCF.
> 
> Regarding DaVinci: converting that platform over to use CCF would be the
> best approach.

This is work in progress. There are patches that have been posted. Work
has been slow on this though due to lack of bandwidth.

> An alternative would be that you could break
> single-image boot for AM335x and DaVinci, by having AM335x use CCF and
> DaVinci use the legacy clock framework.  From the LCDC driver's

Single image for DaVinci and AM335x is not possible anyway since ARMv5
and ARMv6+ cannot be supported in a single image.

> perspective this should not matter and is indeed the purpose of the
> clk.h api and clkdev interfaces, however looking at this driver I can
> see there would still be a lot ifdef-ery going on... better to just
> convert everything over to CCF.

Waiting for DaVinci CCF to complete will be too long a wait. Probably
convert to CCF just for AM335x ATM. There would be some ifdef'ry but
hopefully that need not be inside function bodies. Would have to see the
implementation, I guess.

Thanks,
Sekhar

  reply	other threads:[~2013-01-16  5:14 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-15 13:41 [PATCH v2 00/12] video: da8xx-fb: DT support Afzal Mohammed
2013-01-15 13:53 ` Afzal Mohammed
2013-01-15 13:41 ` Afzal Mohammed
     [not found] ` <cover.1358251447.git.afzal-l0cyMroinI0@public.gmane.org>
2013-01-15 13:41   ` [PATCH v2 01/12] video: da8xx-fb: make io operations safe Afzal Mohammed
2013-01-15 13:53     ` Afzal Mohammed
2013-01-15 13:41     ` Afzal Mohammed
2013-01-15 13:41   ` [PATCH v2 02/12] video: da8xx-fb: fix 24bpp raster configuration Afzal Mohammed
2013-01-15 13:53     ` Afzal Mohammed
2013-01-15 13:41     ` Afzal Mohammed
2013-01-15 13:42   ` [PATCH v2 04/12] video: da8xx-fb: use devres Afzal Mohammed
2013-01-15 13:54     ` Afzal Mohammed
2013-01-15 13:42     ` Afzal Mohammed
2013-01-15 13:42   ` [PATCH v2 06/12] video: da8xx-fb: reorganize panel detection Afzal Mohammed
2013-01-15 13:54     ` Afzal Mohammed
2013-01-15 13:42     ` Afzal Mohammed
2013-01-15 13:42 ` [PATCH v2 03/12] video: da8xx-fb: enable sync lost intr for v2 ip Afzal Mohammed
2013-01-15 13:54   ` Afzal Mohammed
2013-01-15 13:42   ` Afzal Mohammed
2013-01-15 13:42 ` [PATCH v2 05/12] video: da8xx-fb: ensure non-null cfg in pdata Afzal Mohammed
2013-01-15 13:54   ` Afzal Mohammed
2013-01-15 13:42   ` Afzal Mohammed
2013-01-15 13:42 ` [PATCH v2 07/12] video: da8xx-fb: minimal dt support Afzal Mohammed
2013-01-15 13:54   ` Afzal Mohammed
2013-01-15 13:42   ` Afzal Mohammed
2013-01-15 13:42 ` [PATCH v2 08/12] video: da8xx-fb: invoke platform callback safely Afzal Mohammed
2013-01-15 13:54   ` Afzal Mohammed
2013-01-15 13:42   ` Afzal Mohammed
2013-01-15 13:42 ` [PATCH v2 09/12] video: da8xx-fb: obtain fb_videomode info from dt Afzal Mohammed
2013-01-15 13:54   ` Afzal Mohammed
2013-01-15 13:42   ` Afzal Mohammed
2013-01-15 13:43 ` [PATCH v2 10/12] video: da8xx-fb: ensure pdata only for non-dt Afzal Mohammed
2013-01-15 13:55   ` Afzal Mohammed
2013-01-15 13:43   ` Afzal Mohammed
2013-01-15 13:43 ` [PATCH v2 11/12] video: da8xx-fb: setup struct lcd_ctrl_config for dt Afzal Mohammed
2013-01-15 13:55   ` Afzal Mohammed
2013-01-15 13:43   ` Afzal Mohammed
2013-01-15 13:44 ` [PATCH v2 12/12] video: da8xx-fb: set upstream clock rate (if reqd) Afzal Mohammed
2013-01-15 13:56   ` Afzal Mohammed
2013-01-15 13:44   ` Afzal Mohammed
2013-01-15 15:32   ` Mike Turquette
2013-01-15 15:32     ` Mike Turquette
2013-01-15 15:32     ` Mike Turquette
2013-01-16  5:02     ` Sekhar Nori [this message]
2013-01-16  5:14       ` Sekhar Nori
2013-01-16  5:02       ` Sekhar Nori
2013-01-23 13:00       ` Mohammed, Afzal
2013-01-23 13:00         ` Mohammed, Afzal
2013-01-23 13:00         ` Mohammed, Afzal

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=50F63452.1060004@ti.com \
    --to=nsekhar@ti.com \
    --cc=FlorianSchandinat@gmx.de \
    --cc=afzal@ti.com \
    --cc=devicetree-discuss@lists.ozlabs.org \
    --cc=grant.likely@secretlab.ca \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=rob.herring@calxeda.com \
    --cc=rob@landley.net \
    --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 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.