Received: by 10.192.165.148 with SMTP id m20csp1740215imm; Thu, 3 May 2018 04:48:14 -0700 (PDT) X-Google-Smtp-Source: AB8JxZotSzOkIc12SxacEGTy+PoOcuqKWCSVm7YK+TlCG3+QgNOS4LTy/a8dId+nToEN6ZHbSXvY X-Received: by 2002:a63:8f5b:: with SMTP id r27-v6mr9326439pgn.439.1525348093962; Thu, 03 May 2018 04:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525348093; cv=none; d=google.com; s=arc-20160816; b=VPbTFpOpKkmB1zdy7vj54axJdlgMUGFFrz8lFW1OxA1QtTgi8Tb331Kojq7ORx2VsK h6e9DRuzYZNElUWORWKs7QiGB9sPtWFBoRBp2xJ3kxTUsUMVfMb1QYputsBiZeqfVXX5 jI8+jrEHJqehTY1GKQ7heaEAh8qvoupZJmOkX6XjMlwPgCm6qjZm2TRE1Q/ZcuwaIzG8 uPaC5QTEi+6zytj62rN+NDXg6pPnKIO3QT+TpZEXrJLoKOYBVs1fuhRwLh0/HFczDa+r oCvPKryigHeWUzcptSYPoesAaX0ZdCRYV2Lj+FwTqvIqxI8J4H9wk9s8KeegG5fvIJxl t1iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=/gJ5kcu0QY+Ol3VW+r+v5NBqbHYaf5+tRhbSRHoQRCc=; b=FPJOtIEiAMTKm3ejVAC1SxvuYJKPTKg5L6Ijr+HFig86CoLZt5cJrQYQ6ivaHD24LN LlitHUq10Y/EaU7yLpsnaj4l3nxZKvjf2B39B0iqbawEFvKARQh3KT+aKrERnjIhTZh2 PbQCBQaQITSeW+N5kjweUsk5d/oaaKW05RHMtGMSbVwVowLc0b85+t92d+hWB4wfjgmd oIr53Y2Ur0U9qwhJhIUZ+Sa8XaR8SGPyaqLlCDnL/pofX2S8ejGEC7yjza+OoMOl/08l 0eIC4N7FPFkSF6PCCLu2964MQAuk2bjjR/LemOCqfzIATAl16ntfty74aH4N4yl4tfjr FfcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=lvA3K99P; dkim=pass header.i=@codeaurora.org header.s=default header.b=lvA3K99P; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w8-v6si4732188plp.526.2018.05.03.04.47.59; Thu, 03 May 2018 04:48:13 -0700 (PDT) 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=@codeaurora.org header.s=default header.b=lvA3K99P; dkim=pass header.i=@codeaurora.org header.s=default header.b=lvA3K99P; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751495AbeECLqJ (ORCPT + 99 others); Thu, 3 May 2018 07:46:09 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:57156 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750999AbeECLqG (ORCPT ); Thu, 3 May 2018 07:46:06 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E1647607E1; Thu, 3 May 2018 11:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525347965; bh=2jNsGutM6+oS5Nf0tIoPvVWhxOxONDyoc44XEOZ2yMI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lvA3K99PM0GthX0SduvdhIzZicP5VChGQKbgw4ddSn+/u2OqjgeT117VFJ5LqmZ3+ 0DdYNPazEFhRowKZztrqGnkYKoXs926HzWwAmW4ZhL+hOJodlW9DWQtJWV0vrs0L7p /KuofSeEoissIJmnJ7xrLz/lEzdYniZ7wEjBS2bI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 34400607CF; Thu, 3 May 2018 11:46:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1525347965; bh=2jNsGutM6+oS5Nf0tIoPvVWhxOxONDyoc44XEOZ2yMI=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=lvA3K99PM0GthX0SduvdhIzZicP5VChGQKbgw4ddSn+/u2OqjgeT117VFJ5LqmZ3+ 0DdYNPazEFhRowKZztrqGnkYKoXs926HzWwAmW4ZhL+hOJodlW9DWQtJWV0vrs0L7p /KuofSeEoissIJmnJ7xrLz/lEzdYniZ7wEjBS2bI= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 03 May 2018 17:16:05 +0530 From: Vikash Garodia To: Stanimir Varbanov Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-media-owner@vger.kernel.org Subject: Re: [PATCH 26/28] venus: implementing multi-stream support In-Reply-To: <64b9d816-617a-0ecd-fc47-8676a595f972@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> <20180424124436.26955-27-stanimir.varbanov@linaro.org> <64b9d816-617a-0ecd-fc47-8676a595f972@linaro.org> Message-ID: <26dd5ee8a6659dc8f86637516d60d01c@codeaurora.org> X-Sender: vgarodia@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Stanimir, On 2018-05-03 12:42, Stanimir Varbanov wrote: > Hi Vikash, > > Please write the comments for the chunk of code for which they are > refer to. I see that the patch was about handling multistream mode, but the code to handle the dpb buffer response is missing. My comment is basically to add the required code. > On 2.05.2018 10:40, Vikash Garodia wrote: >> Hello Stanimir, >> >> On 2018-04-24 18:14, Stanimir Varbanov wrote: >>> This is implementing a multi-stream decoder support. The multi >>> stream gives an option to use the secondary decoder output >>> with different raw format (or the same in case of crop). >>> >>> Signed-off-by: Stanimir Varbanov >>> --- >>>  drivers/media/platform/qcom/venus/core.h    |   1 + >>>  drivers/media/platform/qcom/venus/helpers.c | 204 >>> +++++++++++++++++++++++++++- >>>  drivers/media/platform/qcom/venus/helpers.h |   6 + >>>  drivers/media/platform/qcom/venus/vdec.c    |  91 ++++++++++++- >>>  drivers/media/platform/qcom/venus/venc.c    |   1 + >>>  5 files changed, 299 insertions(+), 4 deletions(-) >>> >>> diff --git a/drivers/media/platform/qcom/venus/core.h >>> b/drivers/media/platform/qcom/venus/core.h >>> index 4d6c05f156c4..85e66e2dd672 100644 >>> --- a/drivers/media/platform/qcom/venus/core.h >>> +++ b/drivers/media/platform/qcom/venus/core.h >>> @@ -259,6 +259,7 @@ struct venus_inst { >>>      struct list_head list; >>>      struct mutex lock; >>>      struct venus_core *core; >>> +    struct list_head dpbbufs; >>>      struct list_head internalbufs; >>>      struct list_head registeredbufs; >>>      struct list_head delayed_process; > > > >> >> The dpb buffers queued to hardware will be returned back to host >> either during flush >> or when the session is stopped. Host should not send these buffers to >> client. > > That's correct. > >> vdec_buf_done should be handling in a way to drop dpb buffers from >> sending to client. > > That is also correct, vdec_buf_done is trying to find the buffer by > index from a list of queued buffers from v4l2 clients. See > venus_helper_vb2_buf_queue where it is calling v4l2_m2m_buf_queue. > > So for the dpb buffers venus_helper_find_buf() will return NULL. My bad, i could see that the DPB buffers are not sent to client in the existing patch. Instead of bailing out on NULL, i was thinking it is better to keep explicit check for dpb buffers and exit with a debug log. > > regards, > Stan