Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6529987imu; Wed, 14 Nov 2018 03:03:14 -0800 (PST) X-Google-Smtp-Source: AJdET5fSBnpn+Rj3vD0T/g3gjt/n1tuupu3ufEQGI1w2ANqjP+oTwrNODuWMq7+Bae263dUZ0JD2 X-Received: by 2002:a62:302:: with SMTP id 2-v6mr1482412pfd.135.1542193394794; Wed, 14 Nov 2018 03:03:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542193394; cv=none; d=google.com; s=arc-20160816; b=Qt4bNPhRBefk09sPkRo0mDMFQKSJX0mH62Dolcz0F0FzSqiGvMIcwesvKBw9SjV7h5 u6IrmX4cKqng/6NMnCLu7lBUKyb1+pu+1SUDIi+y0XE2ltRSO5ojBPz9b6hZuyVXIeLs Nm/UP+xpvX/pexR6xJ35KLXxAF/tJroNIob1p5LKizwgTbScPebQW2uSaBhU508oKjF5 cSf5uZoAnxpwQevR7Atxxi3hbpIZKII6P76Pt7i+edePfVj/SxFzs+Yw75LlO0SLnEOA vBKIzvxV5goxuePzowi3n7sjOCjO372JecVqJKrssT8wDSWE7uBrtZ1CrfnVlux6kVS6 d2Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=3luqmgOSX8Shw9TxWy+EH5ZXftdtNaey1WJAwsx5HUY=; b=wrY6qp2HTLaeinjZnFY+yAquQXVZCNAxkxpsPMqZSDjq6Mdfs7Aw2Nxmp5o2lXddLd C6ZmXBWJV5bV5xYgVd+q0WN1tR1ppRjzVdmxPg6p/xvQkPMAd/5LB7qQ+bV2kSDsmUZx xZ55JJ5w6OO9O0+eViupZdS4HEZgm4/tC51pbd+pq898KiaSUH2N+SgBVuLTKPa9wx6A i8nOVMloo9TDRhzNoujE1sBniQGV2fjbjc4OWH2BIG5oHZxEcAKEa+YEHdV3uwQeZjgo CFV5sjXJO2e66S3huqjiELJBSR8QAKI2aN0MaX/8u/y+E+Ay+L7IzQjEszQkOXYtWsb8 GjjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EPeIyzYQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m16-v6si22598396pgd.48.2018.11.14.03.02.51; Wed, 14 Nov 2018 03:03:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EPeIyzYQ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729451AbeKNVFL (ORCPT + 99 others); Wed, 14 Nov 2018 16:05:11 -0500 Received: from mail-yw1-f65.google.com ([209.85.161.65]:46270 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726823AbeKNVFL (ORCPT ); Wed, 14 Nov 2018 16:05:11 -0500 Received: by mail-yw1-f65.google.com with SMTP id t13so2905445ywe.13 for ; Wed, 14 Nov 2018 03:02:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3luqmgOSX8Shw9TxWy+EH5ZXftdtNaey1WJAwsx5HUY=; b=EPeIyzYQi9jSUB7GH3Kk6Aq81uCcKS9GOlOfFeXkKZTqLj9JDIg6yKf3wa8LiJdcB5 z23mhHclh64iKeoUjO1bJqxs8r0V+PO0cyfLsR8/cFXmiiJCWvGqrFfAevlF45di7BJw xJIxoQ3WCxLFmIVoOZpG0orj45LLQ33QvJneY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3luqmgOSX8Shw9TxWy+EH5ZXftdtNaey1WJAwsx5HUY=; b=VXfMFsWpViKcU6RNZDAMb7pQuwQBYO9h9gc1yEqV60EqoeyRDCU+iTAxGBAnrZ7cYS Jz5ew9AqbSr89oc8lsLqdqXnLvQv+I/DMQ1ZH9c0xcih8uL+76Ch4pqVAJwV8OlW5Psa lCXwFCb4FqNPbBlpHMFVHGBcf+RL/LJRgCBKcpw8QrJuqFCeEZ8EDdFMa1r2Ux7yz8Mj 5YXKg7ppLZ78tfrPgX7QkxPoLEy9H6fIReNUaJJAZ1lBxIH1Hz9Qk2FnqVYY5iaARsW1 FXFyaWXianHrg2pluKBn4CSHBr6ZGPwqJI6X6Veu0Z+v0b/IaDxA8LLgwLBkEFVNVfDL lU5Q== X-Gm-Message-State: AGRZ1gIlLNeGIPgVE3AWopdsohRtCQXnbhFFmdJkahkOrrh4wkT5fvC1 1ie2wpKtiT+PvIrNf06QR68MXNgCbYo= X-Received: by 2002:a81:2591:: with SMTP id l139-v6mr979535ywl.322.1542193344399; Wed, 14 Nov 2018 03:02:24 -0800 (PST) Received: from mail-yb1-f171.google.com (mail-yb1-f171.google.com. [209.85.219.171]) by smtp.gmail.com with ESMTPSA id r5-v6sm6987751ywr.80.2018.11.14.03.02.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 03:02:23 -0800 (PST) Received: by mail-yb1-f171.google.com with SMTP id i78-v6so6736568ybg.0 for ; Wed, 14 Nov 2018 03:02:23 -0800 (PST) X-Received: by 2002:a25:6101:: with SMTP id v1-v6mr984341ybb.293.1542193342371; Wed, 14 Nov 2018 03:02:22 -0800 (PST) MIME-Version: 1.0 References: <1538222432-25894-1-git-send-email-sgorle@codeaurora.org> <1538222432-25894-4-git-send-email-sgorle@codeaurora.org> In-Reply-To: From: Tomasz Figa Date: Wed, 14 Nov 2018 20:02:10 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v1 3/5] media: venus: do not destroy video session during queue setup To: Stanimir Varbanov Cc: sgorle@codeaurora.org, Hans Verkuil , Mauro Carvalho Chehab , Linux Media Mailing List , Linux Kernel Mailing List , linux-arm-msm , Alexandre Courbot , vgarodia@codeaurora.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 9, 2018 at 7:00 PM Stanimir Varbanov wrote: > > Hi Srinu, > > On 9/29/18 3:00 PM, Srinu Gorle wrote: > > - open and close video sessions for plane properties is incorrect. > > Could you rephrase this statement? I really don't understand what you mean. > > > - add check to ensure, same instance persist from driver open to close. > > This assumption is wrong. The v4l client can change the codec by SFMT > without close the device node, in that case we have to destroy and > create a new session with new codec. Right. [snip] > > + > > inst->hfi_codec = to_codec_type(pixfmt); > > reinit_completion(&inst->done); > > > > diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c > > index afe3b36..0035cf2 100644 > > --- a/drivers/media/platform/qcom/venus/vdec.c > > +++ b/drivers/media/platform/qcom/venus/vdec.c > > @@ -700,6 +700,8 @@ static int vdec_num_buffers(struct venus_inst *inst, unsigned int *in_num, > > > > *out_num = HFI_BUFREQ_COUNT_MIN(&bufreq, ver); > > > > + return 0; > > OK in present implementation I decided that the codec is settled when > streamon on both queues is called (i.e. the final session_init is made > in streamon). IMO the correct one is to init the session in > reqbuf(output) and deinit session in reqbuf(output, count=0)? > Depending on what you mean by "settled" that could be fine. Generally for initialization, one would typically use REQBUFS(OUTPUT, >0) (since it's not possible to change the format after the allocation) or STREAMON(OUTPUT) (to defer the hardware operations until really necessary). Since STREAMOFF(OUTPUT) is expected to just trigger a seek, termination should be done in REQBUFS(OUTPUT, 0) indeed and after that one should be able to switch to another codec (OUTPUT format). Best regards, Tomasz