Skip to content

media: venus: add MSM8939 support#434

Open
erikas9987 wants to merge 11 commits intomsm8916-mainline:wip/msm8916/7.0-rc6from
erikas9987:z00t-venus-v2
Open

media: venus: add MSM8939 support#434
erikas9987 wants to merge 11 commits intomsm8916-mainline:wip/msm8916/7.0-rc6from
erikas9987:z00t-venus-v2

Conversation

@erikas9987
Copy link
Copy Markdown

This patch series adds Venus support for MSM8939.

It is based on #399 and solves the issue of timeout during power collapse. It was caused by needed vcodec0 clocks and power domains never being initialized in HFI version 1, which is the version of HFI used on MSM8939 Venus.

MSM8939 Venus also supports HEVC decoding, however, currently mainline driver ignores HEVC decoding for HFI version 1. It can be enabled by removing the core->dec_codecs &= ~HFI_VIDEO_CODEC_HEVC line, but this might break support for faulty firmwares on MSM8916 (see commit c50cc6d)

Encoding fails when running gst-launch-1.0 videotestsrc ! videoconvert ! v4l2vp8enc ! queue ! v4l2vp8dec ! xvimagesink, logs: https://pastebin.com/D9KaWSaV

@erikas9987 erikas9987 changed the base branch from wip/msm8916/6.19 to wip/msm8916/7.0-rc3 March 15, 2026 17:14
@erikas9987 erikas9987 changed the base branch from wip/msm8916/7.0-rc3 to wip/msm8916/7.0-rc6 April 2, 2026 21:34
André Apitzsch and others added 6 commits April 11, 2026 22:54
Add a schema description for the Venus video decoder/encoder IP in
MSM8939.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Add vcodec0_pmdomains and vcodec1_pmdomains to indicate power domains
for Venus cores.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Add msm8939 configuration data and related compatible.
Cores on MSM8939 Venus are used for decoding, not encoding. Move them to
vcodec0 so they can be enabled accordingly.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Add DT entries for the msm8939 venus encoder/decoder.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Enable the venus node so that the video encoder/decoder will start
working.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
TODO: check if necessary

Signed-off-by: André Apitzsch <git@apitzsch.eu>
@erikas9987 erikas9987 force-pushed the z00t-venus-v2 branch 2 times, most recently from 2bb8577 to 0f59ed3 Compare April 14, 2026 12:15
Enable Venus video encoder/decoder for Asus ZenFone 2 Laser/Selfie.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Since in downstream kernel VENUS_CORE0_GDSC and VENUS_CORE1_GDSC have a
device tree property "qcom,supports-hw-trigger", we add a HW_CTRL flag
to these GDSCs to indicate that they are hardware controlled.

Because they can be switched off at any moment, we also skip voting for
it so it can be enabled later.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
This is needed so dev_dec and dev_enc are initialized when we are
calling vdec_get and venc_get.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Some Qualcomm SoCs which come with HFI v1 like MSM8909 and MSM8939 also
have dedicated cores for Venus, like in HFI v3. Move methods from HFI v3
to HFI v1 so they can be reused.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Attach power domains for vdec and venc cores and power them up if a vdec
or venc session is started.

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant