提交 367b619a 编写于 作者: S Stanimir Varbanov 提交者: Mauro Carvalho Chehab

media: venus: hfi_plat: Add platform ops for getting number of VPP pipes

Starting from v6 we have one more hfi property which will be needed
to calculate buffer sizes/count for particular codec and session type.
Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab+huawei@kernel.org>
上级 8b88cabe
...@@ -47,3 +47,17 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session ...@@ -47,3 +47,17 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session
return freq; return freq;
} }
u8 hfi_platform_num_vpp_pipes(enum hfi_version version)
{
const struct hfi_platform *plat;
plat = hfi_platform_get(version);
if (!plat)
return 0;
if (plat->num_vpp_pipes)
return plat->num_vpp_pipes();
return 0;
}
...@@ -49,6 +49,7 @@ struct hfi_platform { ...@@ -49,6 +49,7 @@ struct hfi_platform {
unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec); unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec);
void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count); void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count);
const struct hfi_plat_caps *(*capabilities)(unsigned int *entries); const struct hfi_plat_caps *(*capabilities)(unsigned int *entries);
u8 (*num_vpp_pipes)(void);
}; };
extern const struct hfi_platform hfi_plat_v4; extern const struct hfi_platform hfi_plat_v4;
...@@ -58,4 +59,5 @@ unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 code ...@@ -58,4 +59,5 @@ unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 code
u32 session_type); u32 session_type);
unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec,
u32 session_type); u32 session_type);
u8 hfi_platform_num_vpp_pipes(enum hfi_version version);
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册