1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (c) 2020, The Linux Foundation. All rights reserved.
6 #include "hfi_platform.h"
9 const struct hfi_platform *hfi_platform_get(enum hfi_version version)
24 hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, u32 session_type)
26 const struct hfi_platform *plat;
27 unsigned long freq = 0;
29 plat = hfi_platform_get(version);
33 if (plat->codec_vpp_freq)
34 freq = plat->codec_vpp_freq(session_type, codec);
40 hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session_type)
42 const struct hfi_platform *plat;
43 unsigned long freq = 0;
45 plat = hfi_platform_get(version);
49 if (plat->codec_vpp_freq)
50 freq = plat->codec_vsp_freq(session_type, codec);
56 hfi_platform_get_codec_lp_freq(enum hfi_version version, u32 codec, u32 session_type)
58 const struct hfi_platform *plat;
59 unsigned long freq = 0;
61 plat = hfi_platform_get(version);
65 if (plat->codec_lp_freq)
66 freq = plat->codec_lp_freq(session_type, codec);
72 hfi_platform_get_codecs(struct venus_core *core, u32 *enc_codecs, u32 *dec_codecs, u32 *count)
74 const struct hfi_platform *plat;
76 plat = hfi_platform_get(core->res->hfi_version);
81 plat->codecs(enc_codecs, dec_codecs, count);
83 if (IS_IRIS2_1(core)) {
84 *enc_codecs &= ~HFI_VIDEO_CODEC_VP8;
85 *dec_codecs &= ~HFI_VIDEO_CODEC_VP8;