drivers/media/platform/qcom/venus/hfi_platform.c
Source file repositories/reference/linux-study-clean/drivers/media/platform/qcom/venus/hfi_platform.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/media/platform/qcom/venus/hfi_platform.c- Extension
.c- Size
- 1450 bytes
- Lines
- 74
- Domain
- Driver Families
- Bucket
- drivers/media
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
hfi_platform.h
Detected Declarations
function Copyrightfunction hfi_platform_get_codec_vpp_freqfunction hfi_platform_get_codec_vsp_freqfunction hfi_platform_get_codec_lp_freq
Annotated Snippet
// 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;
}
Annotation
- Immediate include surface: `hfi_platform.h`.
- Detected declarations: `function Copyright`, `function hfi_platform_get_codec_vpp_freq`, `function hfi_platform_get_codec_vsp_freq`, `function hfi_platform_get_codec_lp_freq`.
- Atlas domain: Driver Families / drivers/media.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.