Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp1459665rdb; Sun, 7 Jan 2024 22:34:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrLaN41xwlUdrVwfaeC9isYt/8xgiIoGmZK3dNMXvo3ztAwEIReKdORnSKl9Bjsk6iScRg X-Received: by 2002:a17:902:db0c:b0:1d4:83d5:71a1 with SMTP id m12-20020a170902db0c00b001d483d571a1mr3855089plx.110.1704695655437; Sun, 07 Jan 2024 22:34:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704695655; cv=none; d=google.com; s=arc-20160816; b=g9XeEXp8ePTa8H9ecUAFsg3J2omX09vEGJ5BUVUt89n4DcY/wsLp7CSmP+cYXdHBNT si5ZGG6KuCMy5M/qGoMJYQ5tPe8kezN2VahA+i4cRV2iOsyf2KwQlTrJpGgy8I6QrrIa UHLi0ZXNzXfT6bpbUQfkUGSVRMzA0xe8qHKo2dO1GKTQt2/Os6lAb8oYZR2Cb9nIpMRp gmB/g9cG/aof+rS9pHkMZ3WpnGgY8/gJfGdwH2fMpJcLPv0F3+Ie+pGxgZXHLR3QpqE+ fz7YnnoaBMbk7nT9vf3+NxXtKKRYYyk43QQ0QA0aPzeGjT2ou5fh2G6XWGG1BNAhkPuK 2N6g== 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=Nst7FNzyKkdp/cDB5TEuoG6NQsst3MTOs39uHN7n5A4=; fh=3BZRlcr9TyDH6cHXgDk1AvbRKWcU6yosklmjUcGCw+U=; b=BHH9RYH1NBKSH4M9aUwbUzkd8EvW/mNlpxfiIqXHpJ0ltPxOTsLdOUEowy9Y0sF8n4 Zu8uonu8Uf1T6vNHw7b0a6vGj2T+vMxudFfa6ZvGHnhFQajeuWjyNOKAxhA6H+mnllqN abCNW5AvddFQav3MFzUWz5dMyc7Umf7v30qAQvlSe7HZCnaGOqp/XAJW51xJmKoD+i23 2DwSPm5UujFpVwaDNCBJbzbK5hNSeehsdAPKtarcornf6d2Xh+8XiX8/693+/bD7i/Xk 27YD1ZhRnEoTCWP67geKkpTrUe7mu+I7WC2AmznyBa5F7mO4fPvGkMGRTc81o+hBcL+s IPTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k9tjurkh; spf=pass (google.com: domain of linux-kernel+bounces-19100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19100-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id c19-20020a17090a8d1300b0028d27478235si3957354pjo.115.2024.01.07.22.34.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jan 2024 22:34:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-19100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=k9tjurkh; spf=pass (google.com: domain of linux-kernel+bounces-19100-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-19100-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 2F0A5B210E1 for ; Mon, 8 Jan 2024 06:34:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6054E79D8; Mon, 8 Jan 2024 06:34:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="k9tjurkh" X-Original-To: linux-kernel@vger.kernel.org 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 054DBB642; Mon, 8 Jan 2024 06:33:57 +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 (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 4086SB7p016678; Mon, 8 Jan 2024 06:33:48 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=Nst7FNzyKkdp /cDB5TEuoG6NQsst3MTOs39uHN7n5A4=; b=k9tjurkh9sogiXmOB5qxOqFLNxe1 MqeELIsv0y4rkiw9cuwj0yrWMkW3cLt9VwgK2GrcQs4C+ckON09c5DKohFm7/UsK BfWScYxejLmef1amm45lolhNXWnHhvcyawMqN+O9weay7Qzv4s21aKj4qr0hMKD+ +CD+LJd6ODI9cSp4r7MUkQwNEwxcL8ZLVi+THJcDn2Cl74lF3qnIliPgryQUCmfO gNeSw3FSA7WGGAQ4DIxHm+OX5MoN4ucOIkN48XFGLuOZzKL1rKuhbygV8RYfMCpj EysDKguR/5YUwE/6I5bw34Cl1jYboHAJujAq/9FY2+M0mKP4BoElUE+IBQ== 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 3vg97b08sb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 08 Jan 2024 06:33:47 +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 4086Xh9C031283; Mon, 8 Jan 2024 06:33:43 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3veyxkk0c9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 08 Jan 2024 06:33:43 +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 4086U8Ri028569; Mon, 8 Jan 2024 06:33:43 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 4086Xh5o031277; Mon, 08 Jan 2024 06:33:43 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 347544) id 9CA0D2505; Mon, 8 Jan 2024 12:03:42 +0530 (+0530) From: Dikshita Agarwal To: Stanimir Varbanov , Vikash Garodia , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab Cc: "Bryan O'Donoghue" , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Dikshita Agarwal Subject: [PATCH] media: venus: flush all buffers in output plane streamoff Date: Mon, 8 Jan 2024 12:03:34 +0530 Message-Id: <1704695615-1036-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: H071zjGHupgqxvD4poYXmSCnMwbSTACM X-Proofpoint-ORIG-GUID: H071zjGHupgqxvD4poYXmSCnMwbSTACM 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_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 phishscore=0 clxscore=1015 mlxscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 mlxlogscore=682 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2401080053 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. Signed-off-by: Dikshita Agarwal --- 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