[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <i6m7svnr6zutg57leeamepj67ajgddwe2phs6rluyozeg3m37p@jfkrlqss26rz>
Date: Thu, 21 Mar 2024 14:03:21 +0300
From: Ivan Bornyakov <brnkv.i1@...il.com>
To: Nas Chung <nas.chung@...psnmedia.com>
Cc: Brandon Brnich <b-brnich@...com>,
Philipp Zabel <p.zabel@...gutronix.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>, Conor Dooley <conor+dt@...nel.org>,
"linux-media@...r.kernel.org" <linux-media@...r.kernel.org>, "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>, "jackson.lee" <jackson.lee@...psnmedia.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>
Subject: Re: Re: RE: [PATCH 5/6] media: chips-media: wave5: refine SRAM usage
On Thu, Mar 21, 2024 at 01:52:03PM +0300, Ivan Bornyakov wrote:
> Hi!
>
> To sum up, there is 2 favourable approaches:
>
> 1) to have dedicated SRAM partition for Wave5 VPU as suggested in this
> patchset. In this approach SoC vendor can setup address range of said
> partition to their needs, but other devices won't be able to use SRAM
> memory reserved for Wave5 VPU, unless other device's SRAM memory needs
> don't exceed the size of reserved partition.
>
> Therefore it is sensible to substitute alloc/free on open/close with
> alloc/free on open/close.
>
> Advantages: driver code is simpler, no need for platform-specific defines
> or DT properties. Wave5 is guaranteed to get SRAM memory.
>
> Disadvantage: waste of SRAM memory while VPU is not in use
>
> 2) allocate all available SRAM memory on open (free on close) from the
> common SRAM pool, but limit maximum amount with SoC-specific define.
>
> Advantage: less memory waste
>
> Disadvantages: still need SoC-specific define or DT property, not much
> differ from current state. Wave5 is not guaranteed to get SRAM memory.
>
> Which of these approaches would be preferable?
>
Personaly I would say, let's stick with simpler code while there are not
too much mainline users. When someone runs into SRAM insufficiency
because of Wave5 VPU driver, their patches will be welcomed :)
Powered by blists - more mailing lists