From nobody Mon Feb 9 10:29:10 2026 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 106AA2FB97D for ; Fri, 9 Jan 2026 07:43:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767944589; cv=none; b=d9uf/tz26ppB2XkNNy4UBNzKmextrFXLaHNEpQkHJGnn3Xq5ZpySYiUaxyBn/Al7PF75HBI2EVEAE/dKo6ZvsTZXvgHgEdL31ddW7OkYmep9QfINJMaxDC4QjsXEOKJiph9WwCDaQHHDkJq08UD5oy4iJGoG3OML/BpOTLN8uxM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1767944589; c=relaxed/simple; bh=PYS22VIwFP0s6+Vo8X1pkqgPgtluf+W9+be/fX023ao=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=IVnvnARsjwa4J9e4R6B0vBeppq1B8fC318XBKhJnpjo2wDmokIb+4TZNz5dxJSN+4Yu9JkI8n5PJXZ0L5CyLJBOobfuqmbdC0FWRUs2eek56Jm31xrErD8celyQl8GdrosGVO3dYRlPZcEiPGQziEEQRjpc80S2Z7+kP7GJz8iY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=eVbTxaD2; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=e3/fTVMS; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="eVbTxaD2"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="e3/fTVMS" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6095DFeE2765544 for ; Fri, 9 Jan 2026 07:43:07 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= CJ+6NY3RlmXBdxBX+tLnOKNxo2p9RX/rTmakOVflSqo=; b=eVbTxaD28AyJoVT5 YXrXES8inlHk4Nool6hKjAaGqz8YaQX8DeHps+CaZ6gja/6FEaTEYieWTeQ0+OeU mLcm2+rXu1OsCIlJErAPUreMNpJBordZrBTOEA8Pc/mM+zTjCHb12zd1K/6d/yR1 GBw0CEdEqEHJfiNx6oYDFuMsI6ET/kcNpxW9No6YJ+DFIXqga+G2E5Xu95QlEuBS hvxQH5e9s1JSnjPmJiAXJtVj38nnDnOKhg/aM2QuR1kHTd/OOT71vI6qYECfzF68 7pSQo5YkMc+mY5R2iOOJKcyXfJ7pvwYulLG559Fj4tIkw17Dr5JVi/w1tuoY0It7 mll6fg== Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bjfejtf8q-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 09 Jan 2026 07:43:06 +0000 (GMT) Received: by mail-pl1-f199.google.com with SMTP id d9443c01a7336-29f8e6a5de4so44020865ad.2 for ; Thu, 08 Jan 2026 23:43:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767944585; x=1768549385; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CJ+6NY3RlmXBdxBX+tLnOKNxo2p9RX/rTmakOVflSqo=; b=e3/fTVMSMd19Vpm9CuRcDehCSQCcM2yyUAQABo7e5kMM0o6lUkSLLrK0QrAThTl8mL 3i6LHA2PTx86foC34vQC8q2aYgmJbx23KBWHIOSPS4O2fQAX5hkjSO/s70hcF5lPNtnN DTUl3Z+DCGk3CVBTAT+jKHYKc3/ogkCg5CdMtDENZAym86PCmz+V3n5sT9n7Uqtw2KbA KBYlC3RZFtMMWTzKlZsHfAkIRFEZ+kHivQBAD/cqdUtdgQWuop3hVm0/5KxOSErAfTsx USNjWKbY70EGRNm8zSPwtQKy/11XN54EgMa8YHSX85Palc/tvHO+X7suuaL01+TqVsyY 8iqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767944585; x=1768549385; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=CJ+6NY3RlmXBdxBX+tLnOKNxo2p9RX/rTmakOVflSqo=; b=OEHYOXSserakF3WlwTmpONxbsV8Lro4JiY4PkEoEzmAsq1sUdsuVsX98PGDIeXSXnO 7qeyCn4mBLRbglM4wdbmGjStSR/ce524GG8h5lwFOAkgLTHHuHRQHt8rMKVcFIi1do+G N2OEsTyBg+z88Ivi+UNFFkEONLSUvap5hA87f7jOVTpTLjILaDmK3XRaR6r91xIVGAoc KcqqXaQRWIIf43Bm95RTF3Bd9plpUB76tSn3ThgFB2dUQMnen0xTH7Gz76p+FTal3K1+ O/yf8aXsyDCKoyNaVr2mJbX8q6XzHxP+WY2248VF/66tLaIcta+sqocNodRaOXemrl4R iUbA== X-Forwarded-Encrypted: i=1; AJvYcCWvvarqKZ9BuWm/aoF7afLpHMP4Aas7grr2iHSE03ca/FCFLZp0+N82zljoRDL9VBX0c0tBTfCYd9h5Huo=@vger.kernel.org X-Gm-Message-State: AOJu0YzTxrw7YhwUV00jgkLh/cKOWpiBI30yodyaWSdhG0bxmxaYSsod 0UtyDCvcV1ZMnArIBU0e4Hhsy3y0+vLC17xNbg2SUoLUQs/d9no2CDirNUkHWggVBNOjakNOPoB oH66y/lNUGMWaFR8EqVqaGVls9XEZXp4sp0xJ3UfOotoW5V17MN36dNu3xjDNUYV/zls= X-Gm-Gg: AY/fxX46FEq5a4ZqkKQ5Q0CBYH+d7X4GXXBQXVUGU0w6TqboKP4Va2JL3XLOiWPfaDQ 3KTKTqVmd8mXXD/xXJKZliXR2SBpdSpNNdiRDaoBVEQivQjJyJTh3yIQFbiO2JpsLaBSl5aXGsM eYUNpx2SW1mKXPndWMCHWwBC/WyiCuu1jhVoGSUpwcHWYTQVl6d+/ebQLjWaP2NX9pE7+SQIbjM jUiNQwwssGom3HkioLGyFPaFgicVtV2qm35j8ck1IkYRsL5PFTKKd6pUf1Ucsp4E7biLB88Z7H4 iO6YpbDbmE99dfofrKU0JJLnH/Gc1gf/PPD/QVpdNeKJEFlbxhJtQTU0d0nDCfXdy+obWiDCteb yfAifBrGZbXcBpUkpDolzv4i5H58I4d/3n3szYSGj52GF47zCfHNd/VWMKTHLbsOlo8tpPP75NE AcUJWnLEn7 X-Received: by 2002:a17:903:124e:b0:2a1:3cd8:d2dc with SMTP id d9443c01a7336-2a3ee4b74a9mr95306205ad.57.1767944584761; Thu, 08 Jan 2026 23:43:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IH68sxvQo8solxnM9LzIgq/rjUF9Q0s0Bwiqk+QtoISxH1TbxQ3cUbFrotg+m3ggMukytQGRQ== X-Received: by 2002:a17:903:124e:b0:2a1:3cd8:d2dc with SMTP id d9443c01a7336-2a3ee4b74a9mr95305925ad.57.1767944584233; Thu, 08 Jan 2026 23:43:04 -0800 (PST) Received: from WANGAOW-LAB01.ap.qualcomm.com (tpe-colo-wan-fw-bordernet.qualcomm.com. [103.229.16.4]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cd46a9sm98638195ad.93.2026.01.08.23.43.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Jan 2026 23:43:03 -0800 (PST) From: Wangao Wang Date: Fri, 09 Jan 2026 15:42:34 +0800 Subject: [PATCH v3 5/6] media: qcom: iris: Optimize iris_hfi_gen1_packet_session_set_property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260109-batch2_iris_encoder_enhancements-v3-5-196855ef32ba@oss.qualcomm.com> References: <20260109-batch2_iris_encoder_enhancements-v3-0-196855ef32ba@oss.qualcomm.com> In-Reply-To: <20260109-batch2_iris_encoder_enhancements-v3-0-196855ef32ba@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab Cc: quic_qiweil@quicinc.com, Renjiang Han , Wangao Wang , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767944563; l=9365; i=wangao.wang@oss.qualcomm.com; s=20251021; h=from:subject:message-id; bh=PYS22VIwFP0s6+Vo8X1pkqgPgtluf+W9+be/fX023ao=; b=ZqV+ZL3OD1oEcJJnNtwSctx2EpwNbyylzAqEVHqaTnzJmA28FqYxnTeVL0cQV4Ig/XIARmajP 66KICkTsstACOrikniyU85Ko9Sd3gNUNzHFx2/FLCjDx6GFR5ZCcHWU X-Developer-Key: i=wangao.wang@oss.qualcomm.com; a=ed25519; pk=bUPgYblBUAsoPyGfssbNR7ZXUSGF8v1VF4FJzSO6/aA= X-Proofpoint-ORIG-GUID: NE-BUOeMeHnbo0Yznn4kl76z_O1Ruq4w X-Proofpoint-GUID: NE-BUOeMeHnbo0Yznn4kl76z_O1Ruq4w X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTA5MDA1MyBTYWx0ZWRfX0GjufJsOqNn1 z/7+8lpAgVqql0bKodhFbwwr2C5JaEpszLmj3wSZPgeNwnyjEoMNeAM0xZxLS+fazWsG4iVl8/e FLsFlf2vTBPP9qYNPpMkmsaORHNYfyF2OstvTWgkj4foEuViUhaTjPAZ+lOm0K3kcFcbnOeRs1f FnH99PwiTjI7CJR+G1NkdTAGtX+asH3QxN16qgZ/L3nSnUlRvNyrxUJmzsGijqOJiyelDhi7wmW aHnZ7ARXejjpRFyVPtIZFG389boprMIk/ynMgvOWKenwgBkllnDzsnGa+RAOOl/F0BriE8UEBP6 9HghN8+NNE6vp/xu9jPpXMo4AInFD/UM+5OYYzhFJ3i5bARQqr4VTfrguBLU1ShwjYXkZOMILvL 6KMEGCIZgZb+nu5i6o+/IaT2RbU7h68MDtIaEPXqFv1nJ/trOUUAmqLSE1Ibo4RWIdPJbaxEKoL t0zznst8THcIjXwO/8w== X-Authority-Analysis: v=2.4 cv=ZfAQ98VA c=1 sm=1 tr=0 ts=6960b18a cx=c_pps a=JL+w9abYAAE89/QcEU+0QA==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=7zm3FxsWSslHyZ29AF8A:9 a=QEXdDO2ut3YA:10 a=324X-CrmTo6CU4MGRt3R:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-09_02,2026-01-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 spamscore=0 bulkscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 suspectscore=0 impostorscore=0 phishscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601090053 Modify iris_hfi_gen1_packet_session_set_property to simplify size calculations and remove redundant code patterns. Previously, packet->shdr.hdr.size was incremented by sizeof(u32) in every switch case, resulting in repetitive and less maintainable logic. Signed-off-by: Wangao Wang Reviewed-by: Dikshita Agarwal --- .../platform/qcom/iris/iris_hfi_gen1_command.c | 50 +++++++++++-------= ---- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c b/dri= vers/media/platform/qcom/iris/iris_hfi_gen1_command.c index 5d7d7856b35f4175225256c2aed619527aa5f2e8..08c99f9455cd6cee3244d3ca133= 4d478e31e1a26 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c @@ -483,7 +483,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p { void *prop_data =3D &packet->data[1]; =20 - packet->shdr.hdr.size =3D sizeof(*packet); + packet->shdr.hdr.size =3D sizeof(*packet) + sizeof(ptype); packet->shdr.hdr.pkt_type =3D HFI_CMD_SESSION_SET_PROPERTY; packet->shdr.session_id =3D inst->session_id; packet->num_properties =3D 1; @@ -496,14 +496,14 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_= session_set_property_pkt *p fsize->buffer_type =3D in->buffer_type; fsize->height =3D in->height; fsize->width =3D in->width; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*fsize); + packet->shdr.hdr.size +=3D sizeof(*fsize); break; } case HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE: { struct hfi_videocores_usage_type *in =3D pdata, *cu =3D prop_data; =20 cu->video_core_enable_mask =3D in->video_core_enable_mask; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*cu); + packet->shdr.hdr.size +=3D sizeof(*cu); break; } case HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SELECT: { @@ -512,7 +512,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p =20 hfi->buffer_type =3D in->buffer_type; hfi->format =3D in->format; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*hfi); + packet->shdr.hdr.size +=3D sizeof(*hfi); break; } case HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_CONSTRAINTS_INFO: { @@ -531,7 +531,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p info->plane_format[1].buffer_alignment =3D 256; } =20 - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*info); + packet->shdr.hdr.size +=3D sizeof(*info); break; } case HFI_PROPERTY_PARAM_BUFFER_COUNT_ACTUAL: { @@ -541,7 +541,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p count->type =3D in->type; count->count_actual =3D in->count_actual; count->count_min_host =3D in->count_min_host; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*count); + packet->shdr.hdr.size +=3D sizeof(*count); break; } case HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM: { @@ -550,7 +550,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p =20 multi->buffer_type =3D in->buffer_type; multi->enable =3D in->enable; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*multi); + packet->shdr.hdr.size +=3D sizeof(*multi); break; } case HFI_PROPERTY_PARAM_BUFFER_SIZE_ACTUAL: { @@ -558,7 +558,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p =20 sz->size =3D in->size; sz->type =3D in->type; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*sz); + packet->shdr.hdr.size +=3D sizeof(*sz); break; } case HFI_PROPERTY_PARAM_WORK_ROUTE: { @@ -566,7 +566,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p u32 *in =3D pdata; =20 wr->video_work_route =3D *in; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*wr); + packet->shdr.hdr.size +=3D sizeof(*wr); break; } case HFI_PROPERTY_PARAM_WORK_MODE: { @@ -574,7 +574,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p u32 *in =3D pdata; =20 wm->video_work_mode =3D *in; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*wm); + packet->shdr.hdr.size +=3D sizeof(*wm); break; } case HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT: { @@ -590,7 +590,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p /* Level not supported, falling back to 1 */ pl->level =3D 1; =20 - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*pl); + packet->shdr.hdr.size +=3D sizeof(*pl); break; } case HFI_PROPERTY_CONFIG_VENC_SYNC_FRAME_SEQUENCE_HEADER: { @@ -598,7 +598,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p u32 *in =3D pdata; =20 en->enable =3D *in; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*en); + packet->shdr.hdr.size +=3D sizeof(*en); break; } case HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE: { @@ -606,7 +606,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p =20 brate->bitrate =3D in->bitrate; brate->layer_id =3D in->layer_id; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*brate); + packet->shdr.hdr.size +=3D sizeof(*brate); break; } case HFI_PROPERTY_PARAM_VENC_RATE_CONTROL: { @@ -625,7 +625,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p } =20 packet->data[1] =3D *in; - packet->shdr.hdr.size +=3D sizeof(u32) * 2; + packet->shdr.hdr.size +=3D sizeof(u32); break; } case HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL: { @@ -635,7 +635,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p entropy->entropy_mode =3D *in; if (entropy->entropy_mode =3D=3D HFI_H264_ENTROPY_CABAC) entropy->cabac_model =3D HFI_H264_CABAC_MODEL_0; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*entropy); + packet->shdr.hdr.size +=3D sizeof(*entropy); break; } case HFI_PROPERTY_PARAM_VENC_SESSION_QP_RANGE_V2: { @@ -660,7 +660,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p ((max_qp & 0xFF) << 16); range->min_qp.enable =3D 7; range->max_qp.enable =3D 7; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*range); + packet->shdr.hdr.size +=3D sizeof(*range); break; } case HFI_PROPERTY_CONFIG_FRAME_RATE: { @@ -669,7 +669,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p =20 frate->buffer_type =3D in->buffer_type; frate->framerate =3D in->framerate; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*frate); + packet->shdr.hdr.size +=3D sizeof(*frate); break; } case HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_INFO: { @@ -681,7 +681,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p plane_actual_info->plane_format[0] =3D in->plane_format[0]; if (in->num_planes > 1) plane_actual_info->plane_format[1] =3D in->plane_format[1]; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*plane_actual_info); + packet->shdr.hdr.size +=3D sizeof(*plane_actual_info); break; } case HFI_PROPERTY_PARAM_VENC_INTRA_REFRESH: { @@ -689,7 +689,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p =20 intra_refresh->mode =3D in->mode; intra_refresh->mbs =3D in->mbs; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*intra_refresh); + packet->shdr.hdr.size +=3D sizeof(*intra_refresh); break; } case HFI_PROPERTY_PARAM_VENC_LTRMODE: { @@ -698,7 +698,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_se= ssion_set_property_pkt *p ltr_mode->mode =3D in->mode; ltr_mode->count =3D in->count; ltr_mode->trust_mode =3D in->trust_mode; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*ltr_mode); + packet->shdr.hdr.size +=3D sizeof(*ltr_mode); break; } case HFI_PROPERTY_CONFIG_VENC_USELTRFRAME: { @@ -707,14 +707,14 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_= session_set_property_pkt *p ltr_use->frames =3D in->frames; ltr_use->ref_ltr =3D in->ref_ltr; ltr_use->use_constrnt =3D in->use_constrnt; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*ltr_use); + packet->shdr.hdr.size +=3D sizeof(*ltr_use); break; } case HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME: { struct hfi_ltr_mark *in =3D pdata, *ltr_mark =3D prop_data; =20 ltr_mark->mark_frame =3D in->mark_frame; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*ltr_mark); + packet->shdr.hdr.size +=3D sizeof(*ltr_mark); break; } case HFI_PROPERTY_CONFIG_VENC_INTRA_PERIOD: { @@ -722,21 +722,21 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_= session_set_property_pkt *p =20 intra_period->pframes =3D in->pframes; intra_period->bframes =3D in->bframes; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(*intra_period); + packet->shdr.hdr.size +=3D sizeof(*intra_period); break; } case HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER: { u32 *in =3D pdata; =20 packet->data[1] =3D *in; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(u32); + packet->shdr.hdr.size +=3D sizeof(u32); break; } case HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER: { u32 *in =3D pdata; =20 packet->data[1] =3D *in; - packet->shdr.hdr.size +=3D sizeof(u32) + sizeof(u32); + packet->shdr.hdr.size +=3D sizeof(u32); break; } default: --=20 2.43.0