devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Nishanth Menon <nm@ti.com>
Cc: Brandon Brnich <b-brnich@ti.com>,
	Nas Chung <nas.chung@chipsnmedia.com>,
	Jackson Lee <jackson.lee@chipsnmedia.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Darren Etheridge <detheridge@ti.com>
Subject: Re: [PATCH v2] dt-bindings: media: Add sram-size Property for Wave5
Date: Fri, 2 Feb 2024 17:08:05 +0100	[thread overview]
Message-ID: <adfef53c-d64e-4855-ab61-101b6fa419e5@linaro.org> (raw)
In-Reply-To: <20240202155813.szxvi7bfp5xh7rvw@babble>

On 02/02/2024 16:58, Nishanth Menon wrote:
> On 14:56-20240202, Krzysztof Kozlowski wrote:
>> On 02/02/2024 13:52, Nishanth Menon wrote:
>>> On 11:47-20240202, Krzysztof Kozlowski wrote:
>>>> On 01/02/2024 19:42, Brandon Brnich wrote:
>>>>> Wave521c has capability to use SRAM carveout to store reference data with
>>>>> purpose of reducing memory bandwidth. To properly use this pool, the driver
>>>>> expects to have an sram and sram-size node. Without sram-size node, driver
>>>>> will default value to zero, making sram node irrelevant.
>>>>
>>>> I am sorry, but what driver expects should not be rationale for new
>>>> property. This justification suggests clearly it is not a property for DT.
>>>>
>>>
>>> Yup, the argumentation in the commit message is from the wrong
>>> perspective. bindings are OS agnostic hardware description, and what
>>> driver does with the description is driver's problem.
>>>
>>> I will at least paraphrase my understanding:
>>> In this case, however, the hardware block will limp along with
>>> the usage of DDR (as is the current description), due to the
>>> latencies involved for DDR accesses. However, the hardware block
>>> has capability to use a substantially lower latency SRAM to provide
>>> proper performance and hence for example, deal with higher resolution
>>> data streams. This SRAM is instantiated at SoC level rather than
>>> embedded within the hardware block itself.
>>
>> That sounds like OS policy. Why would different boards with the same
>> component have this set differently? Based on amount of available
>> memory? This, I believe, is runtime configuration because it might
>> depend on user-space you run. Based on purpose (e.g. optimize for
>> decoding or general usage)? Again, run-time because same hardware board
>> can be used for different purposes.
>>
> 
> Why is this OS policy? It is a hardware capability.

How amount of SRAM size is hardware capability? Each hardware can work
probably with 1, 2 or 100 pages.

> Traditionally
> many similar hardware blocks would have allocated local SRAM for
> worst case inside the hardware block itself and don't need to use
> DDR in the first place. However, for this hardware block, it has
> capability to use some part of one of the many SRAM blocks in the SoC,
> not be shared for some part of the system - so from a hardware
> description perspective, we will need to call that out as to which
> SRAM is available for the hardware block.

Just because more than one device wants some memory, does not mean this
is hardware property. Drivers can ask how much memory available there
is. OS knows how many users of memory there is, so knows how much to
allocate for each device.

> 
> Why would different boards need this differently? simply because
> different cameras have different resolution and framerates - and you
> dont want to pay the worst case sram penalty for all product
> configuration.

Choice of resolution and framerate is runtime choice or use-case
dependent, not board level configuration, therefore amount of SRAM size
to use is as well.

> 
> Further, Linux is not the only thing that runs on these SoCs.. these are
> mixed systems with autonomous operations of uC cores who may or maynot
> (typically not) even need to communicate with MPU to state which part of
> resource they are hogging (hence the board level definition).

OK that could be the case but I could also say choice of RTOS or any
other is also board-independent.

Best regards,
Krzysztof


  reply	other threads:[~2024-02-02 16:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-01 18:42 [PATCH v2] dt-bindings: media: Add sram-size Property for Wave5 Brandon Brnich
2024-02-02 10:47 ` Krzysztof Kozlowski
2024-02-02 12:52   ` Nishanth Menon
2024-02-02 13:56     ` Krzysztof Kozlowski
2024-02-02 15:58       ` Nishanth Menon
2024-02-02 16:08         ` Krzysztof Kozlowski [this message]
2024-02-05 14:12           ` Nishanth Menon
2024-02-05 18:51             ` Andrew Davis
2024-02-05 19:20             ` Brandon Brnich
2024-02-08  6:22               ` Devarsh Thakkar
2024-02-09 17:42                 ` Nicolas Dufresne
2024-02-12 10:57                   ` Devarsh Thakkar
2024-02-09 17:33               ` Nicolas Dufresne
2024-02-09 17:22     ` Nicolas Dufresne
2024-02-02 21:06 ` Rob Herring

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=adfef53c-d64e-4855-ab61-101b6fa419e5@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=b-brnich@ti.com \
    --cc=conor+dt@kernel.org \
    --cc=detheridge@ti.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jackson.lee@chipsnmedia.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=nas.chung@chipsnmedia.com \
    --cc=nm@ti.com \
    --cc=robh+dt@kernel.org \
    --cc=vigneshr@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 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).