mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
From: Zhentao Guo <zhentao.guo@amlogic.com>
To: Xianwei Zhao <xianwei.zhao@amlogic.com>,
	Paul Menzel <pmenzel@molgen.mpg.de>,
	Arden Jin <Arden.Jin@amlogic.com>,
	Hui Zhang <Hui.Zhang@amlogic.com>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
	Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
	Kevin Hilman <khilman@baylibre.com>,
	linux-amlogic@lists.infradead.org, linux-media@vger.kernel.org,
	Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: Amlogic S4 (S805X2) video decoder firmware for linux-firmware
Date: Mon, 23 Nov 2026 15:35:36 +0800	[thread overview]
Message-ID: <9a5feadb-13d9-4654-9c5e-f7e97a1b8081@amlogic.com> (raw)
In-Reply-To: <8be8337a-5b73-4a9a-82a5-5acbdb6d6964@amlogic.com>

Dear Paul,

> Hi Paul,
>    A colleague of ours(zhentao.guo@amlogic.com) knows this part better.
>
> Hi Zhentao,
>    Could you please take a look? Thanks!
>
> On 2026/11/22 17:18, Paul Menzel wrote:
>>
>> Dear Xianwei, dear Arden,
>>
>>
>> Before buying a Chromecast with Google TV HD (boreal, Amlogic
>> S805X2/S4), I would like to sort out the firmware situation.
>>
>> linux-firmware has meson/vdec/*.bin for GXBB up to SM1 under
>> LICENSES/LICENSE.amlogic_vdec, extracted from Amlogic’s July 2019
>> release (linux-firmware commits e04cc56d and fb505a69, with Arden in
>> Cc). There is nothing for S4.
>>
>> In the media_modules sources Google published for boreal [1] (package
>> v0.4.66, commit 1752357, built 2024-12-27), I found:
>>
>> 1.  firmware/S805X2/video_ucode.bin and firmware/S805X2G/video_ucode.bin
>> are NEWP packages: only the headers are in plaintext, and the microcode
>> is encrypted and loaded through OP-TEE (TEE_SMC_LOAD_VIDEO_FW).
>>
>> 2.  The headers record the CRC32 of the plaintext. Each of the 14 S4
>> entries has the CRC32 and size of an entry in the generic plaintext
>> package firmware/video_ucode.bin:
>>
>>      - SM1 builds: h264_multi, mpeg12_multi, vc1, xvid_multi, avs_multi,
>> h264_mvc
>>      - G12A builds: hevc, h264_multi_mmu
>>      - T5D builds: vp9_mmu, hevc_mmu, hevc_mmu_swap
>>      - SC2 av1_mmu, T7 avs2_mmu, G12B mjpeg_multi
>>
>> 3.  None of them is byte-identical to a file in linux-firmware, and the
>> current package no longer contains the single-instance H.264 and
>> MPEG-1/2 microcode that the mainline driver loads (g12a_h264.bin,
>> gxl_mpeg12.bin).
>>
>> The files carry no license, so I cannot submit them myself. My 
>> questions:
>>
>> 1.  Does Amlogic agree to distributing the S4 video decoder firmware in
>> linux-firmware under LICENSE.amlogic_vdec? Concretely, the plaintext
>> builds S4 uses, as meson/vdec/s4_*.bin. Would you prefer to submit them
>> yourself, or to ack a submission from me?
In fact, Amlogic is currently working on upstream decoder for the S4, 
including stateless decoder driver patchset: 
https://lore.kernel.org/linux-amlogic/20261022-b4-s4-vdec-upstream-v12-0-616240978792@amlogic.com/ 
<https://lore.kernel.org/linux-amlogic/20261022-b4-s4-vdec-upstream-v12-0-616240978792@amlogic.com/>, 
along with the matching firmware submission: 
https://lore.kernel.org/linux-amlogic/20261116094040.4176202-1-zhentao.guo@amlogic.com/. 
The current firmware submission covers the S4 platform and the H.264 
codec; we will extend it to more platforms and more codec formats in the 
future. And of course, we plan to make these submissions ourselves.
>>
>> 2.  The mainline driver loads the microcode from the non-secure world,
>> by pointing (HEVC_)IMEM_DMA_ADR at a coherent buffer. Does this work on
>> S4, or does the DOS block only accept microcode loaded by BL32? If the
>> latter, is the SMC interface documented, and does the BL32 on production
>> S4 devices include the microcode?
Unlike the legacy chips that already supported in mainline (such as G12, 
SM1, etc.), the S4 and the newer chips can only accept firmware that is 
loaded into secure memory by BL32 and then read by the AMRISC hardware 
currently. The microcode on production devices is also loaded following 
this same procedure. The legacy chips can support the unsigned firmware 
loaded by CPU. The stateless decoder for the S4 will also support these 
legacy chips in the next year.

>>
>> 3.  Does g12a_h264.bin work on S4, or is there an S4 build of the
>> single-instance H.264 microcode? Or should the mainline driver use
>> h264_multi on newer SoCs?
The g12a_h264.bin does not work on S4, and no more single-instance H264 
microcode can run on S4 and the newer SOCs. All the new SOCs can only 
use the h264_multi firmware.
>>
>>
>> Kind regards,
>>
>> Paul
>>
>>
>> [1]: 
>> https://nest-open-source.googlesource.com/manifest_repos/media_modules

Best regards,

Zhentao


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

      reply	other threads:[~2026-11-23  7:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22  9:18 Paul Menzel
2026-11-23  3:04 ` Xianwei Zhao
2026-11-23  7:35   ` Zhentao Guo [this message]

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=9a5feadb-13d9-4654-9c5e-f7e97a1b8081@amlogic.com \
    --to=zhentao.guo@amlogic.com \
    --cc=Arden.Jin@amlogic.com \
    --cc=Hui.Zhang@amlogic.com \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-media@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=xianwei.zhao@amlogic.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

all inboxes | Powered by JetHome®