From patchwork Mon Sep 29 20:27:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 4998941 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 EB5039F2BA for ; Mon, 29 Sep 2014 20:28:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 34A26201C7 for ; Mon, 29 Sep 2014 20:28:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6F23C20166 for ; Mon, 29 Sep 2014 20:28:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754756AbaI2U2S (ORCPT ); Mon, 29 Sep 2014 16:28:18 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:49619 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751895AbaI2U2H (ORCPT ); Mon, 29 Sep 2014 16:28:07 -0400 Received: from avalon.ideasonboard.com (dsl-hkibrasgw3-50ddcc-40.dhcp.inet.fi [80.221.204.40]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 3B0CC20CB5; Mon, 29 Sep 2014 22:26:37 +0200 (CEST) From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Michal Simek , Chris Kohn , Hyun Kwon , Srikanth Thokala , dmaengine@vger.kernel.org Subject: [PATCH 07/11] dma: xilinx: vdma: Allow only one chunk in a line Date: Mon, 29 Sep 2014 23:27:53 +0300 Message-Id: <1412022477-28749-8-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1412022477-28749-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1412022477-28749-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 From: Srikanth Thokala This patch adds a sanity check to see if frame_size is 1. Signed-off-by: Srikanth Thokala Signed-off-by: Michal Simek --- drivers/dma/xilinx/xilinx_vdma.c | 3 +++ 1 file changed, 3 insertions(+) Cc: dmaengine@vger.kernel.org diff --git a/drivers/dma/xilinx/xilinx_vdma.c b/drivers/dma/xilinx/xilinx_vdma.c index 8e9f2a6..b3b8761 100644 --- a/drivers/dma/xilinx/xilinx_vdma.c +++ b/drivers/dma/xilinx/xilinx_vdma.c @@ -942,6 +942,9 @@ xilinx_vdma_dma_prep_interleaved(struct dma_chan *dchan, if (!xt->numf || !xt->sgl[0].size) return NULL; + if (xt->frame_size != 1) + return NULL; + /* Allocate a transaction descriptor. */ desc = xilinx_vdma_alloc_tx_descriptor(chan); if (!desc)