From mboxrd@z Thu Jan 1 00:00:00 1970 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 969163A1A4D for ; Tue, 12 May 2026 08:55:42 +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=1778576152; cv=none; b=bAA1eGVPi/FwJjv2iSMg7VEyFvryqP2pQOzyl/2ZppfC6DGS+EM+1JF8jwKFjiM+r/RmwhxiXIedxeRQkuDhmf1jR2tGHbTCQbCaAYlGA+4Ufypf53gCfSTYJgMLIe94icCj03A7XGkzVslbvC9wM7ZbyxxYzcbqj6/H4clLgr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778576152; c=relaxed/simple; bh=oKyxv1kvMdyRYLfpJoBQM0SLvUyZbzRQr78EWfmIvEI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=BcsXbLA2ROxwS/bL4EoS1+h/eu7d5c07pJIaJP41p3NYvAEU9YaTCKv6nckaSmptsXNRt7nqJyFRLK3FdQpPESgrxvFXy0a7nujQ+iG9OPhuLUr54C+gJXEPVqJSaoMIGoLwmAe/ci9WhfCerotMdC/Keq1AMM5KOmfOevQzEC4= 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=H+css+vK; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=KQc8VoR4; 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="H+css+vK"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="KQc8VoR4" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 64C5B1Vn2573884 for ; Tue, 12 May 2026 08:55:38 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= fUMIIa00afYZEA5MbAYNO41DoI7NKvRkyQl5PMTlsFU=; b=H+css+vKjMod976+ mdNUAettKOoF5WvuHJKYFQRBUwE4ZUN1R8q6B1U2OBQsn1P2Iq+9zIZj6zXbqLxt IisGi6iQ02quDfmxtvT0+Pcs/ddUqTETLMTx9Zew1ePmBc/AXpW8+zTeLWDnxwze uuM7DESM03nE11vbpLdLKiQFHyvtxj+c/FAC61yv/e3bUcfpsai5PWW6hn3FNnUk EH2t1IP6nkOjND37bGK7PYZ3enEqxjqjkNgVaQy6Y1gnsM4Fx9AqvU+JmIk9VamK Qn4D5KR/dqLOEfI5N/rG74MGQcW1A/asKAw3zF1o/3Pb9zs/QLVzG/LfMcm+T90Z 6EnlUw== Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e3nv2ab5n-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 12 May 2026 08:55:38 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2ba86e35aa1so80521715ad.1 for ; Tue, 12 May 2026 01:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778576138; x=1779180938; 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=fUMIIa00afYZEA5MbAYNO41DoI7NKvRkyQl5PMTlsFU=; b=KQc8VoR4HyyNo5OlfdD7rzghR/ONFHr1qXV6wDBRQSmHoo0Bjf3Ln2fYcJHSOWWrq4 dwlVOgz8Vfl4PZC/yhYsiiXeidglVJ/jaZ+M3zMgy28bCPqPt9UAcutbhTyg4DKyWL1x 1cKCc1nUxIHNUanUb2KxnYQtSIon9k5rt0PVAK7xk3IVoblJVBIduGXd0RSMC/spT0Mr cLQggWeyG8OzArbOr+OyqHkkSkkrR/8wr8fJPvisx97KF6L1/LKn6W5VrMkTFyO0/JQW YBACokC4EWsKzuSrPLxVlu/n/kZkDHYJtjBEABF5ZNGEbKA5aX7JJLugtGYsY6V9LGSz ulcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778576138; x=1779180938; 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=fUMIIa00afYZEA5MbAYNO41DoI7NKvRkyQl5PMTlsFU=; b=iv1ZDqIBAM43lgxI8Rt1g2viJJC8Bx4GLsZX2yhwd+iMQm5VO+2h7C6L6o8lcSuBvW x51DvHWpUzsjlnrCv7xcdRLz7HHvMEFJ17R74Z4DwOgCjM8pJ7UMX6E0Ndvd1CZ+PN3Z Ilea6gSrYGEFJoTpZBHmnQ/F+wokyt2O5dChJlfDU7zYJLynE+XJHV6//nWX4JZMGulP DN0V/isgBrV8a7tq1DqzvjTuJ1NvDO38Dr3BX/cCRxjuuxQkgDZv5Wvgp/s/d6wE9ljp vfNIF21q+0E7PgBdwTugrm4k7pI68sEMLKd5kNzKjoc7ZZMW1WmG816q+xQ+E7uldWZt ZnLw== X-Forwarded-Encrypted: i=1; AFNElJ8lfMEVyuVFRqUEz5j+D2mmg9d2oWrxAGb0c51+o8Fe29VqCq3M9ynM5sGzOPod5cwoqQPj/B+XYHX8voM=@vger.kernel.org X-Gm-Message-State: AOJu0YwqKi16DFM6DYjrp0wEs5dOVmWxk9Hkr5ZxxoCpAnBOAXACt6d5 RCIeAY874Nje/xS1RnrS4Tcb+KomEpzSy7b1Fz4tDzlkwqg28iorMZj0gcEUUYzq4xykEQQSm8I o7cbb+GUWXIviNQmt/oj+NFAExTWJuMvPnf7KsvcmWiQy7BQJPC32ac+54suDLcZB3YM= X-Gm-Gg: Acq92OFYNtPJASYb94MX7PqT9sVeGF0tZIAhhtfWwGChEq6UgYVwKH0rGHcxGTcdl9z yqqEHtTaZR31cpsYTh0+Et2UAvvsu8PIVDBq6XOIvjcPbtGReRvjbGSlyZkcmiluPP2qfEVBAUU gCX21ePpmII8uCMzjLse5gkegkeNhBHUFj6OewjAzpJSrO9MMBcxUi+B0Dwwu3zjpjLrZUehYuf /kqia7VSoJxGYU7VFfM35xijjYYWqJ2jVQiaVWugd/uJOhGT/QsWrxH4pHdB5LYLlZHqPSnfu/f NWH45VZPv7kIWtthVe16TeZEcDQvhVVvXphFPqrk5ZSDA5Q7Nf0QlJF6lzkaRyw0WwWKDhqpThA A51C2Op6wjTq6Vl8Cf7RmoqzgJa+fG9s0JOYxGWfCZqZqx7UcAdQwDdpWBMaW/fqO5oi2NxFshw Rue7Wcq3ZVZQrqkBBr6ZrZ X-Received: by 2002:a17:903:37c5:b0:2bc:e628:9cc7 with SMTP id d9443c01a7336-2bd012d5bf8mr24144905ad.24.1778576137627; Tue, 12 May 2026 01:55:37 -0700 (PDT) X-Received: by 2002:a17:903:37c5:b0:2bc:e628:9cc7 with SMTP id d9443c01a7336-2bd012d5bf8mr24144625ad.24.1778576137140; Tue, 12 May 2026 01:55:37 -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 d9443c01a7336-2baf1e90854sm127641405ad.66.2026.05.12.01.55.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 01:55:36 -0700 (PDT) From: Wangao Wang Date: Tue, 12 May 2026 16:55:14 +0800 Subject: [PATCH v7 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: 7bit Message-Id: <20260512-batch2_features-v7-5-4954e3b4df84@oss.qualcomm.com> References: <20260512-batch2_features-v7-0-4954e3b4df84@oss.qualcomm.com> In-Reply-To: <20260512-batch2_features-v7-0-4954e3b4df84@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Wangao Wang , Neil Armstrong X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1778576115; l=9503; i=wangao.wang@oss.qualcomm.com; s=20251021; h=from:subject:message-id; bh=oKyxv1kvMdyRYLfpJoBQM0SLvUyZbzRQr78EWfmIvEI=; b=orPoYIW33IQqzM3j6w/JUwIqmjRRRDk6d3p3IaZXfDZbBnkhYbt104RyWP//mD6TzXP+i5ozs YAhAfE7p+Z8AoeLLTa3SaOLQUgH4LqmI0NUcnmGDR9DN3sukvBBvZQY X-Developer-Key: i=wangao.wang@oss.qualcomm.com; a=ed25519; pk=bUPgYblBUAsoPyGfssbNR7ZXUSGF8v1VF4FJzSO6/aA= X-Authority-Analysis: v=2.4 cv=IsAutr/g c=1 sm=1 tr=0 ts=6a02eb0a cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=nuhDOHQX5FNHPW3J6Bj6AA==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=7zm3FxsWSslHyZ29AF8A:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-GUID: 8T5pD7U0UMeXDz-z-L819dK43kDPzu4E X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTEyMDA5MCBTYWx0ZWRfXxIWvBBONDryU ebmD1NoLg51T3dI3zTMSNfGfmRnjdphPHajLGNwEvsNeNhw70qwSICR51nlcT37SfHP5lVDB3/T VnhH2g+/rfew19QlB1gMVa5Yfnjby1t1slfQCVPdzJWn4mHFxn8BphD6MDygoUB2ywMUsFLr5pn ymRyi2tzP7j6IBy/xjQ85HdZm3ds9uyNXyzuIjmiB5+KyB7BKv5BTCKZEUpEkIjUguR705l888n v3xaENhjOhlX9uvytUw9l8s/SrlNh0VOhfenMkccPNIla+a/cjaPHkIWBwyU1DpmRfwsYLtYmC1 QSNgqDvXLruRonKxidjzyB1vG5eHK0YEkndtDr9N9HZ4pLIm6EFAMxwXGEd1ono12yJWspTcq2L vg9NmG9c5NFe2HTcOVMNUtDQOr2herSh2wX4A+esQ9xAJ2e+7mjCAVrimBxAMWz1Ly2Ue0VJOag skdRQzb4Kik2sFSufgg== X-Proofpoint-ORIG-GUID: 8T5pD7U0UMeXDz-z-L819dK43kDPzu4E 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-05-11_05,2026-05-08_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 bulkscore=0 clxscore=1015 phishscore=0 malwarescore=0 impostorscore=0 priorityscore=1501 adultscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605050000 definitions=main-2605120090 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/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c index 4cb54e5e4f1f15137d08027ac9a0d46c46784ea8..7674b47ad6c49adfaf16b444c8ec7295b230a529 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_session_set_property_pkt *p { void *prop_data = &packet->data[1]; - packet->shdr.hdr.size = sizeof(*packet); + packet->shdr.hdr.size = sizeof(*packet) + sizeof(ptype); packet->shdr.hdr.pkt_type = HFI_CMD_SESSION_SET_PROPERTY; packet->shdr.session_id = inst->session_id; packet->num_properties = 1; @@ -498,14 +498,14 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p fsize->buffer_type = in->buffer_type; fsize->height = in->height; fsize->width = in->width; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*fsize); + packet->shdr.hdr.size += sizeof(*fsize); break; } case HFI_PROPERTY_CONFIG_VIDEOCORES_USAGE: { struct hfi_videocores_usage_type *in = pdata, *cu = prop_data; cu->video_core_enable_mask = in->video_core_enable_mask; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*cu); + packet->shdr.hdr.size += sizeof(*cu); break; } case HFI_PROPERTY_PARAM_UNCOMPRESSED_FORMAT_SELECT: { @@ -514,7 +514,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p hfi->buffer_type = in->buffer_type; hfi->format = in->format; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*hfi); + packet->shdr.hdr.size += 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_session_set_property_pkt *p info->plane_format[1].buffer_alignment = 256; } - packet->shdr.hdr.size += sizeof(u32) + sizeof(*info); + packet->shdr.hdr.size += sizeof(*info); break; } case HFI_PROPERTY_PARAM_BUFFER_COUNT_ACTUAL: { @@ -543,7 +543,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p count->type = in->type; count->count_actual = in->count_actual; count->count_min_host = in->count_min_host; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*count); + packet->shdr.hdr.size += sizeof(*count); break; } case HFI_PROPERTY_PARAM_VDEC_MULTI_STREAM: { @@ -552,7 +552,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p multi->buffer_type = in->buffer_type; multi->enable = in->enable; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*multi); + packet->shdr.hdr.size += sizeof(*multi); break; } case HFI_PROPERTY_PARAM_BUFFER_SIZE_ACTUAL: { @@ -560,7 +560,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p sz->size = in->size; sz->type = in->type; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*sz); + packet->shdr.hdr.size += sizeof(*sz); break; } case HFI_PROPERTY_PARAM_WORK_ROUTE: { @@ -568,7 +568,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p u32 *in = pdata; wr->video_work_route = *in; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*wr); + packet->shdr.hdr.size += sizeof(*wr); break; } case HFI_PROPERTY_PARAM_WORK_MODE: { @@ -576,7 +576,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p u32 *in = pdata; wm->video_work_mode = *in; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*wm); + packet->shdr.hdr.size += sizeof(*wm); break; } case HFI_PROPERTY_PARAM_PROFILE_LEVEL_CURRENT: { @@ -592,7 +592,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p /* Level not supported, falling back to 1 */ pl->level = 1; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*pl); + packet->shdr.hdr.size += 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_session_set_property_pkt *p u32 *in = pdata; en->enable = *in; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*en); + packet->shdr.hdr.size += sizeof(*en); break; } case HFI_PROPERTY_CONFIG_VENC_TARGET_BITRATE: { @@ -608,7 +608,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p brate->bitrate = in->bitrate; brate->layer_id = in->layer_id; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*brate); + packet->shdr.hdr.size += sizeof(*brate); break; } case HFI_PROPERTY_PARAM_VENC_RATE_CONTROL: { @@ -627,7 +627,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p } packet->data[1] = *in; - packet->shdr.hdr.size += sizeof(u32) * 2; + packet->shdr.hdr.size += sizeof(u32); break; } case HFI_PROPERTY_PARAM_VENC_H264_ENTROPY_CONTROL: { @@ -637,7 +637,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p entropy->entropy_mode = *in; if (entropy->entropy_mode == HFI_H264_ENTROPY_CABAC) entropy->cabac_model = HFI_H264_CABAC_MODEL_0; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*entropy); + packet->shdr.hdr.size += 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_session_set_property_pkt *p ((max_qp & 0xFF) << 16); range->min_qp.enable = 7; range->max_qp.enable = 7; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*range); + packet->shdr.hdr.size += sizeof(*range); break; } case HFI_PROPERTY_CONFIG_FRAME_RATE: { @@ -671,7 +671,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p frate->buffer_type = in->buffer_type; frate->framerate = in->framerate; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*frate); + packet->shdr.hdr.size += sizeof(*frate); break; } case HFI_PROPERTY_PARAM_UNCOMPRESSED_PLANE_ACTUAL_INFO: { @@ -683,7 +683,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p plane_actual_info->plane_format[0] = in->plane_format[0]; if (in->num_planes > 1) plane_actual_info->plane_format[1] = in->plane_format[1]; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*plane_actual_info); + packet->shdr.hdr.size += 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_session_set_property_pkt *p intra_refresh->mode = in->mode; intra_refresh->mbs = in->mbs; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*intra_refresh); + packet->shdr.hdr.size += sizeof(*intra_refresh); break; } case HFI_PROPERTY_PARAM_VENC_LTRMODE: { @@ -700,7 +700,7 @@ iris_hfi_gen1_packet_session_set_property(struct hfi_session_set_property_pkt *p 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); + packet->shdr.hdr.size += 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 = in->frames; ltr_use->ref_ltr = in->ref_ltr; ltr_use->use_constrnt = in->use_constrnt; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*ltr_use); + packet->shdr.hdr.size += sizeof(*ltr_use); break; } case HFI_PROPERTY_CONFIG_VENC_MARKLTRFRAME: { struct hfi_ltr_mark *in = pdata, *ltr_mark = prop_data; ltr_mark->mark_frame = in->mark_frame; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*ltr_mark); + packet->shdr.hdr.size += 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 intra_period->pframes = in->pframes; intra_period->bframes = in->bframes; - packet->shdr.hdr.size += sizeof(u32) + sizeof(*intra_period); + packet->shdr.hdr.size += sizeof(*intra_period); break; } case HFI_PROPERTY_PARAM_VENC_HIER_P_MAX_NUM_ENH_LAYER: { u32 *in = pdata; packet->data[1] = *in; - packet->shdr.hdr.size += sizeof(u32) + sizeof(u32); + packet->shdr.hdr.size += sizeof(u32); break; } case HFI_PROPERTY_CONFIG_VENC_HIER_P_ENH_LAYER: { u32 *in = pdata; packet->data[1] = *in; - packet->shdr.hdr.size += sizeof(u32) + sizeof(u32); + packet->shdr.hdr.size += sizeof(u32); break; } default: -- 2.43.0