diff options
author | Stanimir Varbanov <stanimir.varbanov@linaro.org> | 2020-08-05 10:36:06 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-13 11:11:34 +0300 |
commit | aa6033892b1d8ea956ce0358867806e171a620d1 (patch) | |
tree | 6dd53e646f46b1b6b13434a84b4047cd8f0ac280 /drivers/media/platform/qcom/venus/hfi_platform.h | |
parent | c7f50ce507d54ff0518d2f55971a6a8dab6ae8a5 (diff) | |
download | linux-aa6033892b1d8ea956ce0358867806e171a620d1.tar.xz |
media: venus: Create hfi platform and move vpp/vsp there
Introduce a new hfi platform to cover differences between hfi
versions. As a start move vpp/vsp freq data in that hfi
platform, more platform data will come later.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/qcom/venus/hfi_platform.h')
-rw-r--r-- | drivers/media/platform/qcom/venus/hfi_platform.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/media/platform/qcom/venus/hfi_platform.h b/drivers/media/platform/qcom/venus/hfi_platform.h new file mode 100644 index 000000000000..8b07ecbb4c82 --- /dev/null +++ b/drivers/media/platform/qcom/venus/hfi_platform.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright (c) 2020, The Linux Foundation. All rights reserved. + */ + +#ifndef __HFI_PLATFORM_H__ +#define __HFI_PLATFORM_H__ + +#include <linux/types.h> +#include <linux/videodev2.h> + +#include "hfi.h" +#include "hfi_helper.h" + +struct hfi_platform_codec_freq_data { + u32 pixfmt; + u32 session_type; + unsigned long vpp_freq; + unsigned long vsp_freq; +}; + +struct hfi_platform { + unsigned long (*codec_vpp_freq)(u32 session_type, u32 codec); + unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec); +}; + +extern const struct hfi_platform hfi_plat_v4; + +const struct hfi_platform *hfi_platform_get(enum hfi_version version); +unsigned long hfi_platform_get_codec_vpp_freq(enum hfi_version version, u32 codec, + u32 session_type); +unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, + u32 session_type); +#endif |