Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp630545ybh; Wed, 18 Mar 2020 06:23:00 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtmoO3jAoi6Z4Cl5QULJDALvRxzJUBlndsdKOsnN4TmjIHPByQV06HEWkA8MjJnLaEpo744 X-Received: by 2002:a9d:4001:: with SMTP id m1mr3615127ote.57.1584537780744; Wed, 18 Mar 2020 06:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584537780; cv=none; d=google.com; s=arc-20160816; b=oI2z0eVfWeXZS9ok2YfqFmZ/DYW81IpoSa+BbWIMxXZ+bSS6rhWuv0+Q5IC+Ptj4KJ NGQuN8c0GnswvsXfIsnRxDafE6EQesYHSl7ySMUZocIUnDBW1FfHlE+PC2QmF+kYpyAU bigwYKWV2U1SaCPKDyp4YumSOgVIsxL6zu7BmcPoiJN0c2wxJDUo2q5kZxU794GdsRfo 65VhKECxIGUMI0aF4a1L0LmF61TaF6AeRwXQVoOUptoOJgSqaaJoAInDzokKmI832wA0 n1dxyKtl/6qvM476sd3LVfPoPW1ulI9/XwR3b1RpGpnwDEunQNq54MzrYirvFxbSHESr Srqw== 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=9lA5HXCGjtzW529K8jrKDFXrp5IljIJ9Q5nao6XHFuw=; b=jupLyAQQ0hoT70MbNXZ3rJGjnyyDphfYJtyGa/tEJUqTknxSTPDwy1d6D63ycwJ0nG Pc3dYZprGii9fe34569OxBV1FKU/oXX8N6Ld5BUcZGr/THyxulQnv7rc8OUG9MZMXIlU SjbzJoHL7+Y6qnM2XEks8KSwfvXJifvrwH0ZuMk+LUXIwey9I+ogApYNLsYvUxpRNgqq rwjBoydwFGyzz5JAKuPP2MQTmmIbSz5DHZ4K9Ue46ZzsGiFjrNe++xZXk6T6R3opPiNa qHF6GT1EqEanlPIqzNX3JRE7k6cBZ4gEy+Kwt19vfVc0gqeDcaN9Qz5QrT6R9DZCLk/q DY+A== 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 w90si3524704otb.305.2020.03.18.06.22.47; Wed, 18 Mar 2020 06:23:00 -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 S1727135AbgCRNWI (ORCPT + 99 others); Wed, 18 Mar 2020 09:22:08 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44508 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726842AbgCRNWG (ORCPT ); Wed, 18 Mar 2020 09:22:06 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 9E1E729661B 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 , Ezequiel Garcia Subject: [PATCH v2 4/8] hantro: Remove unneeded hantro_dec_buf_finish Date: Wed, 18 Mar 2020 10:21:04 -0300 Message-Id: <20200318132108.21873-5-ezequiel@collabora.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200318132108.21873-1-ezequiel@collabora.com> References: <20200318132108.21873-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 ec889d755cd6..bd204da6c669 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, @@ -422,7 +413,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.25.0