Contributors: 4
| Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
| Stanimir Varbanov |
233 |
92.46% |
4 |
57.14% |
| Dikshita Agarwal |
12 |
4.76% |
1 |
14.29% |
| Jorge Ramirez-Ortiz |
6 |
2.38% |
1 |
14.29% |
| Thomas Gleixner |
1 |
0.40% |
1 |
14.29% |
| Total |
252 |
|
7 |
|
// SPDX-License-Identifier: GPL-2.0-only
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/
#include "hfi_platform.h"
const struct hfi_platform *hfi_platform_get(enum hfi_version version)
{
switch (version) {
case HFI_VERSION_4XX:
return &hfi_plat_v4;
case HFI_VERSION_6XX:
return &hfi_plat_v6;
default:
break;
}
return NULL;
}
unsigned long
hfi_platform_get_codec_vpp_freq(struct venus_core *core,
enum hfi_version version, u32 codec,
u32 session_type)
{
const struct hfi_platform *plat;
unsigned long freq = 0;
plat = hfi_platform_get(version);
if (!plat)
return 0;
if (plat->codec_vpp_freq)
freq = plat->codec_vpp_freq(core, session_type, codec);
return freq;
}
unsigned long
hfi_platform_get_codec_vsp_freq(struct venus_core *core,
enum hfi_version version, u32 codec,
u32 session_type)
{
const struct hfi_platform *plat;
unsigned long freq = 0;
plat = hfi_platform_get(version);
if (!plat)
return 0;
if (plat->codec_vpp_freq)
freq = plat->codec_vsp_freq(core, session_type, codec);
return freq;
}
unsigned long
hfi_platform_get_codec_lp_freq(struct venus_core *core,
enum hfi_version version, u32 codec,
u32 session_type)
{
const struct hfi_platform *plat;
unsigned long freq = 0;
plat = hfi_platform_get(version);
if (!plat)
return 0;
if (plat->codec_lp_freq)
freq = plat->codec_lp_freq(core, session_type, codec);
return freq;
}