Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp783552rdd; Tue, 9 Jan 2024 22:13:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IE3qyueV2+dNJ8nBITks/GX6TV9WlFYnpGh/gGGQxTf+dBMfsYnViJ3OLIhFY4xSZjNhQy9 X-Received: by 2002:a05:6a00:b8d:b0:6d9:a683:a6e4 with SMTP id g13-20020a056a000b8d00b006d9a683a6e4mr684879pfj.68.1704867187868; Tue, 09 Jan 2024 22:13:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704867187; cv=none; d=google.com; s=arc-20160816; b=ptH8/s6Yd3uWC5cp5EvQP7VfZKSvF+r5hzvCcmi7PBd3v6mVmy6BiVf6TCy/xZJ7NV nfPx4dusq9p+gOe79l1SumtNvWCNt2SzHrOUboc46oz5OxXRv5JZAtvru2h2XCGKmZgX M2TgOxEjOWBcG3BlQmQcf7ZWpiWrRFRbvBkADCi3II2PD/4yuVPPsng8mxsjAUP13vUr dFsseLJAA2eiYb9aL5h0czmTdXXvPfFdbRYZm9OqaKB7RxHgjWF2A0ykrO18EcFk1/g8 53iBbBUGwNJpaPAQ6yamHO/I18vhlRAcW+8zrIWMA9wi5zBpB/R7L3yHzn/p+UfI+dN3 Gs9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-id:precedence:message-id:date :subject:cc:to:from:dkim-signature; bh=B5ouaHYiX5AWdbZ7NSH7SvAb5JmdaWdv865fJJ5wI9Y=; fh=olBSFJfuDZinWi3swY/s7PyTmZExUpSvcbzWmXHFhf8=; b=if/AzuVdhuN1BZsCl2OLYfTzuADggXWImYgb9I4UOG3eepgmykj7xCY/R/8mRVLW3N JtGNmBEa1f5YP9Vs7TPksx1HTcMjjOh0ySdy+viyad+YzbQv7DxtHlF7ff1T7hea7Gdr +Yf07ayIPGR3hov5mGXuV2yRRjAQQpD3weYsVxXhp0iJQXZ6yow13CZL9Nif7M2Q3Qgs BzR5GbODzxqn3IrwdM4rHap3dNGSJwuXZDiwfILSM4yw1TumC6YoI/M1wojpn+hB5MB3 Mxy5+j0+mn+4Bn6hfcwqwXmgswWx+okgUOuVQWLEyulCeLTDN8cmxSEetJ6zi1bGydpa SRSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=c4V0veSQ; spf=pass (google.com: domain of linux-kernel+bounces-21739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q134-20020a632a8c000000b005cd89d9fae3si2939127pgq.634.2024.01.09.22.13.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jan 2024 22:13:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-21739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=c4V0veSQ; spf=pass (google.com: domain of linux-kernel+bounces-21739-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-21739-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 3E10E2891F0 for ; Wed, 10 Jan 2024 06:13:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 72B9032C81; Wed, 10 Jan 2024 06:12:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="c4V0veSQ" 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 28C5F8C1A; Wed, 10 Jan 2024 06:12:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40A307fi013283; Wed, 10 Jan 2024 06:12:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id; s=qcppdkim1; bh=B5ouaHYiX5AW dbZ7NSH7SvAb5JmdaWdv865fJJ5wI9Y=; b=c4V0veSQI3N4KmTf17J1RxsG1cau vH9SUaqDvTs4W2CxxZZcMOWpTXFvpzUVGwr0y6VDmdmH7iASJ99TPw0I0KwLHtUd RNkVC49ZVJNvxJgLXAhwad2niVvn6Ig3F3YdTSfmQijbMJxKRXSr5Q2+mL5/n7+x Olc/T/8U/PCslPmYc7KZ0jLRKsvPJiSzjrwfvIsLMl+1hG7I/iJRLt0k0f22UQKX t2mNQU6idQLUsgXWMuM105ZqL2Zdik/PYzQWYv5LtYMhqQd1uSWKz6NZ/IQqbsxR 5GivRhoU+umvA8Wgla3tp6ECLXhH24R42AOH3PwvXZd3YJYg0OXsnmddng== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3vh9vfhghg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 10 Jan 2024 06:12:41 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 40A6CbAs006500; Wed, 10 Jan 2024 06:12:37 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3veyxku493-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 10 Jan 2024 06:12:37 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 40A6Cb5m006494; Wed, 10 Jan 2024 06:12:37 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-dikshita-hyd.qualcomm.com [10.213.110.13]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 40A6Cb6e006493; Wed, 10 Jan 2024 06:12:37 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id 32E1B2511; Wed, 10 Jan 2024 11:42:36 +0530 (+0530) From: Dikshita Agarwal To: Stanimir Varbanov , Vikash Garodia , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab Cc: "Bryan O'Donoghue" , Mauro Carvalho Chehab , Stanimir Varbanov , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Dikshita Agarwal Subject: [PATCH v2] media: venus: flush all buffers in output plane streamoff Date: Wed, 10 Jan 2024 11:42:14 +0530 Message-Id: <1704867134-5522-1-git-send-email-quic_dikshita@quicinc.com> X-Mailer: git-send-email 2.7.4 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Xkb_cSNPdyGiOr_mKzcLSTF42cKVBzKm X-Proofpoint-ORIG-GUID: Xkb_cSNPdyGiOr_mKzcLSTF42cKVBzKm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_01,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 suspectscore=0 clxscore=1011 priorityscore=1501 impostorscore=0 adultscore=0 bulkscore=0 mlxlogscore=862 spamscore=0 phishscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401100049 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: For scenarios, when source change is followed by VIDIOC_STREAMOFF on output plane, driver should discard any queued OUTPUT buffers, which are not decoded or dequeued. Flush with HFI_FLUSH_INPUT does not have any actual impact. So, fix it, by invoking HFI_FLUSH_ALL, which will flush all queued buffers. Fixes: 85872f861d4c ("media: venus: Mark last capture buffer") Signed-off-by: Dikshita Agarwal --- Changes since v1: - Added fixes tag (Bryan) drivers/media/platform/qcom/venus/vdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 29130a9..0d2ab95 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1255,7 +1255,7 @@ static int vdec_stop_output(struct venus_inst *inst) break; case VENUS_DEC_STATE_INIT: case VENUS_DEC_STATE_CAPTURE_SETUP: - ret = hfi_session_flush(inst, HFI_FLUSH_INPUT, true); + ret = hfi_session_flush(inst, HFI_FLUSH_ALL, true); break; default: break; -- 2.7.4