Skip to content

Commit 367b619

Browse files
Stanimir Varbanovmchehab
authored andcommitted
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: Stanimir Varbanov <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
1 parent 8b88cab commit 367b619

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

drivers/media/platform/qcom/venus/hfi_platform.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,17 @@ hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec, u32 session
4747

4848
return freq;
4949
}
50+
51+
u8 hfi_platform_num_vpp_pipes(enum hfi_version version)
52+
{
53+
const struct hfi_platform *plat;
54+
55+
plat = hfi_platform_get(version);
56+
if (!plat)
57+
return 0;
58+
59+
if (plat->num_vpp_pipes)
60+
return plat->num_vpp_pipes();
61+
62+
return 0;
63+
}

drivers/media/platform/qcom/venus/hfi_platform.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ struct hfi_platform {
4949
unsigned long (*codec_vsp_freq)(u32 session_type, u32 codec);
5050
void (*codecs)(u32 *enc_codecs, u32 *dec_codecs, u32 *count);
5151
const struct hfi_plat_caps *(*capabilities)(unsigned int *entries);
52+
u8 (*num_vpp_pipes)(void);
5253
};
5354

5455
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
5859
u32 session_type);
5960
unsigned long hfi_platform_get_codec_vsp_freq(enum hfi_version version, u32 codec,
6061
u32 session_type);
62+
u8 hfi_platform_num_vpp_pipes(enum hfi_version version);
6163
#endif

0 commit comments

Comments
 (0)