All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Stephen Boyd <sboyd@kernel.org>,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Emma Anholt <emma@anholt.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Maxime Ripard <mripard@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org,
	Dom Cobley <popcornmix@gmail.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum
Date: Thu, 15 Sep 2022 08:15:48 +0200	[thread overview]
Message-ID: <5b64f4ef-a62e-80df-80a6-3ab52589588b@i2se.com> (raw)
In-Reply-To: <20220914182101.92286C433D6@smtp.kernel.org>

Hi Stephen,

Am 14.09.22 um 20:20 schrieb Stephen Boyd:
> Quoting Stefan Wahren (2022-09-14 11:09:04)
>> Am 14.09.22 um 20:05 schrieb Stephen Boyd:
>>> Quoting Stefan Wahren (2022-09-14 10:45:48)
>>>> Am 14.09.22 um 17:50 schrieb Stephen Boyd:
>>>>> Furthermore, I wonder if even that part needs to be implemented.  Why
>>>>> not make a direct call to rpi_firmware_property() and get the max rate?
>>>>> All of that can live in the drm driver. Making it a generic API that
>>>>> takes a 'struct clk' means that it looks like any clk can be passed,
>>>>> when that isn't true. It would be better to restrict it to the one use
>>>>> case so that the scope of the problem doesn't grow. I understand that it
>>>>> duplicates a few lines of code, but that looks like a fair tradeoff vs.
>>>>> exposing an API that can be used for other clks in the future.
>>>> it would be nice to keep all the Rpi specific stuff out of the DRM
>>>> driver, since there more users of it.
>>> Instead of 'all' did you mean 'any'?
>> yes
> Another idea is to populate an OPP table in the rpi firmware driver for
> this platform device with the adjusted max frequency. That would be an
> SoC/firmware agnostic interface that expresses the constraints.
Do you mean in the source code of this driver or in the DT?
> I'm
> almost certain we talked about this before.
I'm not sure about the context. Do you mean the CPU frequency handling? 
I remember it was a hard decision. In the end it was little benefit but 
a lot of disadvantages (hard to maintain all theses OPP tables for all 
Raspberry Pi boards, doesn't work with already deployed DT). So yes, i'm 
part of the problem i mentioned before ;-)


WARNING: multiple messages have this Message-ID (diff)
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Stephen Boyd <sboyd@kernel.org>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Emma Anholt <emma@anholt.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Maxime Ripard <mripard@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>
Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-rpi-kernel@lists.infradead.org,
	Dom Cobley <popcornmix@gmail.com>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum
Date: Thu, 15 Sep 2022 08:15:48 +0200	[thread overview]
Message-ID: <5b64f4ef-a62e-80df-80a6-3ab52589588b@i2se.com> (raw)
In-Reply-To: <20220914182101.92286C433D6@smtp.kernel.org>

Hi Stephen,

Am 14.09.22 um 20:20 schrieb Stephen Boyd:
> Quoting Stefan Wahren (2022-09-14 11:09:04)
>> Am 14.09.22 um 20:05 schrieb Stephen Boyd:
>>> Quoting Stefan Wahren (2022-09-14 10:45:48)
>>>> Am 14.09.22 um 17:50 schrieb Stephen Boyd:
>>>>> Furthermore, I wonder if even that part needs to be implemented.  Why
>>>>> not make a direct call to rpi_firmware_property() and get the max rate?
>>>>> All of that can live in the drm driver. Making it a generic API that
>>>>> takes a 'struct clk' means that it looks like any clk can be passed,
>>>>> when that isn't true. It would be better to restrict it to the one use
>>>>> case so that the scope of the problem doesn't grow. I understand that it
>>>>> duplicates a few lines of code, but that looks like a fair tradeoff vs.
>>>>> exposing an API that can be used for other clks in the future.
>>>> it would be nice to keep all the Rpi specific stuff out of the DRM
>>>> driver, since there more users of it.
>>> Instead of 'all' did you mean 'any'?
>> yes
> Another idea is to populate an OPP table in the rpi firmware driver for
> this platform device with the adjusted max frequency. That would be an
> SoC/firmware agnostic interface that expresses the constraints.
Do you mean in the source code of this driver or in the DT?
> I'm
> almost certain we talked about this before.
I'm not sure about the context. Do you mean the CPU frequency handling? 
I remember it was a hard decision. In the end it was little benefit but 
a lot of disadvantages (hard to maintain all theses OPP tables for all 
Raspberry Pi boards, doesn't work with already deployed DT). So yes, i'm 
part of the problem i mentioned before ;-)


WARNING: multiple messages have this Message-ID (diff)
From: Stefan Wahren <stefan.wahren@i2se.com>
To: Stephen Boyd <sboyd@kernel.org>,
	Broadcom internal kernel review list
	<bcm-kernel-feedback-list@broadcom.com>,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@linux.ie>,
	Emma Anholt <emma@anholt.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Maxime Ripard <maxime@cerno.tech>,
	Maxime Ripard <mripard@kernel.org>,
	Michael Turquette <mturquette@baylibre.com>,
	Ray Jui <rjui@broadcom.com>,
	Scott Branden <sbranden@broadcom.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-rpi-kernel@lists.infradead.org,
	dri-devel@lists.freedesktop.org,
	Dom Cobley <popcornmix@gmail.com>,
	linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum
Date: Thu, 15 Sep 2022 08:15:48 +0200	[thread overview]
Message-ID: <5b64f4ef-a62e-80df-80a6-3ab52589588b@i2se.com> (raw)
In-Reply-To: <20220914182101.92286C433D6@smtp.kernel.org>

Hi Stephen,

Am 14.09.22 um 20:20 schrieb Stephen Boyd:
> Quoting Stefan Wahren (2022-09-14 11:09:04)
>> Am 14.09.22 um 20:05 schrieb Stephen Boyd:
>>> Quoting Stefan Wahren (2022-09-14 10:45:48)
>>>> Am 14.09.22 um 17:50 schrieb Stephen Boyd:
>>>>> Furthermore, I wonder if even that part needs to be implemented.  Why
>>>>> not make a direct call to rpi_firmware_property() and get the max rate?
>>>>> All of that can live in the drm driver. Making it a generic API that
>>>>> takes a 'struct clk' means that it looks like any clk can be passed,
>>>>> when that isn't true. It would be better to restrict it to the one use
>>>>> case so that the scope of the problem doesn't grow. I understand that it
>>>>> duplicates a few lines of code, but that looks like a fair tradeoff vs.
>>>>> exposing an API that can be used for other clks in the future.
>>>> it would be nice to keep all the Rpi specific stuff out of the DRM
>>>> driver, since there more users of it.
>>> Instead of 'all' did you mean 'any'?
>> yes
> Another idea is to populate an OPP table in the rpi firmware driver for
> this platform device with the adjusted max frequency. That would be an
> SoC/firmware agnostic interface that expresses the constraints.
Do you mean in the source code of this driver or in the DT?
> I'm
> almost certain we talked about this before.
I'm not sure about the context. Do you mean the CPU frequency handling? 
I remember it was a hard decision. In the end it was little benefit but 
a lot of disadvantages (hard to maintain all theses OPP tables for all 
Raspberry Pi boards, doesn't work with already deployed DT). So yes, i'm 
part of the problem i mentioned before ;-)


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2022-09-15  6:16 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-15 15:31 [PATCH v1 0/7] drm/vc4: Fix the core clock behaviour Maxime Ripard
2022-08-15 15:31 ` Maxime Ripard
2022-08-15 15:31 ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 1/7] clk: bcm: rpi: Create helper to retrieve private data Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 2/7] clk: bcm: rpi: Add a function to retrieve the maximum Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-09-14 15:50   ` Stephen Boyd
2022-09-14 15:50     ` Stephen Boyd
2022-09-14 15:50     ` Stephen Boyd
2022-09-14 16:15     ` Maxime Ripard
2022-09-14 16:15       ` Maxime Ripard
2022-09-14 16:15       ` Maxime Ripard
2022-09-14 18:07       ` Stephen Boyd
2022-09-14 18:07         ` Stephen Boyd
2022-09-14 18:07         ` Stephen Boyd
2022-09-14 17:45     ` Stefan Wahren
2022-09-14 17:45       ` Stefan Wahren
2022-09-14 17:45       ` Stefan Wahren
2022-09-14 18:05       ` Stephen Boyd
2022-09-14 18:05         ` Stephen Boyd
2022-09-14 18:05         ` Stephen Boyd
2022-09-14 18:09         ` Stefan Wahren
2022-09-14 18:09           ` Stefan Wahren
2022-09-14 18:09           ` Stefan Wahren
2022-09-14 18:14           ` Stephen Boyd
2022-09-14 18:14             ` Stephen Boyd
2022-09-14 18:14             ` Stephen Boyd
2022-09-14 18:26             ` Stefan Wahren
2022-09-14 18:26               ` Stefan Wahren
2022-09-14 18:26               ` Stefan Wahren
2022-09-15  7:54               ` Maxime Ripard
2022-09-15  7:54                 ` Maxime Ripard
2022-09-15  7:54                 ` Maxime Ripard
2022-09-15 11:30                 ` Stefan Wahren
2022-09-15 11:30                   ` Stefan Wahren
2022-09-15 11:30                   ` Stefan Wahren
2022-09-15 11:38                   ` Maxime Ripard
2022-09-15 11:38                     ` Maxime Ripard
2022-09-15 11:38                     ` Maxime Ripard
2022-09-14 18:20           ` Stephen Boyd
2022-09-14 18:20             ` Stephen Boyd
2022-09-14 18:20             ` Stephen Boyd
2022-09-15  6:15             ` Stefan Wahren [this message]
2022-09-15  6:15               ` Stefan Wahren
2022-09-15  6:15               ` Stefan Wahren
2022-09-15  9:55             ` Maxime Ripard
2022-09-15  9:55               ` Maxime Ripard
2022-09-15  9:55               ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 3/7] clk: bcm: rpi: Add a function to retrieve the minimum Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 4/7] drm/vc4: hdmi: Fix hdmi_enable_4kp60 detection Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 5/7] drm/vc4: hdmi: Rework hdmi_enable_4kp60 detection code Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 6/7] drm/vc4: hdmi: Add more checks for 4k resolutions Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31 ` [PATCH v1 7/7] drm/vc4: Make sure we don't end up with a core clock too high Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-15 15:31   ` Maxime Ripard
2022-08-29 15:11 ` [PATCH v1 0/7] drm/vc4: Fix the core clock behaviour Maxime Ripard
2022-08-29 15:11   ` Maxime Ripard
2022-08-29 15:11   ` Maxime Ripard

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=5b64f4ef-a62e-80df-80a6-3ab52589588b@i2se.com \
    --to=stefan.wahren@i2se.com \
    --cc=airlied@linux.ie \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emma@anholt.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=maxime@cerno.tech \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=popcornmix@gmail.com \
    --cc=rjui@broadcom.com \
    --cc=sboyd@kernel.org \
    --cc=sbranden@broadcom.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.