Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1985471rdd; Thu, 11 Jan 2024 16:06:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEcmhtma2HCiQe/eGvrW0O/ECCReAE38y0fKK06Hv62xzoFJCi3wht6T8+USj8kA2wXXDIh X-Received: by 2002:a2e:b751:0:b0:2cc:63b4:b2d0 with SMTP id k17-20020a2eb751000000b002cc63b4b2d0mr207995ljo.98.1705017980589; Thu, 11 Jan 2024 16:06:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705017980; cv=none; d=google.com; s=arc-20160816; b=a9Iu2Z59iX/6P3bs9RXJmuDq5ZADPNYoQY7TE5XMzcemOJ/qV1GD4kpplMQKDDCknt KTzD6C0yJH2FJMAvst3rW8r+TNck7QXD1EILfCGW8sByWIm37+WznF8ePFOHuqRC5RPh X7Wpru+OJ/F348x+vr6MnM0EAVoc5KSqe3Q51eNg8zLrEbLS5kixy9OD6LKLGwzYJdVK C6v3F2rGLO20eff/dIXCyi8O6GMnAQnHrkpxG0qlPn3puuMVH1AdUZgy1tA2jBwWC63O 5ge+tYDv7rUgi5faS/I/E36SrSU7t6jkt7yC/ReWpQXnju8pDQuXRD25tr9uU8IQuNaW 31bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=NCsMdLHga1GxnMyWDbdKtpfMINMaUDqjALsfcY3IzvA=; fh=d0JYXRP8sr39x+W2aE7Zqh5EXVV5hWWbFLtEhpnpaEs=; b=gzSPHdH18vj6SMsz0LoeiHCxLrUuanW1fDoTsf7OAEyc4OVNdUxvFTKkboBovFkyWc B94izpB82kSSWrj9Dn7rLYMBB6V0oKjneE9DvrT78xDd//90p/fpQ71SbHu+VxnVo73i m5iiR0Ax8lsaQsMmpGqtYBPUdUJo/WszTzLdNRxtqcNaiSs/+zjyzvyLwl8Osjo2RqSO Az+pEmeUg679oBrqIAAL1zetyzE29Cv3OTPPMXVmlbrPMiEjXWCBuTNbCA4oX5TeLuxb EYdN1UomuJzLdcF51IhwielYePOL4OxdWzXQwjDwrd61qUI2oKaJe41g99DTnVbemNNy r3fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mwiqXLJf; spf=pass (google.com: domain of linux-kernel+bounces-24161-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24161-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id fk7-20020a056402398700b0055710ccafdasi975000edb.219.2024.01.11.16.06.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 16:06:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24161-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=mwiqXLJf; spf=pass (google.com: domain of linux-kernel+bounces-24161-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24161-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 5736F1F21DED for ; Fri, 12 Jan 2024 00:06:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7C00F7E9; Fri, 12 Jan 2024 00:06:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="mwiqXLJf" Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0D3D10F1 for ; Fri, 12 Jan 2024 00:06:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pj1-f43.google.com with SMTP id 98e67ed59e1d1-28cc07d8876so3657037a91.1 for ; Thu, 11 Jan 2024 16:06:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1705017963; x=1705622763; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=NCsMdLHga1GxnMyWDbdKtpfMINMaUDqjALsfcY3IzvA=; b=mwiqXLJf3t7Gr0uSHaZSBsMT3fpxqOTnLUwURJH17VPsMnKAprHgmx+6KJyoRsaqbU syZ9MkeDCM1m4gswRk6k3j5GisQnU2gOjRhhof+4wRGj4IFzTSa+F34VaK59oIei5AvT ytWS65RYLFGeOfYBPZpaKv10gOIzuHboq3oXU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705017963; x=1705622763; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NCsMdLHga1GxnMyWDbdKtpfMINMaUDqjALsfcY3IzvA=; b=KmiFdWtNsF8L/n7AFaD3rhA4NjcyUaHy1vMAcyBF9+InBomiUJ7h1a5uj/Ti7CXQ/F kFs5J6OGli618c0LIg518a4G2cqTYcuSvNJtUt6rUBqHLkOixrOT67V7SUsIikEC7KHW 8lJgeyHA1+mEAhlm/c7nkzc13r+7vbMXZQD8LfAxA3u84N4zqBcP9dytomw4dhJBka2A 2QOFLxV63nGfOneOHSdBV05ihtPob0ZzBmxP7MBdiBpTaTkIMU5cdSwLudMpmLiPZGA/ TxBcTK0G3XmYiyQ+ibTpFHnRMZ5IIkwNejXfgUtH74I6hMAVhj8L/IqL/r8BEQ2JSnUt 7acw== X-Gm-Message-State: AOJu0YyP0Z2jmi+1f6zS8giEZEltR9+9Vzwq21eLWsWrmIfP8tP735w6 AM08LvV9epqnQXuL7dBNw002VcxzZ45H+cOrUfGwX79Nxwvx X-Received: by 2002:a17:90a:e544:b0:28d:bd78:7806 with SMTP id ei4-20020a17090ae54400b0028dbd787806mr544103pjb.59.1705017963052; Thu, 11 Jan 2024 16:06:03 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <1704867134-5522-1-git-send-email-quic_dikshita@quicinc.com> In-Reply-To: <1704867134-5522-1-git-send-email-quic_dikshita@quicinc.com> From: Nathan Hebert Date: Thu, 11 Jan 2024 16:05:52 -0800 Message-ID: Subject: Re: [PATCH v2] media: venus: flush all buffers in output plane streamoff To: Dikshita Agarwal Cc: Stanimir Varbanov , Vikash Garodia , Andy Gross , Bjorn Andersson , Konrad Dybcio , Mauro Carvalho Chehab , "Bryan O'Donoghue" , Mauro Carvalho Chehab , Stanimir Varbanov , linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Jan 9, 2024 at 10:13=E2=80=AFPM Dikshita Agarwal wrote: > > 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 Tested on a SC7280 Chromebook with a custom client [0] to perform the queueing and VIDIOC_STREAMOFF sequence as described in the commit message. Before this patch, a buffer from before the VIDIOC_STREAMOFF command would be dequeued and seen by the client. With this patch, it is not seen by the client. [0]: https://crrev.com/c/5191249 Tested-by: Nathan Hebert > > --- > 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/pla= tform/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 =3D hfi_session_flush(inst, HFI_FLUSH_INPUT, true); > + ret =3D hfi_session_flush(inst, HFI_FLUSH_ALL, true); > break; > default: > break; > -- > 2.7.4 > >