Re: [PATCH 2/4] media: qcom: iris: Add Long-Term Reference support for encoder
From: Wangao Wang
Date: Tue Dec 02 2025 - 01:39:13 EST
On 2025/11/27 18:41, Bryan O'Donoghue wrote:
@@ -693,6 +693,31 @@ iris_hfi_gen1_packet_session_set_property(struct
hfi_session_set_property_pkt *p
packet->shdr.hdr.size += sizeof(u32) + sizeof(*intra_refresh);
break;
}
+ case HFI_PROPERTY_PARAM_VENC_LTRMODE: {
+ struct hfi_ltr_mode *in = pdata, *ltr_mode = prop_data;
+
+ ltr_mode->mode = in->mode;
+ ltr_mode->count = in->count;
+ ltr_mode->trust_mode = in->trust_mode;
+ packet->shdr.hdr.size += sizeof(u32) + sizeof(*ltr_mode);
This looks like an unconditional pattern in this code
packet->shdr.hdr.size += sizeof(u32) for each one of the switch cases.
Could you at least add a patch to the end of this series to tidy this up
- either always incrmenting by sizeof(u32) before the swich - or making
a macro or static inline that packs the header appropriately.
Also what is the sizeof(u32) representative of ? "Some field in the
header" - get that but right now its just a literal unnamed dword.
A patch will be added in v2 to optimize the code structure here.
--
Best Regards,
Wangao