From patchwork Tue Oct 10 07:52:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 115359 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp3461607qgn; Tue, 10 Oct 2017 00:53:17 -0700 (PDT) X-Received: by 10.99.98.6 with SMTP id w6mr11512378pgb.189.1507621997073; Tue, 10 Oct 2017 00:53:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507621997; cv=none; d=google.com; s=arc-20160816; b=SyxdfsABA9OYjKixNPI4XL/r0LSZZho+dgLYhuTgeMr13TZnJcJ7VEUEv2+7Mi9bkP ovhuQmoedGVco2LySBVxn5rOomCrvGDOMxLIeycubPB99vPXyTWX8qjUUHUOXngU+UQV b5b1Iv+Sc0iOcGh3WxnRx1om8LGK/+fIP2QMWLXejhIv9kBcw7nOce975XycWviH/jEO dwrG5ZNLOarxUJyVyfj4PtXwoUkwtsxzFa5Y7AulntIO+N3WxhlTt+Xy9qAIrLmsX3Fb dlZN2m+QCpfrB/NoUo0Qe8lilJK5tgML62gHed1fXgDRP6R3MzeCXJ3HzfThiRpgc6ki T2sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=0iBxd9nN768TCknCaDO3lZLVXGtEjtZ3PQdzDnnHFZ4=; b=wHLUvXWbuFRQLZ59c5lVVx57KNM+mPUtVfn94jyrZQj5sdCcHNpo1+/+Ih1cbu4pzX FLQyyCxoHQXZC/LbjkA0YT8ckNGj+E/i8QGQNnnmHjEcrdCVJFgfyKfoIVob/m4HGPE+ vlNcjQD04DwhusBXL6cFkZaocHuSV76u2SiSIKzP4An+gPUYoNLG3dM4whbGsDzA+xsu Ipi034Lv5C2Truy8bXEIV7XOOFH4DealJE6sxsMSTbdLC9VnNxjqKH3wHebjuQrckHB3 rvPbD1w1MyFbBDtLW27ZZByqvXwlsXDOW1QJmJ3PTukeJRvzjB+mKnLj0IsLxhkKQjwP jEWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=F12qdVlG; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z19si4623280pfi.576.2017.10.10.00.53.16; Tue, 10 Oct 2017 00:53:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=F12qdVlG; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752146AbdJJHxP (ORCPT + 11 others); Tue, 10 Oct 2017 03:53:15 -0400 Received: from mail-wm0-f41.google.com ([74.125.82.41]:51430 "EHLO mail-wm0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbdJJHxO (ORCPT ); Tue, 10 Oct 2017 03:53:14 -0400 Received: by mail-wm0-f41.google.com with SMTP id f4so2616189wme.0 for ; Tue, 10 Oct 2017 00:53:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=sT85+UbEv5kL3C6vjBjEGDIgW0oIwSx48pOKjNpgbpE=; b=F12qdVlGp3rbshM7uzGPSSHsT6ECinjDxOJ7Daalzk83tXbg1W0DDhIr6IpCZ7YnIK zen3vViZ88FHFBtbF14g8VFIeGmc9hl2u5zH8A+DFC/YM9K53Tan8N5eB5B2YHliCD2O ud3vHSjLw0fCklcWcoec8HSq+nKCBpJv4NBSg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=sT85+UbEv5kL3C6vjBjEGDIgW0oIwSx48pOKjNpgbpE=; b=pqnduxM7Qrh2Y2OMekB/etVRZIhtiM71ceZFGMkUXYnbvQIYy+y93ohhDIEb2E7YIN su373ghP1xpXPBQzwWjwVtBnFjrBH7qo5lOLOeu8LlG345wVvY33F8fncE7FT0J3g+Zu dSgaULmUHYzBkNOrwZ7B+5frcrbIEE0KJpISJINYt9Cg9/oAGB9D8YB0c1hY0LaJC8Xw Jqj4dajMpyqAB2dY8BzX6lYfeAQLfKZCUwBWKw1nLeegsf6jRfx4DznVAFeDNOPzncy5 WzXF5qlGAetDlJIVauOyzCBBqfZCGOBKw7Zx5D3IbZSo3Slxf5M5+SS/mXq7mo+LWK5v AM9w== X-Gm-Message-State: AMCzsaU1pX9BVU1VPpHZMuNq+1HtklDdPaAuUT/7H4u8wAU91cIU3VR+ gLLAxIJKfblGzCGXSeUPuSRIvA== X-Google-Smtp-Source: AOwi7QCcSSo7hw3YdkVXr9ZLqrNpso3kgnQvxW/Xjv6Ll03QjaPQzY44kyFQ59eNVsDiUvM7V+OAaw== X-Received: by 10.223.139.85 with SMTP id v21mr12514029wra.70.1507621993328; Tue, 10 Oct 2017 00:53:13 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id p78sm19975351wma.11.2017.10.10.00.53.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Oct 2017 00:53:12 -0700 (PDT) From: Stanimir Varbanov To: Hans Verkuil Cc: Nicolas Dufresne , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Stanimir Varbanov Subject: [PATCH v2] media: venus: venc: fix bytesused v4l2_plane field Date: Tue, 10 Oct 2017 10:52:36 +0300 Message-Id: <20171010075236.26424-1-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171009122458.3053-2-stanimir.varbanov@linaro.org> References: <20171009122458.3053-2-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org This fixes wrongly filled bytesused field of v4l2_plane structure by include data_offset in the plane, Also fill data_offset and bytesused for capture type of buffers only. Signed-off-by: Stanimir Varbanov --- v2: Just delete pointless WARN_ON. drivers/media/platform/qcom/venus/venc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/media/platform/qcom/venus/venc.c b/drivers/media/platform/qcom/venus/venc.c index 6f123a387cf9..3fcf0e9b7b29 100644 --- a/drivers/media/platform/qcom/venus/venc.c +++ b/drivers/media/platform/qcom/venus/venc.c @@ -963,13 +963,12 @@ static void venc_buf_done(struct venus_inst *inst, unsigned int buf_type, if (!vbuf) return; - vb = &vbuf->vb2_buf; - vb->planes[0].bytesused = bytesused; - vb->planes[0].data_offset = data_offset; - vbuf->flags = flags; if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) { + vb = &vbuf->vb2_buf; + vb2_set_plane_payload(vb, 0, bytesused + data_offset); + vb->planes[0].data_offset = data_offset; vb->timestamp = timestamp_us * NSEC_PER_USEC; vbuf->sequence = inst->sequence_cap++; } else {