media: venus: Add support for static video encoder/decoder declarations
authorBryan O'Donoghue <bryan.odonoghue@linaro.org>
Mon, 30 Dec 2024 17:00:33 +0000 (17:00 +0000)
committerHans Verkuil <hverkuil@xs4all.nl>
Mon, 6 Jan 2025 13:45:29 +0000 (14:45 +0100)
commit687bfbba5a1cb15cee51519c210141ed1c4b0ec7
treec8cc6cddcda9aa8fa044081fa9842074e6fccbc0
parentdaa7031a31ce184e7b98fdaf7fb25aba5a7ea04f
media: venus: Add support for static video encoder/decoder declarations

Add resource structure data and probe() logic to support static
declarations of encoder and decoder.

Right now we rely on video encoder/decoder selection happening in the dtb
but, this goes against the remit of device tree which is supposed to
describe hardware, not select functional logic in Linux drivers.

Provide two strings in the venus resource structure enc_nodename and
dec_nodename.

When set the venus driver will create an OF entry in-memory consistent
with:

dec_nodename {
    compat = "video-decoder";
};

and/or

enc_nodename {
    compat = "video-encoder";
};

This will allow us to reuse the existing driver scheme of relying on compat
names maintaining compatibility with old dtb files.

dec_nodename can be "video-decoder" or "video0"
enc_nodename can be "video-encoder" or "video1"

This change relies on of_changeset() API as a result select OF_DYNAMIC will
be added to venus/Kconfig

Tested-by: Renjiang Han <quic_renjiang@quicinc.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Stanimir Varbanov <stanimir.k.varbanov@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/platform/qcom/venus/Kconfig
drivers/media/platform/qcom/venus/core.c
drivers/media/platform/qcom/venus/core.h