From patchwork Mon Dec 15 15:27:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 5495101 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3BE609F1CD for ; Mon, 15 Dec 2014 15:27:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 69EAB20A03 for ; Mon, 15 Dec 2014 15:27:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A2278209FD for ; Mon, 15 Dec 2014 15:27:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbaLOP1t (ORCPT ); Mon, 15 Dec 2014 10:27:49 -0500 Received: from mga01.intel.com ([192.55.52.88]:52566 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750771AbaLOP1s (ORCPT ); Mon, 15 Dec 2014 10:27:48 -0500 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 15 Dec 2014 07:27:48 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,580,1413270000"; d="scan'208";a="647856542" Received: from paasikivi.fi.intel.com ([10.237.72.42]) by fmsmga002.fm.intel.com with ESMTP; 15 Dec 2014 07:27:47 -0800 Received: from nauris.fi.intel.com (nauris.localdomain [192.168.240.2]) by paasikivi.fi.intel.com (Postfix) with ESMTP id 8DEB020347; Mon, 15 Dec 2014 17:27:46 +0200 (EET) Received: by nauris.fi.intel.com (Postfix, from userid 1000) id 17FC220133; Mon, 15 Dec 2014 17:27:44 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: laurent.pinchart@ideasonboard.com Subject: [PATCH 1/1] yavta: Set plane size for mplane buffers in qbuf Date: Mon, 15 Dec 2014 17:27:44 +0200 Message-Id: <1418657264-20388-1-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.0.231.g7484e3b Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The plane size was left zero for mplane buffers when queueing a buffer. Fix this. Signed-off-by: Sakari Ailus --- yavta.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yavta.c b/yavta.c index 7f9e814..77e5a41 100644 --- a/yavta.c +++ b/yavta.c @@ -979,8 +979,12 @@ static int video_queue_buffer(struct device *dev, int index, enum buffer_fill_mo if (dev->memtype == V4L2_MEMORY_USERPTR) { if (video_is_mplane(dev)) { - for (i = 0; i < dev->num_planes; i++) - buf.m.planes[i].m.userptr = (unsigned long)dev->buffers[index].mem[i]; + for (i = 0; i < dev->num_planes; i++) { + buf.m.planes[i].m.userptr = (unsigned long) + dev->buffers[index].mem[i]; + buf.m.planes[i].length = + dev->buffers[index].size[i]; + } } else { buf.m.userptr = (unsigned long)dev->buffers[index].mem[0]; }