From patchwork Wed Mar 18 22:55:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Nordell X-Patchwork-Id: 28851 X-Patchwork-Delegate: laurent.pinchart@ideasonboard.com Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1YYMsh-0006dP-VH; Wed, 18 Mar 2015 23:56:07 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.76/mailfrontend-5) with esmtp id 1YYMsf-0006aO-6Z; Wed, 18 Mar 2015 23:56:07 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755242AbbCRW4B (ORCPT + 1 other); Wed, 18 Mar 2015 18:56:01 -0400 Received: from smtp.logicpd.com ([174.46.170.145]:38092 "HELO smtp.logicpd.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1755240AbbCRWz7 (ORCPT ); Wed, 18 Mar 2015 18:55:59 -0400 X-ASG-Debug-ID: 1426719357-083a4f2516e2c10001-rVgMWv Received: from EDPR-MAIL01.logicpd.com (edpr-mail01.logicpd.com [10.1.18.127]) by smtp.logicpd.com with ESMTP id DB5DCn7bDz36Cd9R (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 18 Mar 2015 17:55:58 -0500 (CDT) X-Barracuda-Envelope-From: tim.nordell@logicpd.com Received: from mplswks572_linux.logicpd.com (10.0.5.78) by EDPR-MAIL01.logicpd.com (10.1.18.127) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 18 Mar 2015 17:55:57 -0500 From: Tim Nordell To: CC: , , Tim Nordell Subject: [PATCH] OMAP3 ISP: Set DMA segment size Date: Wed, 18 Mar 2015 17:55:43 -0500 X-ASG-Orig-Subj: [PATCH] OMAP3 ISP: Set DMA segment size Message-ID: <1426719343-13027-1-git-send-email-tim.nordell@logicpd.com> X-Mailer: git-send-email 2.0.4 MIME-Version: 1.0 X-Originating-IP: [10.0.5.78] X-ClientProxiedBy: EDPR-MAIL01.logicpd.com (10.1.18.127) To EDPR-MAIL01.logicpd.com (10.1.18.127) X-Barracuda-Connect: edpr-mail01.logicpd.com[10.1.18.127] X-Barracuda-Start-Time: 1426719358 X-Barracuda-Encrypted: ECDHE-RSA-AES256-SHA X-Barracuda-URL: https://edpr-cuda.logicpd.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at logicpd.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.50 X-Barracuda-Spam-Status: No, SCORE=0.50 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests=BSF_RULE7568M, BSF_SC0_MISMATCH_TO X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.16873 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.50 BSF_RULE7568M Custom Rule 7568M Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2015.3.18.224521 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1300_1399 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, WEBMAIL_SOURCE 0, WEBMAIL_XOIP 0, WEBMAIL_X_IP_HDR 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_XOIP 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' When utilizing userptr buffers for output from the CCDC, the DMA subsystem maps buffers into the virtual address space. However, the DMA subsystem also has a configurable parameter for what the largest segment to allocate is out of the virtual address space as well. Since we need contiguous buffers for the memory space from the OMAP3 ISP's vantage point, we need to configure the segments to be at least as large as the largest buffer we expect. Signed-off-by: Tim Nordell --- drivers/media/platform/omap3isp/isp.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/media/platform/omap3isp/isp.c b/drivers/media/platform/omap3isp/isp.c index ead2d0d..ab95fd1 100644 --- a/drivers/media/platform/omap3isp/isp.c +++ b/drivers/media/platform/omap3isp/isp.c @@ -2170,6 +2170,14 @@ static int isp_attach_iommu(struct isp_device *isp) goto error; } + isp->dev->dma_parms = devm_kzalloc(isp->dev, + sizeof(*isp->dev->dma_parms), GFP_KERNEL); + ret = dma_set_max_seg_size(isp->dev, SZ_32M); + if (ret < 0) { + dev_err(isp->dev, "failed to set max segment size for dma\n"); + goto error; + } + return 0; error: