From nobody Sun Apr 5 16:31:15 2026 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 4065F37C0E5 for ; Wed, 1 Apr 2026 03:15:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775013323; cv=none; b=GcVGB3Edcsxur0/UESChTb03kNqFLTZAk0WZWYQaRT9iAAKWEYmyn5oUXlK0YBGp6i8pnXbiyhC6RfPK2iXaNlM7GDFVCO8SuF7H9YYLdeoJHwVhw9dRLvjvtIkmU/8auV8oPHILp1hncepugwJpRpb/0bdbHoQu/CqU1E/uIug= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775013323; c=relaxed/simple; bh=QgNvV+ZUr+OfOkkdTV4lIksbgWp+1MZfPRhX2v/RhWQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oHJLxUq22kQmWMNNg1D3VMJ3DTCcPsWb48Nhbtjqay8CQh9xOeLYYsV+2hKzjSQGkJIGbv/SBCmGzhrGv8sUPFaCDe5lCdDGoOByjg7TNELZWt63ChDUWxUwIa40j1tibX1uGkO0l4BGV50ebP6si5JXehj6Ars4SkVt7Is6GIo= 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=EvPZykgP; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=M1x7A+ER; arc=none smtp.client-ip=205.220.168.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="EvPZykgP"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="M1x7A+ER" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62VNq3gt639170 for ; Wed, 1 Apr 2026 03:15:20 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= N+X/grVf29WZuxv4++BbakS1OM0T868oNwwo4ynEHkI=; b=EvPZykgPrcOQzxX/ LUyhRVoyhp8QiyQ2ONP036hsrUuqxiFBpFNil4b7UufSz70RYvG4mdHlh8+EXE1n rFPp3UiEZ5YL8I/nHIQg7/BUgZCMjAVxuK3QOgrdt+fh/gBqrphxBQLY6STH6B/e L64QmenKudys++hkWvDa2uwRdt1nxXvu42nwmJED3I/xk/UQQvV8IXYyG3COLVQ6 pXgGDHaPhcHIHRi8gQhNVTpbA7B3gVG6yI4ZujSoc8n/zJ1cDC4CH1EByZPetPqw HrcSYMwO96hxCCnX/3nN3yMGFid39jVohajR4AWfO3JSpl4apl2v+e7Qbitc7BRy qNtXlQ== Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d8g2au0eg-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 01 Apr 2026 03:15:20 +0000 (GMT) Received: by mail-pg1-f199.google.com with SMTP id 41be03b00d2f7-c7423ba5342so13228252a12.0 for ; Tue, 31 Mar 2026 20:15:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775013320; x=1775618120; 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=N+X/grVf29WZuxv4++BbakS1OM0T868oNwwo4ynEHkI=; b=M1x7A+ERoPsiM5CgjSgr0OJ8k+b0doogdPtryH60Qpbs2hgCydg+5o6oehnxlxOCnS 26mrdpQ3TR0DhTIpA5IaXEU0J7cppVA3GCR79/30jqvXgmquF6Hg11H1bFWcFsZbqhq+ TcuXyMRhK5ZlX64flqnqruvaONn9s/iJL9cbNU6c/KngwJLrMfcV86yfh+Pqbnxb5kD8 oi2ISJWPGnaqm6y7hTrB4vC5arf0Zw3Hp/M/5BL5w+CdRdBIW7j1rcHk+fyRSsfpbFgH WcBtlqYTDzM6qeGUDIUEwqaE4JNfXH6/ks0Cxw7D3C27pjfpxLZwvgqEpqrBz0YfmAA8 6Y6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775013320; x=1775618120; 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=N+X/grVf29WZuxv4++BbakS1OM0T868oNwwo4ynEHkI=; b=D5sYjXBXby3p+GSwFBGKHSKer1KzWPwzhRxDhF/cUhU9dRLVfkKe+D3AVaxldGiK51 /niyxbfT1S4oyeELa8JTi3pgE/1BSz8JLuQSBWBoBsLgnU+BBx5h5RlYtNz+l7a7UUI0 N3Pc9jcOvarBvJrQQGQW05Havzj0STx3oZhKabsmQipM5wIeUjlLZudo4FAUiuWV4Tna 6i229fHRLuFur+dnS6PaTMjmMa+PtSDrZmYFHbP1jeqYJzLVfyva3qyQdW4cwKtIWC2+ WOZvgieQtbMvkAVGU24flAfzUYStLimAwLok/D4qxALyKDtO+2YFgIUPr63TeMAH8G+M 9rPQ== X-Forwarded-Encrypted: i=1; AJvYcCV1598GhE5du8+FE7y1jJLEQnNHxr/LAs7H5gt1vpGlwC9lb0o5ui/jvXHCZlSaszlRNbXSfbIoVzEyaBM=@vger.kernel.org X-Gm-Message-State: AOJu0YzlHP1rL0zQp6Q95B6ZEUpo7hNtyKYKVk4AaFAaslfn3PkaywgZ 44CGn2abrDBXiOwkYAuRLO7AewqFcduJakOLme0czamXZVRKIhlyni2mgumx91hMV0IRM+SxyjC y1Aam+CQ9kt5XHlJsGN+0YSv6dfWkg/FJTVhHZR8StiTockt3CSJ7MIT2MLwjjZk81Cs= X-Gm-Gg: ATEYQzzhP7du1CiR8xjGV/j76LqMeHk42hlWR663iW051WSYCL5VL2GPLICYhngkHlx D1XpAVy3/IQrvAQbz3YratV/bzWhonQ7rjLAmlFkS+LIg77EUyz4rGS7EB4dSEcaZEEnFYrAeSN QtLGTA30ambbx8SVkAOhCtEiOefBuj5Amcw1HM4JmmAzKsDDDMLF0scqQKNqmtKPbpd3BTKU8B4 j1ruo4uC7c4IGeSqEujsiD0zI64mFEj7sLt/1kcjhWxeLkgidLNpG7KSuioCoIB0LmwH+UH2sik 85MuNKw6X0LdwKzH//Gbs6ifhA4Rg6nHdi5CkR+woxSvbbcKpgDjCLlNK1jszV3cItUo8Vbxqcq 3oc4QdJmQErfHDllPmYPSag4QFfTq1zSX9nka8hYAKUufXUWDAc7qWqrdFO1sheedlpR+zBWYf2 vb9EHGuRCJa/2Bdv3JRfr3 X-Received: by 2002:a05:6a20:7d9d:b0:39b:e44e:d4d0 with SMTP id adf61e73a8af0-39ef7761c71mr1720694637.55.1775013319921; Tue, 31 Mar 2026 20:15:19 -0700 (PDT) X-Received: by 2002:a05:6a20:7d9d:b0:39b:e44e:d4d0 with SMTP id adf61e73a8af0-39ef7761c71mr1720652637.55.1775013319360; Tue, 31 Mar 2026 20:15:19 -0700 (PDT) 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 41be03b00d2f7-c76ad00a246sm3246584a12.16.2026.03.31.20.15.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Mar 2026 20:15:18 -0700 (PDT) From: Wangao Wang Date: Wed, 01 Apr 2026 11:13:47 +0800 Subject: [PATCH v6 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: <20260401-batch2_iris_encoder_enhancements-v6-5-7022af3401ff@oss.qualcomm.com> References: <20260401-batch2_iris_encoder_enhancements-v6-0-7022af3401ff@oss.qualcomm.com> In-Reply-To: <20260401-batch2_iris_encoder_enhancements-v6-0-7022af3401ff@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, Neil Armstrong X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1775013294; l=9503; i=wangao.wang@oss.qualcomm.com; s=20251021; h=from:subject:message-id; bh=QgNvV+ZUr+OfOkkdTV4lIksbgWp+1MZfPRhX2v/RhWQ=; b=WMQEdI6T/8L1d9ABxOKqIWQ4sLwH+6iCl16DupngNxgWMPMtTFX1ig91YwcIIXeACKGDnVwRH 5m2fwzd8Ep+Dfwbg/NGX96vuqFChWGUM0P2J9gHA1LZVz8OioApQggK X-Developer-Key: i=wangao.wang@oss.qualcomm.com; a=ed25519; pk=bUPgYblBUAsoPyGfssbNR7ZXUSGF8v1VF4FJzSO6/aA= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDAxMDAyMyBTYWx0ZWRfX/CMTQ2lzg9eZ DcpM1EaP05J3i3cvRIBhBFhHCMCQvjR9TxPd0A25tzln3ImRcLR7+CXLIJ6XCE2Yz05MeeErS9N mGA9LQIrH9FYY4IWSouHEdDQsj6adZuKgBwf8YEHZldJeeYeTe0M1teSvYaZMKAiUizmojBqqo8 h6WZxeuKoewx7AFvBJ8xdWhVmhcicgkQdJEBbIheN0PwSVLRNNqeg51Z6fi67ZJspaY0ryzYvMb sVcuV4oxssDSPvahBxgF2PsivVV7yRYBy2V8ni3vl0zL4te1WvSR72JkG4aL/knklbyYUh8zvWA oq9YZ1kF704qDm+3K+U5n/VT+FuMGrPF9hXjIgmvj+pIPpsJGeBhNfewJgl2jCTU01OQfM1tIZe V74V7or7dd1L2c1WBFJpI6BOFa37AlB5W3Z/yu/pwn7Ey40PzNmFHxahZeoa3SDgaNR5JxUY1DY ZQJNg7Jyii5+bH670Ng== X-Authority-Analysis: v=2.4 cv=G4ER0tk5 c=1 sm=1 tr=0 ts=69cc8dc8 cx=c_pps a=Oh5Dbbf/trHjhBongsHeRQ==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=7zm3FxsWSslHyZ29AF8A:9 a=QEXdDO2ut3YA:10 a=_Vgx9l1VpLgwpw_dHYaR:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: Wqpj7f9rdd0hc228If_H0qRnOumniQvO X-Proofpoint-ORIG-GUID: Wqpj7f9rdd0hc228If_H0qRnOumniQvO X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-01_01,2026-03-31_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 malwarescore=0 adultscore=0 impostorscore=0 spamscore=0 phishscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604010023 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. Reviewed-by: Dikshita Agarwal Tested-by: Neil Armstrong # on SM8650-HDK Signed-off-by: Wangao Wang --- .../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 702ca1835b816088ffec1b3a5ce315cdccb4d7c0..74738b00c57138e4eadbbb62cf9= dc9d8a815cf59 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c @@ -485,7 +485,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; @@ -498,14 +498,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: { @@ -514,7 +514,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: { @@ -533,7 +533,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: { @@ -543,7 +543,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: { @@ -552,7 +552,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: { @@ -560,7 +560,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: { @@ -568,7 +568,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: { @@ -576,7 +576,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: { @@ -592,7 +592,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: { @@ -600,7 +600,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: { @@ -608,7 +608,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: { @@ -627,7 +627,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: { @@ -637,7 +637,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: { @@ -662,7 +662,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: { @@ -671,7 +671,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: { @@ -683,7 +683,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: { @@ -691,7 +691,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: { @@ -700,7 +700,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: { @@ -709,14 +709,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: { @@ -724,21 +724,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