Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796408725; b=ElYavrLBWzyDLLNaRicn2OXfD0QeD/rQ756dMu7iPjOIW1Wte1zBzq94z6xWWiIxXhg9 OerGTVhq94gwaSvgfUNEYQYJXqGwt4JYUcBOHpFFWtl7tyivY2fT0DX9hHKgyvRStWu2k MLpYZAMmhKvPSVssLZ61oeuXxuTr7F1+zkgLaISpFDBI2jq9DVuuHUQOtzPb57tUDsPid 67GDhhA9vk4YZZclFKW34xN/2PA1Wh3k7F1cE408u+Wsna90b0YC4Csl7mBWJgrDRO7eS 5rhypszZ3S45pUGCEZz/ONcc5H1d0ZF/RxWo2D3sZYu9NhxTXVP0WkQj4lETX7mbNlg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796408725; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:From:Date: Subject:MIME-Version:Content-Type:Content-Transfer-Encoding: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Proofpoint-ORIG-GUID: X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-Spam-Info:X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=kLiRfG1+L6zLEUGs00fM0l+cn4nu3XTvwKuY5PR9YnU=; b=r9ow67YM8zVzBQ+XrR790nnjtADQJj8CfmGm3x5NI0VhbmhxX+3TsaT4DG9YdJdKIXTp wwO2hQ3w+h9H89b0PNPzF63l18yC/pYuJIT4o73EDwYwvaKoMAqCDsqttw7FQuP/8qE/7 HVIh40DOVgXKoY3VGHpAJ+wyS3iT0RNyv44ep0v3gA5Yda+jFBVpD/k5dLmyKSe+11AXk uAyoTWQTWt2QZTKVo6WUfem5J8qUfPJy9SWJrsRlCQSvcyUudr5kbJwN/WyZfqd21Jvom hJagdxK4JK4n2tkxWqVf5ao/TJaon2YfpgKA2fgTWz4UC+5PE8yepv6Thu9qU5bsZcg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=nEHDHpm5; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=WTNi9uwl; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 35FD6606A68F for ; Fri, 4 Dec 2026 18:25:24 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 35FD6606A68F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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.a=rsa-sha256 header.s=qcppdkim1 header.b=nEHDHpm5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=WTNi9uwl Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B4I6ivZ4011858 for ; Fri, 4 Dec 2026 18:25:24 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= kLiRfG1+L6zLEUGs00fM0l+cn4nu3XTvwKuY5PR9YnU=; b=nEHDHpm5cc3/G6Zl kO0umWaREdiRW0ZNcwSYVz1fzqIPp2pn5cgK2BnxQ4apLCrCrCZeQYTwav268ZNK h8/C14trpybGeqZJw3f1BxVWnuGP1G+P9+YDkP7wmAiFuOm62ten4Y0JxJVFj0SL saxFbfvGZ/LKfk2GM8BvZwpN2UUaCYSfcSgG4b0IB9sjDG3YgT5ghzkWIldzNvr/ 9a5bjXMrbx/tCpBuKA8HZuV65vqWcw5syO8fWz5v8gFDzoxtDpunS85YoQkExnn9 4S0gDXQ5MiuF/dlEHIXCnV14+ps1NaAChlQVMWyLmoW0djpGMj3A37RzelmxLS04 KJJ6Ww== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4jbq7ujesp-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 04 Dec 2026 18:25:24 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-94961ed97d6so212067385a.1 for ; Fri, 04 Dec 2026 10:25:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796408723; x=1797013523; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=kLiRfG1+L6zLEUGs00fM0l+cn4nu3XTvwKuY5PR9YnU=; b=WTNi9uwlP7VxiwOGN6zJe/V1PVOS8cWU71cu5vqUmrJfYkG83PVdl7x+8el9eu3zKT /4XtBqV4y5q+/+u4yrwq1R3oaeo2aTbuY0Y9qdavnQJh7q6G1xN5QGy1idl0NY+hWrMB 9GAys9OyenNesDJwXZloGeff9JxpYhukHa5X69TiVLByhKODvHUeGeOg+rVgGgZhy60a I3mIcyqYIs1wd0L8K6NSrNBb71lXF7VEZ/aecFWKaW/vH1D2zv2D7zENHsiwaY8VtwIE eaEQv7QvwK/+0EqL3mtHUJAgcLBhOOwvehD/bz7I7IMHJ7stBMRsGCBCJHIHokMVVS07 UuBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796408723; x=1797013523; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :content-type:mime-version:subject:date:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=kLiRfG1+L6zLEUGs00fM0l+cn4nu3XTvwKuY5PR9YnU=; b=bhY7r+rVtzUUhehXOmoi3jYQCsHieu5exGeiR5qLv8PTyotlyUdo/1AXFgiqK757d/ 1MMpBH5p+N81Q1KAK4e+y/EVJqajCa+/C3MeHju4t74t6fMS1gU6Kr4Zy96VgCpjMaJg tOwfYYzyfjHyze25/pRykbhQ1g06otVNVzu4D1JdSqdSyOYGokVs6lV590lZyrOcoKDN M1EmttVgrpE8JT/5AVSVWHhzEbyz3HP4IAwJ1FJHeZvquGxPR7Jt8lPWd9g8OIbDG3ZA Ec9yqAnka6VnfbV4sgFA2r7rXBkWqyx6MRk51fav8Clbvpl9G6hwIj5Ih4HmU++7/UyL chYw== X-Forwarded-Encrypted: i=1; AL+hErF4yJRQV0Ks4bNQB4ykwfnRJpimM84ysZNaScUpEjYn/cqLIPfp49R8L6Q40WGhDRebLc9nYmymXP6s30M=@vger.kernel.org X-Gm-Message-State: APuU4Z/VJRci9Oyy4y5dCyY86A1PP6YdZ+9JbeIcDs30zOqgqPs9mLXB b5/ZLWQ3+EZkBTko1ugHvv/nlJjIsAsnmRensdO4METoz9t+ZKVfKqcE78a1rd6TP2abkHICCMs y+dgfUyTICx2nkiblrMFRE72kM/Rnd8tjShHBtIgMKoDSoTBwrJ2ApeuptaZfbPnFUes= X-Gm-Gg: AZFdTZchJhryFjNbHWHE7EMbiG7txBff1fBhRRgqvFMcqj7iqBo1ncOfVg3wNt3stGm r5XAPFZXqtoKNjMf5rkSewA1xZXR/becFF57DpkkiogoNfg+p8KGxcJ4MHvUvxALgJAc5w3ED8m s9jNAXP1CrjmGIhg8pztT3IsbzrzZ9xEqPoW2/9GrGFf7GbIVXcu18DHTcj5fZPNT0LveM/fvq6 OHcB8yLMTdzg9/VJgQQlhCqlBowrWlvY4a3S//Drq7+UVlHtPXHSPLGZQmVBa6RVfKSXe0g/ILR LxfT0SVngSHQXakjlwyWJnURt3/Dn5JoeFzzTtgieoHYxSqzE1jc70zfH5baykJmnJ88yKxt7JI XoUZ4MN9utzz1uPor6cG0L3kYfAOyimtkXvo3nKbVdEitfutgmfftE/WnJWWu+CkHnomo59tM61 HNaw2lMEhzCM3oGheKmG6W/iXB3RUieWViJgcE+pNlRvklQD1SjR02Rvxm7Sv5Rw== X-Received: by 2002:a05:620a:a717:b0:93f:22af:ccdc with SMTP id af79cd13be357-94a7de0d447mr463394585a.4.1796408723281; Fri, 04 Dec 2026 10:25:23 -0800 (PST) X-Received: by 2002:a05:620a:a717:b0:93f:22af:ccdc with SMTP id af79cd13be357-94a7de0d447mr463390085a.4.1796408722565; Fri, 04 Dec 2026 10:25:22 -0800 (PST) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3b0037ac7fasm9647221fa.25.2026.12.04.10.25.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Dec 2026 10:25:21 -0800 (PST) From: Dmitry Baryshkov Date: Fri, 04 Dec 2026 20:24:51 +0200 Subject: [PATCH v2 10/13] media: iris: support interlaced MPEG2 content X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261204-iris-vp8-v2-10-462f9b48d246@oss.qualcomm.com> References: <20261204-iris-vp8-v2-0-462f9b48d246@oss.qualcomm.com> In-Reply-To: <20261204-iris-vp8-v2-0-462f9b48d246@oss.qualcomm.com> To: Vikash Garodia , Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.16.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=6910; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=vjxfu0o5A0MajZ1u6RR9ac+hl7qFzeopRkbUqUfn7UA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBrEwV3ATL2FDJnDYcX4IWCw1C5PXrhBFq7GaGbc u5CDjh3geqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCaxMFdwAKCRCLPIo+Aiko 1UfLB/9tVDkK60FD95R7YOioggIqtXNrlIjhmHdVxBBUscsqq8PtvMHdlYURbH6zZ1XtKat/9Gp qzVReDLnNNRRVfXEjh23mOnoDfr0eoq4KKmuEqzjqu3kpgSaH6wLLzLVQbhxx2Z3uB9PJcxA+t2 8LzNvFq2pR0C8xXfObDyg+JUKCxXJivo58y3WVzy0iLYr2g5hQ/dKdboDrPN4Z8G1cobPTqRzph 5vokuAbOJbgY/UsCeaIXCGK5MRBRQvpm4UEJ+ZafxLNdsV0Pt0yp+bO8J/3z74yQdERNTdXFzQy a7YQcAptb6mTrFBmCNgKPYYRE6YH4EFNCIHOQtjZr1PUgbX8 X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-ORIG-GUID: 5jCywToXMitsAGjnEO2HH8ZDLYSLUCYa X-Authority-Analysis: v=2.4 cv=fo9J914f c=1 sm=1 tr=0 ts=6b130594 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=4A7Sio3iSqAJAsTUQI0A:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjA0MDA3MyBTYWx0ZWRfXytAakMeEaGqb nySFbMHp77W0ghn2fP5F0r8d9cnuJFHzrkd8VOYB9zZ8g1LA+toJWsdMeCyW2QG89HrAvX8MyCz 3N4CXlqXFR5EgCRWSN0NrH0sR29Y/ZST+9ukVvA3oNVrxYrv8F7Z5WrhILkKUtNZzjHx+1rtsiE FO3BZQ7x8gZ/D1uWw4QMCmLBr7wKzrSpjUlCEtIvZ42RHYTdJvPqAhvY/FtOjm/7PK6xLes7FF2 kcXVTOMfr6hBmAoAvTXwMHzNmatusQmLlfdJh1OFimuMSysH4NewSzCq8oMdD7cz1LI3ixnfSOI /Jg0q3dS98/y3pDH9YGV5tkjz0qv4810WOf5ngxCp+pRg8Ya/cr0ovpF3UkqsYnINNMUnpWvMax D5CLloYZuBWzmcYZC/y9M/I11lnQIkR4gum667sZRU8vSIZItC5bMYcbBpuWnTDhgfJY61j8tDs /yvXn7KqOqDqxfk3hcQ== X-Proofpoint-Spam-Info: AW1haW4tMjYxMjA0MDA3MyBTYWx0ZWRfX4ICiyrz95Urh DoulawGLe6WAgfC45xA1SJklIHIx6WBHdvb2ZTRG0YsKftkGnnDgqxt6L5oVm4FWvEfIcImTaTn 3Bow+afJtLhyAOHSushAGvN4D94VPt4= X-Proofpoint-GUID: 5jCywToXMitsAGjnEO2HH8ZDLYSLUCYa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-04_04,2026-12-03_04,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 phishscore=0 malwarescore=0 bulkscore=0 clxscore=1015 suspectscore=0 adultscore=0 priorityscore=1501 lowpriorityscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612040073 The Gen1 firmware reports whether a decoded stream is interlaced through the progressive_only field of HFI_PROPERTY_PARAM_VDEC_PIC_STRUCT. The driver treats any interlaced content as unsupported and moves the instance to the error state, so interlaced MPEG2, which is common, cannot be decoded at all. Accept interlaced MPEG2. Track the interlaced state on the instance, report V4L2_FIELD_INTERLACED on the capture queue, use a single pipeline stage and skip the bin buffer, as the downstream driver does. Keep rejecting interlaced H.264: streams mixing frame and field coding (MBAFF and PAFF) make the firmware fail fatally on both SM8250 and SC7280, even with all internal buffers sized as downstream does. Signed-off-by: Dmitry Baryshkov --- drivers/media/platform/qcom/iris/iris_ctrls.c | 5 +++-- drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c | 7 ++++++- drivers/media/platform/qcom/iris/iris_instance.h | 2 ++ drivers/media/platform/qcom/iris/iris_vb2.c | 2 -- drivers/media/platform/qcom/iris/iris_vdec.c | 2 ++ drivers/media/platform/qcom/iris/iris_vpu_buffer.c | 7 +++++++ 6 files changed, 20 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/qcom/iris/iris_ctrls.c b/drivers/media/platform/qcom/iris/iris_ctrls.c index b8414c6da2d0..5efbce4383c9 100644 --- a/drivers/media/platform/qcom/iris/iris_ctrls.c +++ b/drivers/media/platform/qcom/iris/iris_ctrls.c @@ -554,8 +554,9 @@ int iris_set_stage(struct iris_inst *inst, enum platform_inst_fw_cap_type cap_id u32 work_mode = STAGE_2; if (inst->domain == DECODER) { - /* The two-stage pipeline cannot decode MPEG1 or MPEG2 */ - if (inst->codec == V4L2_PIX_FMT_MPEG1 || + /* The two-stage pipeline cannot decode interlaced, MPEG1 or MPEG2 content */ + if (inst->is_interlaced || + inst->codec == V4L2_PIX_FMT_MPEG1 || inst->codec == V4L2_PIX_FMT_MPEG2 || iris_res_is_less_than(width, height, 1280, 720)) work_mode = STAGE_1; diff --git a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c index 3195cf0ffda7..8de6d86e7c66 100644 --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_response.c @@ -170,11 +170,15 @@ static void iris_hfi_gen1_read_changed_params(struct iris_inst *inst, num_properties_changed--; } while (num_properties_changed > 0); + /* pic_struct carries progressive_only: 0 means the content is interlaced */ + inst->is_interlaced = !event.pic_struct; + pixmp_ip->width = event.width; pixmp_ip->height = event.height; pixmp_op->width = ALIGN(event.width, 128); pixmp_op->height = ALIGN(event.height, 32); + pixmp_op->field = inst->is_interlaced ? V4L2_FIELD_INTERLACED : V4L2_FIELD_NONE; pixmp_op->plane_fmt[0].bytesperline = ALIGN(event.width, 128); pixmp_op->plane_fmt[0].sizeimage = iris_get_buffer_size(inst, BUF_OUTPUT); @@ -231,7 +235,8 @@ static void iris_hfi_gen1_read_changed_params(struct iris_inst *inst, iris_hfi_gen1_update_profile_level(inst, event.profile, event.level); - if (event.bit_depth || !event.pic_struct) { + if (event.bit_depth || + (inst->is_interlaced && inst->codec != V4L2_PIX_FMT_MPEG2)) { dev_err(core->dev, "unsupported content, bit depth: %x, pic_struct = %x\n", event.bit_depth, event.pic_struct); iris_inst_change_state(inst, IRIS_INST_ERROR); diff --git a/drivers/media/platform/qcom/iris/iris_instance.h b/drivers/media/platform/qcom/iris/iris_instance.h index 771269e705d9..fe702ebc4409 100644 --- a/drivers/media/platform/qcom/iris/iris_instance.h +++ b/drivers/media/platform/qcom/iris/iris_instance.h @@ -56,6 +56,7 @@ struct iris_hfi_session_ops; * @metadata_idx: index for metadata buffer * @codec: codec type * @last_buffer_dequeued: a flag to indicate that last buffer is sent by driver + * @is_interlaced: a flag to indicate that decoded content is interlaced * @last_buf_ns: start time of received input buffer for current one second FPS window * @frame_counter: input buffer counter for current one second FPS window * @frame_rate: frame rate of current instance @@ -104,6 +105,7 @@ struct iris_inst { u32 metadata_idx; u32 codec; bool last_buffer_dequeued; + bool is_interlaced; u64 last_buf_ns; u32 frame_counter; u32 frame_rate; diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c index 2d5052782975..6638a899ea31 100644 --- a/drivers/media/platform/qcom/iris/iris_vb2.c +++ b/drivers/media/platform/qcom/iris/iris_vb2.c @@ -268,8 +268,6 @@ int iris_vb2_buf_prepare(struct vb2_buffer *vb) if (V4L2_TYPE_IS_OUTPUT(vb->vb2_queue->type)) { if (vbuf->field == V4L2_FIELD_ANY) vbuf->field = V4L2_FIELD_NONE; - if (vbuf->field != V4L2_FIELD_NONE) - return -EINVAL; } if (!(inst->sub_state & IRIS_INST_SUB_DRC)) { diff --git a/drivers/media/platform/qcom/iris/iris_vdec.c b/drivers/media/platform/qcom/iris/iris_vdec.c index 737ccad68314..8ef3aa068c0c 100644 --- a/drivers/media/platform/qcom/iris/iris_vdec.c +++ b/drivers/media/platform/qcom/iris/iris_vdec.c @@ -241,6 +241,7 @@ int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f) fmt = inst->fmt_src; fmt->type = V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE; fmt->fmt.pix_mp.pixelformat = f->fmt.pix_mp.pixelformat; + fmt->fmt.pix_mp.field = f->fmt.pix_mp.field; inst->codec = fmt->fmt.pix_mp.pixelformat; codec_align = inst->codec == V4L2_PIX_FMT_HEVC ? 32 : 16; fmt->fmt.pix_mp.width = ALIGN(f->fmt.pix_mp.width, codec_align); @@ -280,6 +281,7 @@ int iris_vdec_s_fmt(struct iris_inst *inst, struct v4l2_format *f) fmt = inst->fmt_dst; fmt->type = V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE; fmt->fmt.pix_mp.pixelformat = f->fmt.pix_mp.pixelformat; + fmt->fmt.pix_mp.field = f->fmt.pix_mp.field; fmt->fmt.pix_mp.num_planes = 1; switch (f->fmt.pix_mp.pixelformat) { case V4L2_PIX_FMT_P010: diff --git a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c index e4add2bd05e2..e74746d73ea7 100644 --- a/drivers/media/platform/qcom/iris/iris_vpu_buffer.c +++ b/drivers/media/platform/qcom/iris/iris_vpu_buffer.c @@ -1001,6 +1001,13 @@ static u32 iris_vpu_dec_bin_size(struct iris_inst *inst) u32 height = f->fmt.pix_mp.height; u32 width = f->fmt.pix_mp.width; + /* + * The bin (scratch) buffer is not used when decoding interlaced + * content. + */ + if (inst->is_interlaced) + return 0; + if (inst->codec == V4L2_PIX_FMT_H264) return hfi_buffer_bin_h264d(width, height, num_vpp_pipes); else if (inst->codec == V4L2_PIX_FMT_HEVC) -- 2.47.3