Skip to content

media: venus: add MSM8939 support#434

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

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

Conversation

@erikas9987
Copy link

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

André Apitzsch and others added 11 commits February 26, 2026 21:50
Add a schema description for the Venus video decoder/encoder IP in
MSM8939.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
[Erikas: move clocks and power domains to the video decoder]
Add msm8939 configuration data and related compatible.

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

Signed-off-by: André Apitzsch <git@apitzsch.eu>
[Erikas: move clocks and power domains to the video decoder]
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>
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>
Add vcodec0_pmdomains and vcodec1_pmdomains to indicate power domains
for Venus cores.

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

Signed-off-by: Erikas Bitovtas <xerikasxx@gmail.com>
Currently, mainline provides no way to power up several cores at once
and completely ignores vcodec0 and vcodec1 clocks for HFI version 1.
Here we move vdec and venc power management functions from HFI v3 to v1,
attach power domains for vdec and venc cores and power them up if a vdec
session is started.

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>
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