From mboxrd@z Thu Jan 1 00:00:00 1970 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 7F2EB280A58 for ; Mon, 12 Jan 2026 11:09:58 +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=1768216199; cv=none; b=DuJEIwSryc8sT8Iw0kdZ5Kw15Qr3jvkzJK1GzsYLWzbdTAnVoCj7sykSBZhWpakCaQhDsX3sTnFf1dtZWTiX0cj7Dn6UqRrvAuMNL5NhxG5cEY9HK6N0IRmxYYua2A+dF0jM+dSr3NKC3I2l8pUH3ORGAu3fFDrCQRjkOf1v8gs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768216199; c=relaxed/simple; bh=ZtPbgqz7BJQtQmo/NQXXac9kWs26vpASRvb6TMW6ziY=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=tq/OnkVSXjrFmBXGzS229skkQWSd3BSRmb7uLDOqfLv5LKkOe4+mM30MoYfZRZG7QVFvf6uM2Pbo6xvEz6ZOueLBC92NVMNKDdOBh23wmVmgDMnafSGx9iJzocvNIbPlkSL+tmn/xpakLTaYizaRMn57kwRUP2+n9lQcjLocddM= 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=lq6vwzjc; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=IWcEpgwA; 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="lq6vwzjc"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="IWcEpgwA" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 60C83Idr2829404 for ; Mon, 12 Jan 2026 11:09:57 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= 015MT2ydsbb65/BcmwavatLyyBIiF0F1nAMSpF1TgcM=; b=lq6vwzjclFv6c8L/ vWi4NYqOA9JFlEzAXqtC6SFerAkgwE2C2SFp/w4l0ZyPx99N19Nm7i/Q0MbUWmYu 3BdqT879HyXd2x5PAmRKIV8AsjwjN/fyZLVtYPXngLJ2ZY1lBa7qB1K87vtj73ys Q73k4j7d3UgVaGkZTLmSf9HR4TIW92ZCyy8S79ypy3DLKihC9otgr3uog+CKTs2E ronr6A9vuj4fvIZeyqVfhVLiibV9yg5SENrLt6Rx7foBH/cNHrzmdr5ofP5tis5N 1O+0jTJt6Vv4KMKj+/YbwSvQCiH0Qe3YWSI6AGM780n9l55FFCRzR/AJQV182kN8 BM5f3A== 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 4bmkk41wct-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 12 Jan 2026 11:09:57 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-2a08cbeb87eso70985085ad.3 for ; Mon, 12 Jan 2026 03:09:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1768216196; x=1768820996; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=015MT2ydsbb65/BcmwavatLyyBIiF0F1nAMSpF1TgcM=; b=IWcEpgwAU4ckMyQ6qUKL/kYs9ROc6ftsZxdz/2p+Nba0RzMxQ49QPkmzap+8Ynv6oO H6MA1HS4HEIoR6XFwrQitHgAX8nl6sWuZ6A9CUNP1rNMgblAeCPfv9b3fGJYYFehAqxU t83VcEBjQoWKDYDP8eR7AwFrtdzq2Ewt4ZbQDqquJxdVj7+e1pjtwrJOthcrfkACzD7b 0LTvzucEPxf1NN/pdaGPWBji92VcxqQbIZc8kyeBiV4HGCLE8iDZyppzEvHk47jlm0jJ 8wa6xzs0brlizzRnZHw1QJ1H5NIHYLriEPsKiEN5qrikJXGxLhi9bcsAoWg3ofFPK2Xd OUpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768216196; x=1768820996; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=015MT2ydsbb65/BcmwavatLyyBIiF0F1nAMSpF1TgcM=; b=ipBW+zt+tq5EUJGo8llSAZSEHjWM0GOydgbyiG2DtdFuH+b+54c92h3WCQZvJA1Wa3 nfyglnMv0MTr2tj5NBY+QwM4+amy3q70yUDQyi3nrBkhAINQDhgBB/KfMvwYikJCTb1e T/BgvMMqkSErAjFvh5UJmMEEoXgWbDvD1VWB39rkFd1quutOzt79C0vx2iZ5Kc0sAfzj S922uDvocKVM/oxUkXxkG3z+eoG1TUfJFLxx/4qRczrGOiiSJSUQjEFf3hSh7/O9K8wB 6M6ocxBxGVqR1mHliQJQVjII0F6KmpNRQxjevQyjj4fJVRitTGo8Zhy8ZxMrWp5youDe FEfA== X-Forwarded-Encrypted: i=1; AJvYcCUWYIzksxd+hGIxzyOStQlBry25SVQOClLc6GMFea9bZVO98rLcofapO5FvwOmZ/DLuLl3OTAQeLnyt4aw=@vger.kernel.org X-Gm-Message-State: AOJu0YyE7Ccd63mW9PT6scLoGug7omhkzin4bACd08t4jdF63xOmvhUL CizX66oF20TtIUju9gJbfApKLEt9fNX4NgRc0Bk5rSHtNz+5lNUYC81TRKV4anIqQt+l6Nqf/zL K9JX7z3h5YaD7Iqsdoc+ZMizSJCswcJUEmww9WC8KUSXQi8NhCDW7iU/10CgSZpejsDE= X-Gm-Gg: AY/fxX7Fte805+dbZqxYNWZD5cSLS0kcyDxHNMO4Yazjr20MVaiNx+GrrZ1PIz9ttc3 POfdPsue0kyFO/f3yRdFbGABljsHgeUp6Oilmt3SCNQxbNwTPFPRTJs5XgJgO+RR/vmtOeFaYYx jZAIFgY9L6+GNmlDU1BhD7ffGJPNn6OX1BAEqZ6bDXqums5AuMS94U4ljzoxwODV8Iok1F720Kd Pq7zSu32hZJF2OTyYFEIe6BjnQ3a5a/w6df0cyjqJo3fAbSOoQTGuzUttG8PY8VjA2jzJCVpYfC cBZKI1vi0+mdEd+9XSGHm+dWEpMrTkoAMFArgxbeYEWR6KacQ8kXytTNeewbKTOLc8AsmlMTNVy mH2xCNig6qc5E1i/xxZ7KXog8SW5LklrMehWRjKGPN+U= X-Received: by 2002:a17:903:1585:b0:295:ceaf:8d76 with SMTP id d9443c01a7336-2a3ee4aae0cmr169650625ad.47.1768216196338; Mon, 12 Jan 2026 03:09:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IEYc30TnIeP2dYkT6BhxScbMNpGpox1e5JPKeXjC5ZrQm8QkZyBqhdkrzoFxFEzQvExNTPw+A== X-Received: by 2002:a17:903:1585:b0:295:ceaf:8d76 with SMTP id d9443c01a7336-2a3ee4aae0cmr169650425ad.47.1768216195892; Mon, 12 Jan 2026 03:09:55 -0800 (PST) Received: from [192.168.0.171] ([49.205.249.58]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a3e3cd3284sm174523235ad.91.2026.01.12.03.09.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Jan 2026 03:09:55 -0800 (PST) Message-ID: <44e3dabf-fd08-49fc-b679-d496d125e788@oss.qualcomm.com> Date: Mon, 12 Jan 2026 16:39:50 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 6/6] media: iris: Prevent output buffer queuing before stream-on completes To: Dikshita Agarwal , Abhinav Kumar , Bryan O'Donoghue , Mauro Carvalho Chehab , Hans Verkuil , Stefan Schmidt , Hans Verkuil , Wangao Wang Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Bryan O'Donoghue , Vishnu Reddy References: <20251229-iris-fixes-v2-0-6dce2063d782@oss.qualcomm.com> <20251229-iris-fixes-v2-6-6dce2063d782@oss.qualcomm.com> Content-Language: en-US From: Vikash Garodia In-Reply-To: <20251229-iris-fixes-v2-6-6dce2063d782@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Proofpoint-GUID: MoMelGWRh7c36SwubwAI1naY3L11Dg6R X-Proofpoint-ORIG-GUID: MoMelGWRh7c36SwubwAI1naY3L11Dg6R X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTEyMDA4OCBTYWx0ZWRfX4Eybe/A5evJu IiSR1zqGwHseH2syP5qhVNdYoNNUOon9ThlcY0+HK9J8waY1miT6bIyyaq3bapEHHuJzPtc6EcN ew/aT6pmsUyYLcGZtIObPo1peFyjNnh71DLzWAEpnzTQ+F2m8+FPeDjMI0mWEWLGiMQqa3YmNML ygIwEDxFZVFSeH02IHFZlYSP4+BUy8AV2fylEhSTnUn3w8E4LrRljyjAGzCP/MKvSGldWqu2R8P FOUa59x007sryLsganA8HDLmNRTCrdZ2tIUfIPT0JIxb2cTAKFzot0W+SpYpSJqdDjt7m51rTB+ 96atYRabmYsBlvqovFeKmP+WbrUmG2tpRDfKnZV3bHLqp6llCgPfy29DJyejrRW9dbG1Bthe2Nt l7anjW7zJudcFUyiVxJ7mzHFJ6F8WaEdRLlfXs1Z8u18QTPVxAQdinjeYKr9RWshBMLP1wyoFiq IPgOgKaAj0bNIiqSssg== X-Authority-Analysis: v=2.4 cv=cs2WUl4i c=1 sm=1 tr=0 ts=6964d685 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=ntuG9qRpOVxPRPblRsQ5Fw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=EUspDBNiAAAA:8 a=-cBt4YmGFOJx8w6EWXAA:9 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q: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-12_03,2026-01-09_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601120088 On 12/29/2025 12:01 PM, Dikshita Agarwal wrote: > From: Vishnu Reddy > > During normal playback, stream-on for input is followed by output, and > only after input stream-on does actual streaming begin. However, when > gst-play performs a seek, both input and output streams are stopped, > and on restart, output stream-on occurs first. At this point, firmware > has not yet started streaming. Queuing output buffers before the firmware > begins streaming causes it to process buffers in an invalid state, leading > to an error response. These buffers are returned to the driver as errors, > forcing the driver into an error state and stopping playback. > > Fix this by deferring output buffer queuing until stream-on completes. > Input buffers can still be queued before stream-on as required. > > Fixes: 92e007ca5ab6 ("media: iris: Add V4L2 streaming support for encoder video device") > Signed-off-by: Vishnu Reddy > Signed-off-by: Dikshita Agarwal > --- > drivers/media/platform/qcom/iris/iris_vb2.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > diff --git a/drivers/media/platform/qcom/iris/iris_vb2.c b/drivers/media/platform/qcom/iris/iris_vb2.c > index 139b821f7952feb33b21a7045aef9e8a4782aa3c..bf0b8400996ece5c9d449b99609a302da726bf9a 100644 > --- a/drivers/media/platform/qcom/iris/iris_vb2.c > +++ b/drivers/media/platform/qcom/iris/iris_vb2.c > @@ -193,10 +193,14 @@ int iris_vb2_start_streaming(struct vb2_queue *q, unsigned int count) > buf_type = iris_v4l2_type_to_driver(q->type); > > if (inst->domain == DECODER) { > - if (inst->state == IRIS_INST_STREAMING) > + if (buf_type == BUF_INPUT) > + ret = iris_queue_deferred_buffers(inst, BUF_INPUT); > + > + if (!ret && inst->state == IRIS_INST_STREAMING) { > ret = iris_queue_internal_deferred_buffers(inst, BUF_DPB); > - if (!ret) > - ret = iris_queue_deferred_buffers(inst, buf_type); > + if (!ret) > + ret = iris_queue_deferred_buffers(inst, BUF_OUTPUT); > + } > } else { > if (inst->state == IRIS_INST_STREAMING) { > ret = iris_queue_deferred_buffers(inst, BUF_INPUT); > Reviewed-by: Vikash Garodia