Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp788351ybh; Wed, 11 Mar 2020 10:49:26 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsfCbwLXZY+HM6IF33/quhF3X11Idp8ec5y6Th/2qoY7zCrRC+UcVfV2zayV3+tJ21TQjCJ X-Received: by 2002:a9d:2a83:: with SMTP id e3mr3516134otb.280.1583948966209; Wed, 11 Mar 2020 10:49:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583948966; cv=none; d=google.com; s=arc-20160816; b=fDXp4X2KlCvCi8HE7HkCvYJGjCIdj+hesLyfewtLiBGZ27n+WEq0IvhNocUlVQWUyi fIuiiM2x4NId6N+gcB7ql0z+wKy/Xp6DbywjcL2JfRzyy4hx3LPkCWN/ENtxB3LAmqg+ JBPmLgJ1KL5VoFYYCZ8Q0BzAP90g0Cj5c2oAFPqk5UKx525a6RzN/8k8iGH/gV4mYjjN Kj8RU3lVbDJ4kGcqExcUEt8HAsRUDpUmzQ30LrC2obpzUXRhi7EUbWPPPqou+jsFkt50 XNDQC6j//DPsF6EZtlmX4qk92por3cmoPItrcBQ55U29qkVHkEruhxTfZJFMJN9Dxnmn Ue4w== 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=ukab3udsnx8odUJMAO68A1jCNXU6Vk9HE+4ETT5dQkyXNPIUn49N9IP7TXefz0/iYl 4PiusSSUgB2cNnl5w4JJfQjm8FTl5lbqWXih3pYrGhdK4rmj4mTSpUgM/bY8HcAo0TDy A/M1/X0qAq2ZMyGXKchfKoGn5l4QERgdeMioLrWZEieRruHRO00ytnC4dZbcoQYvWzxy KF/8Bxd6lrCBa8Tzqu8b8EMa+hxKI1EZ0H0A90DnnnPhGnY/59I30k1GMbx+GIgHZMSZ Qx4IwoXo+Zz+uUw/OVJaatQGVFzSfXDtL+BzmoQeqMcQtELnDBhAsBifU3pJe4O6Cw/6 G5qQ== 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 r3si1517843otn.55.2020.03.11.10.49.11; Wed, 11 Mar 2020 10:49:26 -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 S1730714AbgCKRr1 (ORCPT + 99 others); Wed, 11 Mar 2020 13:47:27 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:33096 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730645AbgCKRr0 (ORCPT ); Wed, 11 Mar 2020 13:47:26 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id 80D4C2912DA 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 , Ezequiel Garcia Subject: [PATCH 4/6] hantro: Remove unneeded hantro_dec_buf_finish Date: Wed, 11 Mar 2020 14:42:58 -0300 Message-Id: <20200311174300.19407-5-ezequiel@collabora.com> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200311174300.19407-1-ezequiel@collabora.com> References: <20200311174300.19407-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