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 155A32D73B4 for ; Tue, 18 Nov 2025 05:19:51 +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=1763443193; cv=none; b=sih+Axjjgdo0NZ/9TvpUxy5nM0ZJkdRvkEDSM5jdloDLmHPKoMuGNW6r9RgNhmn1KLxmxy50+3WB1n4b0+bNuRlnAFWBpOih2LEeyVsdzachqJTe9224dvcjUJub3p6ZioWsGJSPAc2AQ8qX9FE3aMcT09CHPlx24ZUvVr4KH9I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763443193; c=relaxed/simple; bh=y+hNdMziUZsXoMTDqc6UvVGzGcUSGcuFZ9JnzJrcSyk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=TDTz8dyHpBXISgSjx7IXJwJado3Zhu0ZmGb2+/fjCNUqFmxKHxRW+boEufM+v4+nuW5CYxYpyLVyG8TTnnJdOgh6lHP6PBHPmbv6quo5yL3SZdgRSHlN7gVH+KNxAbmsBcGa18XY4Pa08hw5t4QyT6erTq4xYQlulkBm/2HBSrI= 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=Pxpe15Cl; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=CEjKUjSJ; 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="Pxpe15Cl"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="CEjKUjSJ" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 5AHKBlkZ623734 for ; Tue, 18 Nov 2025 05:19:51 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= 57z4SrKQM6TZzN7beQkVXWrXc+W6p5O++YcxoOKVJms=; b=Pxpe15Cl5ncVnNFC Al6eEaOp4QDrEKr5IPidHS/6GvbM4IOtwYHDj8Q0BAoZYv6RYEwdTJrWd4xEO0QG Z9cJbfgUWjFdh5rPEmJqQTrltMACdKsMpW/f8PsmHgnSkgIEwO82nxMJPq1BqdoO LjdtU6lryevext+IT1sRUGVPGdEMhepBTS58XXBO4B/5H4cV8QF2ZWQyHjHdJl5L e+m5RSM1Vw4USMWzQp0CHiLQLh6UHSigxlx9RaaV7m1WhcwVSaPw9mtDfSzLC5I4 5YWDXMgVqh5XzZ/DAr4DRmTn1gA5hyCvbzBnCPTids27b4GtM8Y6tckVJoTHsZ6K 5uDCyQ== 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 4agahf96t0-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 18 Nov 2025 05:19:51 +0000 (GMT) Received: by mail-pl1-f198.google.com with SMTP id d9443c01a7336-29809acd049so87165525ad.3 for ; Mon, 17 Nov 2025 21:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1763443190; x=1764047990; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=57z4SrKQM6TZzN7beQkVXWrXc+W6p5O++YcxoOKVJms=; b=CEjKUjSJ6BUYpdXdmVa1/NEvhlsvEvdshQ3fLEFlE6y7wJhCDi7AGjHAHo947ZD9HV 28XxYFjY7m7y5b3VgXPFFHQkAULH4YfYz7FSDKDbF8yCuri4C+7hjXy5Z4T5upztMWQW d5IuEnueYhDYiNBl9X4Rfj68vrYqwFWJNToy1/aLp5qi+YM8G66MVZvqIj+EHakkmqSK LeycX6gt3odZ/d5rGwb/txA8eVubUoaFpZHI6IKsLzbTiDd551uSaLrNQuRWwd2S1Obg q3bqZ+ZjBDcwq8SZ54jxHKGVvkAJ8VG59S1uwiq8ENBbUKefJrOf0OHWpa6b9oDIpIa7 HCQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763443190; x=1764047990; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language: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=57z4SrKQM6TZzN7beQkVXWrXc+W6p5O++YcxoOKVJms=; b=ESNTgX40NsuZXkT60JZBhzd/2NFnBrLD9JWVxKYPoQTSrsdm6JU5A9Rs16ovgcZpFe 69nihJ2SPrA2fBiXJ4pNYRQa4DcBm5lUhSOFJvCzASY3TV96NGXpIBBDi7BfkBIu3lfP zQWedHe7Q0Jdb6UgA/n5MZO+7ZBbriXw9rVFkg7Va2q/a1frxAkh+dOzPEVUJes+UpUH 1Trch92nzDYpbUlJ3AGVtKrfcnRmKGfPhj962rjn6sm6338QeBZbbJjQnpy3UYx6wywq /UkjWnz55C6OHSdTDaEbAgIfkHI2dBJ0ikLI6xNOX5mdbHSEYDGpy/u1WtDvNyBKJb+I /0gw== X-Forwarded-Encrypted: i=1; AJvYcCUAp51h5HtVv1b/11l4KpSDbO2YZjY3STokgng4vi6CB1AhFUIyxMB8Co/pq+CnXE+crHuwz6lfjFdoF68=@vger.kernel.org X-Gm-Message-State: AOJu0YxJ4bIqClsBH8HVNCd1uus8xsOOEwJzvVHyX+8ChhsFA4HwwRqv jmC9EqAIlFG0XDLIBLU2rdJo2NcZXm4QBujt4S4i5nTRNdxEFCAh0QvIOQKix2w+TIfmPWrSBxt wVg/ieGNUS6z4V8rshJ11BXwOuzslOcti9H/G6Z3cRzlXRvT+XGrbkMm6hPx3LtcIdEk= X-Gm-Gg: ASbGncvF9XRPIqjT8S7PhlgpYIk0qCSwdaAOiRKyyDMDpqPRLlKt8zetzU1NfjnQf/s sgne49T9qtD/6ObqqVvHgORqHzcugab+wjpGG4wgkYFg6HoLVy4xv/Kn7DL/xdLIBiNXe8075xG 3qtg6haxqgyRn8CogO11WJWxFv6s0J7c/6muM9ZQF+s4QnsqVig8l42rpJr0aegvW1YrSiLOBqr uWoqaQKBaNKVAMd0/G2s/8E97PPPyJFcDK5voatIPdCEUoj2sqER78mAz4ISTzAm9myINMTen+l 2+o9iS2t0+8NIGb0NiLqw+KAL6eBPSDcCYOOAj+RJ/X2rt8K/xnnVZRaQ6xlERVB8CLEMtpCEKQ DbdJKFxLGyoGHb0LVimVasEiux/XvRhni/33XFW0nRw== X-Received: by 2002:a17:903:234a:b0:297:dad8:f25b with SMTP id d9443c01a7336-2986a5fd92fmr183070405ad.0.1763443190499; Mon, 17 Nov 2025 21:19:50 -0800 (PST) X-Google-Smtp-Source: AGHT+IFGv5jY0zpKeAWA9IEVwbsWiYKJ44Tawy9pEXbBERoxGM1hA76PxMEyJAcPgQzAr283dziYRQ== X-Received: by 2002:a17:903:234a:b0:297:dad8:f25b with SMTP id d9443c01a7336-2986a5fd92fmr183070015ad.0.1763443190027; Mon, 17 Nov 2025 21:19:50 -0800 (PST) Received: from [10.0.0.3] ([106.222.230.125]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2985c2c103asm158597555ad.96.2025.11.17.21.19.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Nov 2025 21:19:49 -0800 (PST) Message-ID: <6f9be486-364f-cfa8-0a3b-ccc3967bbd5d@oss.qualcomm.com> Date: Tue, 18 Nov 2025 10:49:45 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] media: iris: Fix ffmpeg corrupted frame error Content-Language: en-US To: Bryan O'Donoghue , Vishnu Reddy , vikash.garodia@oss.qualcomm.com, abhinav.kumar@linux.dev, mchehab@kernel.org, hverkuil@kernel.org, stefan.schmidt@linaro.org Cc: linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org References: <9UYDQ7nzBQ9Uqb5q4mG8WWKGLEZNPSvgV1vw6mmYS0wY2VKS5F11n8IaesvJsKYBvndy99tKFqGoak5MzQVZIA==@protonmail.internalid> <20251006091819.2725617-1-quic_bvisredd@quicinc.com> <3a07850b-90bb-4035-91ce-9f361c635df5@linaro.org> From: Dikshita Agarwal In-Reply-To: <3a07850b-90bb-4035-91ce-9f361c635df5@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUxMTE4MDAzOSBTYWx0ZWRfX5lNmP+09BQ1g Ctx/M4Io0oDtG4axnhNZNYRMV+nI7QL37Jk7ApBeKh2Lvp3+fPmMYqJq2j/zc7SZTth71wEIvXY +JQSKf7k3wFN4i9pfRTFztTweIZYzb5VPQtnQLDbvd4OAIN0cFNORVUFYPhWqGEVpkJs+D8GAxN /uPj4832vtN+FpdLqpNcPdikcs9EtpwBZf/Kt4tXk4xGonFv5o5xgGBpjfB7FKSeEry0JVzvNEm yzEamGsylddjfQd3UW9h3rFdxXAkKFOgxoY+cw07ifgosT0N8s+b8lUyVCmoWyx9V1sLN6503ax HKT8tB2EEnSQkJypgNTVL8Oec8HdYTB4gKGmlGcGjqtkvAxoeL6NZA8l9IsVjHBQaZo983HbLSJ hGIep245frb4WVUdOY1nwKm6zm3fWg== X-Authority-Analysis: v=2.4 cv=RpTI7SmK c=1 sm=1 tr=0 ts=691c01f7 cx=c_pps a=MTSHoo12Qbhz2p7MsH1ifg==:117 a=XxUhHey/R60E+S35X0VJGA==:17 a=IkcTkHD0fZMA:10 a=6UeiqGixMTsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=VwQbUJbxAAAA:8 a=COk6AnOGAAAA:8 a=KKAkSRfTAAAA:8 a=Rloj6LPKQydGzzJWqtwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=GvdueXVYPmCkWapjIL-Q:22 a=TjNXssC_j7lpFel5tvFf:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-ORIG-GUID: jpbWAT9EnUbZh1zzIAIxmriT4AOLLsct X-Proofpoint-GUID: jpbWAT9EnUbZh1zzIAIxmriT4AOLLsct 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=2025-11-17_04,2025-11-13_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 clxscore=1015 adultscore=0 bulkscore=0 suspectscore=0 impostorscore=0 malwarescore=0 lowpriorityscore=0 phishscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2510240001 definitions=main-2511180039 Hi Bryan, On 10/7/2025 5:02 PM, Bryan O'Donoghue wrote: > On 06/10/2025 10:18, Vishnu Reddy wrote: >> When the ffmpeg decoder is running, the driver receives the >> V4L2_BUF_FLAG_KEYFRAME flag in the input buffer. The driver then forwards >> this flag information to the firmware. The firmware, in turn, copies the >> input buffer flags directly into the output buffer flags. Upon receiving >> the output buffer from the firmware, the driver observes that the buffer >> contains the HFI_BUFFERFLAG_DATACORRUPT flag. The root cause is that both >> V4L2_BUF_FLAG_KEYFRAME and HFI_BUFFERFLAG_DATACORRUPT are the same value. >> As a result, the driver incorrectly interprets the output frame as >> corrupted, even though the frame is actually valid. This misinterpretation >> causes the driver to report an error and skip good frames, leading to >> missing frames in the final video output and triggering ffmpeg's "corrupt >> decoded frame" error. >> >> To resolve this issue, the input buffer flags should not be sent to the >> firmware during decoding, since the firmware does not require this >> information. >> >> Fixes: 17f2a485ca67 ("media: iris: implement vb2 ops for buf_queue and >> firmware response") >> Cc: stable@vger.kernel.org >> Signed-off-by: Vishnu Reddy >> --- >>   drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c | 2 +- >>   1 file changed, 1 insertion(+), 1 deletion(-) >> >> 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 e1788c266bb1..4de03f31eaf3 100644 >> --- a/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c >> +++ b/drivers/media/platform/qcom/iris/iris_hfi_gen1_command.c >> @@ -282,7 +282,7 @@ static int iris_hfi_gen1_queue_input_buffer(struct >> iris_inst *inst, struct iris_ >>           com_ip_pkt.shdr.session_id = inst->session_id; >>           com_ip_pkt.time_stamp_hi = upper_32_bits(buf->timestamp); >>           com_ip_pkt.time_stamp_lo = lower_32_bits(buf->timestamp); >> -        com_ip_pkt.flags = buf->flags; >> +        com_ip_pkt.flags = 0; >>           com_ip_pkt.mark_target = 0; >>           com_ip_pkt.mark_data = 0; >>           com_ip_pkt.offset = buf->data_offset; >> -- >> 2.34.1 >> > > Reviewed-by: Bryan O'Donoghue Can you please pull this fix for 6.19. Thanks, Dikshita