linux-mediatek.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@codeaurora.org>
To: Bryan O'Donoghue <pure.logic@nexus-software.ie>
Cc: linux-mips@linux-mips.org, mturquette@baylibre.com,
	dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org,
	linux-rtc@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	Mikko Perttunen <cyndis@kapsi.fi>,
	linux-rockchip@lists.infradead.org, linux-media@vger.kernel.org,
	uclinux-h8-devel@lists.sourceforge.jp,
	linux-arm-msm@vger.kernel.org,
	linux-mediatek@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org,
	linux-tegra@vger.kernel.org, linux-amlogic@lists.infradead.org,
	linux-omap@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	patches@opensource.cirrus.com, linux-kernel@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org,
	freedreno@lists.freedesktop.org
Subject: Re: [PATCH 01/33] clk_ops: change round_rate() to return unsigned long
Date: Tue, 2 Jan 2018 11:01:59 -0800	[thread overview]
Message-ID: <20180102190159.GH7997@codeaurora.org> (raw)
In-Reply-To: <6d83a5c3-6589-24bc-4ca5-4d1bbca47432@nexus-software.ie>

On 12/31, Bryan O'Donoghue wrote:
> On 30/12/17 16:36, Mikko Perttunen wrote:
> >FWIW, we had this problem some years ago with the Tegra CPU clock
> >- then it was determined that a simpler solution was to have the
> >determine_rate callback support unsigned long rates - so clock
> >drivers that need to return rates higher than 2^31 can instead
> >implement the determine_rate callback. That is what's currently
> >implemented.
> >
> >Mikko
> 
> Granted we could work around it but, having both zero and less than
> zero indicate error means you can't support larger than LONG_MAX
> which is I think worth fixing.
> 

Ok. But can you implement the determine_rate op instead of the
round_rate op for your clk? It's not a work-around, it's the
preferred solution. That would allow rates larger than 2^31 for
the clk without pushing through a change to all the drivers to
express zero as "error" and non-zero as the rounded rate.

I'm not entirely opposed to this approach, because we probably
don't care to pass the particular error value from a clk provider
to a clk consumer about what the error is. It's actually what we
proposed as the solution for clk_round_rate() to return values
larger than LONG_MAX to consumers. But doing that consumer API
change or this provider side change is going to require us to
evaluate all the consumers of these clks to make sure they don't
check for some error value that's less than zero. This series
does half the work, by changing the provider side, while ignoring
the consumer side and any potential fallout of the less than zero
to zero return value change.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2018-01-02 19:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1514596392-22270-1-git-send-email-pure.logic@nexus-software.ie>
2017-12-30  1:12 ` [PATCH 01/33] clk_ops: change round_rate() to return unsigned long Bryan O'Donoghue
     [not found]   ` <1514596392-22270-2-git-send-email-pure.logic-SyKdqv6vbfZdzvEItQ6vdLNAH6kLmebB@public.gmane.org>
2017-12-30 16:36     ` Mikko Perttunen
     [not found]       ` <9f4bef5a-8a71-6f30-5cfb-5e8fe133e3d3-/1wQRMveznE@public.gmane.org>
2017-12-31 13:40         ` Bryan O'Donoghue
2018-01-02 19:01           ` Stephen Boyd [this message]
     [not found]             ` <20180102190159.GH7997-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2018-01-02 20:43               ` Bryan O'Donoghue
     [not found]                 ` <c2212d56-a8b5-cba5-46a7-c2c7f66e752b-SyKdqv6vbfZdzvEItQ6vdLNAH6kLmebB@public.gmane.org>
2018-01-02 23:28                   ` Stephen Boyd
2018-01-01 14:41     ` kbuild test robot
2018-01-01 14:47   ` kbuild test robot
2018-01-01 18:01   ` kbuild test robot

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=20180102190159.GH7997@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=cyndis@kapsi.fi \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=patches@opensource.cirrus.com \
    --cc=pure.logic@nexus-software.ie \
    --cc=uclinux-h8-devel@lists.sourceforge.jp \
    /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).