From patchwork Mon Dec 17 10:38:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 1886461 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 75BAB3FCD5 for ; Mon, 17 Dec 2012 10:37:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533Ab2LQKhG (ORCPT ); Mon, 17 Dec 2012 05:37:06 -0500 Received: from perceval.ideasonboard.com ([95.142.166.194]:47258 "EHLO perceval.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751132Ab2LQKhG (ORCPT ); Mon, 17 Dec 2012 05:37:06 -0500 Received: from avalon.quadriga.com (unknown [194.136.87.244]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id AFB93359A8; Mon, 17 Dec 2012 11:37:03 +0100 (CET) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Pawel Osciak , Marek Szyprowski , Kyungmin Park Subject: [PATCH v2] v4l: vb2: Set data_offset to 0 for single-plane output buffers Date: Mon, 17 Dec 2012 11:38:16 +0100 Message-Id: <1355740696-11400-1-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Single-planar V4L2 buffers are converted to multi-planar vb2 buffers with a single plane when queued. The plane data_offset field is not available in the single-planar API and must be set to 0 for all output buffers. Signed-off-by: Laurent Pinchart Acked-by: Marek Szyprowski --- drivers/media/v4l2-core/videobuf2-core.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) Hi Marek, Could you please take this patch in your tree ? diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 9f81be2..e02c479 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -921,8 +921,10 @@ static void __fill_vb2_buffer(struct vb2_buffer *vb, const struct v4l2_buffer *b * In videobuf we use our internal V4l2_planes struct for * single-planar buffers as well, for simplicity. */ - if (V4L2_TYPE_IS_OUTPUT(b->type)) + if (V4L2_TYPE_IS_OUTPUT(b->type)) { v4l2_planes[0].bytesused = b->bytesused; + v4l2_planes[0].data_offset = 0; + } if (b->memory == V4L2_MEMORY_USERPTR) { v4l2_planes[0].m.userptr = b->m.userptr;