Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1043669ybb; Wed, 25 Mar 2020 14:36:17 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuGsMPEFLF9rmO/3EipnKXzsUB+7TktzPouNSfiH22mJARcR4GIxIz8A/f8osYxvK7L6Sw8 X-Received: by 2002:a05:6830:1aca:: with SMTP id r10mr3631408otc.330.1585172176845; Wed, 25 Mar 2020 14:36:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585172176; cv=none; d=google.com; s=arc-20160816; b=cODhf8P98DZdMhcFLnJN61+8HH7YdFGzUraF08RPss0XzAw55SnmIKmgtvZ5dewGs+ J765Uynmyw3D7OchvSszOI0Zf6sUb3M19P7QKSdWoJAPlWspdXJd9yQZYOzt3B8pJCw6 NP9PRwyAEKbatRiabWzqVQMJg6PQZ5RUx7RBbXygASDP1jJO7/UO+SVqUJHZMHGge1wj BA7VEVvHXx6Q24bf8CiCzHjiQkBnvlfTri+RRPahbjA1qzpPytoyXtI40ItSxxVdAOB0 swlM8CggaiOTRNcLt9tUmimC+1B3+YsoMLF4bGuW0CP0IhNND9JpFmy5M2yavRxVrk9L g6pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=34SlOiK8Qumo7SrN6m7xaOWA9U05kNSMw84PrCG5gwQ=; b=EgwceSefTYBl042pU8GvO+hIpgjhL135IqnQ+fL/WJYELKDNl+BG2o6zfWBs8g2O0Y rohAiB/I6VqH7anoWuaMa+Mev+E+xjAfPbJcI3Ve/v7R66JCEKLEcdnUHGXRGpc0fUC5 3MocGu6cP1BneiNMKB4qPQzaYPli349QqDcLbjIpJfquu80SFArniG9tqQSz7VMbgHtk fI/Ir68+IF4FXg++QSbOFOaSt1o4LRyp8YUQ3lfFwtdk0g9Wj6wbJGR/S4UKTycaX+fG XxTXkUuqXz//gQD7oWymreF2t/XywQywSrIHl4+6ArD1EETRO9jogH6QH9UxnpaXhwAr hnNg== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c130si133975oig.98.2020.03.25.14.36.04; Wed, 25 Mar 2020 14:36:16 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727652AbgCYVfT (ORCPT + 99 others); Wed, 25 Mar 2020 17:35:19 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39892 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726081AbgCYVfS (ORCPT ); Wed, 25 Mar 2020 17:35:18 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 03FA8293EA9 From: Ezequiel Garcia To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Tomasz Figa , Nicolas Dufresne , kernel@collabora.com, Jonas Karlman , Heiko Stuebner , Hans Verkuil , Alexandre Courbot , Jeffrey Kardatzke , Rob Herring , Mark Rutland , devicetree@vger.kernel.org, Ezequiel Garcia Subject: [PATCH v3 4/7] hantro: Remove unneeded hantro_dec_buf_finish Date: Wed, 25 Mar 2020 18:34:35 -0300 Message-Id: <20200325213439.16509-5-ezequiel@collabora.com> X-Mailer: git-send-email 2.26.0.rc2 In-Reply-To: <20200325213439.16509-1-ezequiel@collabora.com> References: <20200325213439.16509-1-ezequiel@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since now .buf_prepare takes care of setting the buffer payload size, we can get rid of this, at least for decoders. Signed-off-by: Ezequiel Garcia --- drivers/staging/media/hantro/hantro_drv.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/drivers/staging/media/hantro/hantro_drv.c b/drivers/staging/media/hantro/hantro_drv.c index d0097c5fe7d9..0db8ad455160 100644 --- a/drivers/staging/media/hantro/hantro_drv.c +++ b/drivers/staging/media/hantro/hantro_drv.c @@ -80,15 +80,6 @@ hantro_enc_buf_finish(struct hantro_ctx *ctx, struct vb2_buffer *buf, return 0; } -static int -hantro_dec_buf_finish(struct hantro_ctx *ctx, struct vb2_buffer *buf, - unsigned int bytesused) -{ - /* For decoders set bytesused as per the output picture. */ - buf->planes[0].bytesused = ctx->dst_fmt.plane_fmt[0].sizeimage; - return 0; -} - static void hantro_job_finish(struct hantro_dev *vpu, struct hantro_ctx *ctx, unsigned int bytesused, @@ -431,7 +422,6 @@ static int hantro_open(struct file *filp) ctx->buf_finish = hantro_enc_buf_finish; } else if (func->id == MEDIA_ENT_F_PROC_VIDEO_DECODER) { allowed_codecs = vpu->variant->codec & HANTRO_DECODERS; - ctx->buf_finish = hantro_dec_buf_finish; } else { ret = -ENODEV; goto err_ctx_free; -- 2.26.0.rc2