From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C81E1C433E3 for ; Thu, 20 Aug 2020 16:55:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9A5B207DE for ; Thu, 20 Aug 2020 16:55:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730178AbgHTQy7 (ORCPT ); Thu, 20 Aug 2020 12:54:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729432AbgHTQyy (ORCPT ); Thu, 20 Aug 2020 12:54:54 -0400 Received: from hillosipuli.retiisi.org.uk (hillosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::81:2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A041C061385; Thu, 20 Aug 2020 09:54:53 -0700 (PDT) Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id E79D7634C87; Thu, 20 Aug 2020 19:53:39 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1k8nop-0002qv-OM; Thu, 20 Aug 2020 19:53:39 +0300 Date: Thu, 20 Aug 2020 19:53:39 +0300 From: Sakari Ailus To: Robin Murphy Cc: hch@lst.de, joro@8bytes.org, linux@armlinux.org.uk, will@kernel.org, inki.dae@samsung.com, sw0312.kim@samsung.com, kyungmin.park@samsung.com, m.szyprowski@samsung.com, agross@kernel.org, bjorn.andersson@linaro.org, thierry.reding@gmail.com, jonathanh@nvidia.com, vdumpa@nvidia.com, digetx@gmail.com, matthias.bgg@gmail.com, yong.wu@mediatek.com, geert+renesas@glider.be, magnus.damm@gmail.com, t-kristo@ti.com, s-anna@ti.com, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-tegra@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-mediatek@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround Message-ID: <20200820165339.GK7145@valkosipuli.retiisi.org.uk> References: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-tegra-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: > Now that arch/arm is wired up for default domains and iommu-dma, devices > behind IOMMUs will get mappings set up automatically as appropriate, so > there is no need for drivers to do so manually. > > Signed-off-by: Robin Murphy Thanks for the patch. I haven't looked at the details but it seems that this causes the buffer memory allocation to be physically contiguous, which causes a failure to allocate video buffers of entirely normal size. I guess that was not intentional? -----------------8<--------------------------- [ 218.934448] WARNING: CPU: 0 PID: 1994 at mm/page_alloc.c:4859 __alloc_pages_nodemask+0x9c/0xb1c [ 218.943847] Modules linked in: omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common leds_as3645a smiapp v4l2_flash_led_class led_class_flash v4l2_fwnode smiapp_pll videodev leds_gpio mc led_class [ 218.964660] CPU: 0 PID: 1994 Comm: yavta Not tainted 5.9.0-rc1-dirty #1818 [ 218.972442] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 218.978973] Backtrace: [ 218.981842] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 218.989715] r7:00000000 r6:00000009 r5:c08f03bc r4:c08f2fef [ 218.995880] [] (show_stack) from [] (dump_stack+0x28/0x30) [ 219.003631] [] (dump_stack) from [] (__warn+0x100/0x118) [ 219.010955] r5:c08f03bc r4:00000000 [ 219.014953] [] (__warn) from [] (warn_slowpath_fmt+0x84/0xa8) [ 219.022949] r9:c0232090 r8:c08f03bc r7:c0b08a88 r6:00000009 r5:000012fb r4:00000000 [ 219.031036] [] (warn_slowpath_fmt) from [] (__alloc_pages_nodemask+0x9c/0xb1c) [ 219.040557] r9:c0185c3c r8:00000000 r7:010ec000 r6:00000000 r5:0000000d r4:00000000 [ 219.048858] [] (__alloc_pages_nodemask) from [] (__dma_alloc_buffer.constprop.14+0x3c/0x90) [ 219.059570] r10:00000cc0 r9:c0185c3c r8:00000000 r7:010ec000 r6:0000000d r5:c0b08a88 [ 219.067901] r4:00000cc0 [ 219.070587] [] (__dma_alloc_buffer.constprop.14) from [] (remap_allocator_alloc+0x34/0x7c) [ 219.081207] r9:c0185c3c r8:00000247 r7:e6d7fb84 r6:010ec000 r5:c0b08a88 r4:00000001 [ 219.089263] [] (remap_allocator_alloc) from [] (__dma_alloc+0x124/0x21c) [ 219.098236] r9:ed99fc10 r8:e69aa890 r7:00000000 r6:ffffffff r5:c0b08a88 r4:e6fdd680 [ 219.106536] [] (__dma_alloc) from [] (arm_dma_alloc+0x68/0x74) [ 219.114654] r10:00000cc0 r9:c0185c3c r8:00000cc0 r7:e69aa890 r6:010ec000 r5:ed99fc10 [ 219.122985] r4:00000000 [ 219.125671] [] (arm_dma_alloc) from [] (dma_alloc_attrs+0xe4/0x120) [ 219.134216] r9:00000000 r8:e69aa890 r7:010ec000 r6:c0b08a88 r5:ed99fc10 r4:c010f634 [ 219.142517] [] (dma_alloc_attrs) from [] (vb2_dc_alloc+0xcc/0x108 [videobuf2_dma_contig]) [ 219.153076] r10:e6885ca8 r9:e6abfc48 r8:00000002 r7:00000000 r6:010ec000 r5:ed99fc10 [ 219.161407] r4:e69aa880 [ 219.164184] [] (vb2_dc_alloc [videobuf2_dma_contig]) from [] (__vb2_queue_alloc+0x258/0x4a4 [videobuf2_common]) [ 219.176696] r8:bf095b70 r7:010ec000 r6:00000000 r5:e6885ca8 r4:e6abfc00 [ 219.183959] [] (__vb2_queue_alloc [videobuf2_common]) from [] (vb2_core_reqbufs+0x408/0x498 [videobuf2_common]) [ 219.196533] r10:e6885ce8 r9:00000000 r8:e6d7fe24 r7:e6d7fcec r6:bf09ced4 r5:bf088580 [ 219.204895] r4:e6885ca8 [ 219.207672] [] (vb2_core_reqbufs [videobuf2_common]) from [] (vb2_reqbufs+0x64/0x70 [videobuf2_v4l2]) [ 219.219268] r10:00000000 r9:bf032bc0 r8:c0145608 r7:bf0ad4a4 r6:e6885ca8 r5:00000000 [ 219.227600] r4:e6d7fe24 [ 219.230499] [] (vb2_reqbufs [videobuf2_v4l2]) from [] (isp_video_reqbufs+0x40/0x54 [omap3_isp]) [ 219.241607] r7:bf0ad4a4 r6:e6d7fe24 r5:e6885c00 r4:e6cca928 [ 219.247924] [] (isp_video_reqbufs [omap3_isp]) from [] (v4l_reqbufs+0x4c/0x50 [videodev]) [ 219.258514] r7:bf0ad4a4 r6:e6885c00 r5:e6d7fe24 r4:e7efbec0 [ 219.264984] [] (v4l_reqbufs [videodev]) from [] (__video_do_ioctl+0x2d8/0x414 [videodev]) [ 219.275512] r7:bf01de00 r6:00000000 r5:00000000 r4:e6cca2e0 [ 219.281982] [] (__video_do_ioctl [videodev]) from [] (video_usercopy+0x144/0x508 [videodev]) [ 219.292816] r10:e7efbec0 r9:c0145608 r8:e6d7fe24 r7:00000000 r6:00000000 r5:bf01ebdc [ 219.300933] r4:c0145608 [ 219.304168] [] (video_usercopy [videodev]) from [] (video_ioctl2+0x1c/0x24 [videodev]) [ 219.314453] r10:e7fbfda0 r9:e7efbec0 r8:00000003 r7:00000000 r6:bee658f4 r5:c0145608 [ 219.322784] r4:e7efbec0 [ 219.325775] [] (video_ioctl2 [videodev]) from [] (v4l2_ioctl+0x50/0x64 [videodev]) [ 219.335845] [] (v4l2_ioctl [videodev]) from [] (vfs_ioctl+0x30/0x44) [ 219.344482] r7:00000000 r6:e7efbec0 r5:bee658f4 r4:c0145608 [ 219.350402] [] (vfs_ioctl) from [] (sys_ioctl+0xdc/0x7ec) [ 219.358062] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28) [ 219.366149] Exception stack(0xe6d7ffa8 to 0xe6d7fff0) [ 219.371673] ffa0: 00000000 bee65c1a 00000003 c0145608 bee658f4 00000001 [ 219.380157] ffc0: 00000000 bee65c1a 00000000 00000036 000009a0 00000000 0000ef30 010eb400 [ 219.388885] ffe0: 0001716c bee65104 0000b588 b6e413ac [ 219.394409] r10:00000036 r9:e6d7e000 r8:c0100244 r7:00000036 r6:00000000 r5:bee65c1a [ 219.402740] r4:00000000 [ 219.405426] irq event stamp: 5075 [ 219.408905] hardirqs last enabled at (5083): [] console_unlock+0x4cc/0x524 [ 219.417297] hardirqs last disabled at (5092): [] console_unlock+0x3c8/0x524 [ 219.425628] softirqs last enabled at (4532): [] __do_softirq+0x1f0/0x490 [ 219.433837] softirqs last disabled at (4493): [] irq_exit+0xe4/0x160 [ 219.441558] ---[ end trace 8c56810633cf24db ]--- [ 219.446502] omap3isp 480bc000.isp: dma_alloc_coherent of size 17743872 failed -----------------8<--------------------------- -- Kind regards, Sakari Ailus From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8ED90C433E3 for ; Thu, 20 Aug 2020 17:03:44 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6830A208B3 for ; Thu, 20 Aug 2020 17:03:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6830A208B3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0C99920426; Thu, 20 Aug 2020 17:03:44 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 16tc66qJ4Am2; Thu, 20 Aug 2020 17:03:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 7D1362047F; Thu, 20 Aug 2020 17:03:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 52D60C07FF; Thu, 20 Aug 2020 17:03:40 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7AA74C0051 for ; Thu, 20 Aug 2020 17:03:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6240B85036 for ; Thu, 20 Aug 2020 17:03:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mYy8EPzaTV7n for ; Thu, 20 Aug 2020 17:03:36 +0000 (UTC) X-Greylist: delayed 00:08:43 by SQLgrey-1.7.6 Received: from hillosipuli.retiisi.org.uk (retiisi.org.uk [95.216.213.190]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 3CFE684FFF for ; Thu, 20 Aug 2020 17:03:36 +0000 (UTC) Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id E79D7634C87; Thu, 20 Aug 2020 19:53:39 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1k8nop-0002qv-OM; Thu, 20 Aug 2020 19:53:39 +0300 Date: Thu, 20 Aug 2020 19:53:39 +0300 From: Sakari Ailus To: Robin Murphy Subject: Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround Message-ID: <20200820165339.GK7145@valkosipuli.retiisi.org.uk> References: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: geert+renesas@glider.be, dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, digetx@gmail.com, will@kernel.org, hch@lst.de, linux-samsung-soc@vger.kernel.org, magnus.damm@gmail.com, linux@armlinux.org.uk, jonathanh@nvidia.com, agross@kernel.org, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, inki.dae@samsung.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, sw0312.kim@samsung.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, t-kristo@ti.com, kyungmin.park@samsung.com X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: > Now that arch/arm is wired up for default domains and iommu-dma, devices > behind IOMMUs will get mappings set up automatically as appropriate, so > there is no need for drivers to do so manually. > > Signed-off-by: Robin Murphy Thanks for the patch. I haven't looked at the details but it seems that this causes the buffer memory allocation to be physically contiguous, which causes a failure to allocate video buffers of entirely normal size. I guess that was not intentional? -----------------8<--------------------------- [ 218.934448] WARNING: CPU: 0 PID: 1994 at mm/page_alloc.c:4859 __alloc_pages_nodemask+0x9c/0xb1c [ 218.943847] Modules linked in: omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common leds_as3645a smiapp v4l2_flash_led_class led_class_flash v4l2_fwnode smiapp_pll videodev leds_gpio mc led_class [ 218.964660] CPU: 0 PID: 1994 Comm: yavta Not tainted 5.9.0-rc1-dirty #1818 [ 218.972442] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 218.978973] Backtrace: [ 218.981842] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 218.989715] r7:00000000 r6:00000009 r5:c08f03bc r4:c08f2fef [ 218.995880] [] (show_stack) from [] (dump_stack+0x28/0x30) [ 219.003631] [] (dump_stack) from [] (__warn+0x100/0x118) [ 219.010955] r5:c08f03bc r4:00000000 [ 219.014953] [] (__warn) from [] (warn_slowpath_fmt+0x84/0xa8) [ 219.022949] r9:c0232090 r8:c08f03bc r7:c0b08a88 r6:00000009 r5:000012fb r4:00000000 [ 219.031036] [] (warn_slowpath_fmt) from [] (__alloc_pages_nodemask+0x9c/0xb1c) [ 219.040557] r9:c0185c3c r8:00000000 r7:010ec000 r6:00000000 r5:0000000d r4:00000000 [ 219.048858] [] (__alloc_pages_nodemask) from [] (__dma_alloc_buffer.constprop.14+0x3c/0x90) [ 219.059570] r10:00000cc0 r9:c0185c3c r8:00000000 r7:010ec000 r6:0000000d r5:c0b08a88 [ 219.067901] r4:00000cc0 [ 219.070587] [] (__dma_alloc_buffer.constprop.14) from [] (remap_allocator_alloc+0x34/0x7c) [ 219.081207] r9:c0185c3c r8:00000247 r7:e6d7fb84 r6:010ec000 r5:c0b08a88 r4:00000001 [ 219.089263] [] (remap_allocator_alloc) from [] (__dma_alloc+0x124/0x21c) [ 219.098236] r9:ed99fc10 r8:e69aa890 r7:00000000 r6:ffffffff r5:c0b08a88 r4:e6fdd680 [ 219.106536] [] (__dma_alloc) from [] (arm_dma_alloc+0x68/0x74) [ 219.114654] r10:00000cc0 r9:c0185c3c r8:00000cc0 r7:e69aa890 r6:010ec000 r5:ed99fc10 [ 219.122985] r4:00000000 [ 219.125671] [] (arm_dma_alloc) from [] (dma_alloc_attrs+0xe4/0x120) [ 219.134216] r9:00000000 r8:e69aa890 r7:010ec000 r6:c0b08a88 r5:ed99fc10 r4:c010f634 [ 219.142517] [] (dma_alloc_attrs) from [] (vb2_dc_alloc+0xcc/0x108 [videobuf2_dma_contig]) [ 219.153076] r10:e6885ca8 r9:e6abfc48 r8:00000002 r7:00000000 r6:010ec000 r5:ed99fc10 [ 219.161407] r4:e69aa880 [ 219.164184] [] (vb2_dc_alloc [videobuf2_dma_contig]) from [] (__vb2_queue_alloc+0x258/0x4a4 [videobuf2_common]) [ 219.176696] r8:bf095b70 r7:010ec000 r6:00000000 r5:e6885ca8 r4:e6abfc00 [ 219.183959] [] (__vb2_queue_alloc [videobuf2_common]) from [] (vb2_core_reqbufs+0x408/0x498 [videobuf2_common]) [ 219.196533] r10:e6885ce8 r9:00000000 r8:e6d7fe24 r7:e6d7fcec r6:bf09ced4 r5:bf088580 [ 219.204895] r4:e6885ca8 [ 219.207672] [] (vb2_core_reqbufs [videobuf2_common]) from [] (vb2_reqbufs+0x64/0x70 [videobuf2_v4l2]) [ 219.219268] r10:00000000 r9:bf032bc0 r8:c0145608 r7:bf0ad4a4 r6:e6885ca8 r5:00000000 [ 219.227600] r4:e6d7fe24 [ 219.230499] [] (vb2_reqbufs [videobuf2_v4l2]) from [] (isp_video_reqbufs+0x40/0x54 [omap3_isp]) [ 219.241607] r7:bf0ad4a4 r6:e6d7fe24 r5:e6885c00 r4:e6cca928 [ 219.247924] [] (isp_video_reqbufs [omap3_isp]) from [] (v4l_reqbufs+0x4c/0x50 [videodev]) [ 219.258514] r7:bf0ad4a4 r6:e6885c00 r5:e6d7fe24 r4:e7efbec0 [ 219.264984] [] (v4l_reqbufs [videodev]) from [] (__video_do_ioctl+0x2d8/0x414 [videodev]) [ 219.275512] r7:bf01de00 r6:00000000 r5:00000000 r4:e6cca2e0 [ 219.281982] [] (__video_do_ioctl [videodev]) from [] (video_usercopy+0x144/0x508 [videodev]) [ 219.292816] r10:e7efbec0 r9:c0145608 r8:e6d7fe24 r7:00000000 r6:00000000 r5:bf01ebdc [ 219.300933] r4:c0145608 [ 219.304168] [] (video_usercopy [videodev]) from [] (video_ioctl2+0x1c/0x24 [videodev]) [ 219.314453] r10:e7fbfda0 r9:e7efbec0 r8:00000003 r7:00000000 r6:bee658f4 r5:c0145608 [ 219.322784] r4:e7efbec0 [ 219.325775] [] (video_ioctl2 [videodev]) from [] (v4l2_ioctl+0x50/0x64 [videodev]) [ 219.335845] [] (v4l2_ioctl [videodev]) from [] (vfs_ioctl+0x30/0x44) [ 219.344482] r7:00000000 r6:e7efbec0 r5:bee658f4 r4:c0145608 [ 219.350402] [] (vfs_ioctl) from [] (sys_ioctl+0xdc/0x7ec) [ 219.358062] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28) [ 219.366149] Exception stack(0xe6d7ffa8 to 0xe6d7fff0) [ 219.371673] ffa0: 00000000 bee65c1a 00000003 c0145608 bee658f4 00000001 [ 219.380157] ffc0: 00000000 bee65c1a 00000000 00000036 000009a0 00000000 0000ef30 010eb400 [ 219.388885] ffe0: 0001716c bee65104 0000b588 b6e413ac [ 219.394409] r10:00000036 r9:e6d7e000 r8:c0100244 r7:00000036 r6:00000000 r5:bee65c1a [ 219.402740] r4:00000000 [ 219.405426] irq event stamp: 5075 [ 219.408905] hardirqs last enabled at (5083): [] console_unlock+0x4cc/0x524 [ 219.417297] hardirqs last disabled at (5092): [] console_unlock+0x3c8/0x524 [ 219.425628] softirqs last enabled at (4532): [] __do_softirq+0x1f0/0x490 [ 219.433837] softirqs last disabled at (4493): [] irq_exit+0xe4/0x160 [ 219.441558] ---[ end trace 8c56810633cf24db ]--- [ 219.446502] omap3isp 480bc000.isp: dma_alloc_coherent of size 17743872 failed -----------------8<--------------------------- -- Kind regards, Sakari Ailus _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4CE66C433E1 for ; Thu, 20 Aug 2020 16:55:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1B3962072D for ; Thu, 20 Aug 2020 16:55:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Tt92tBI7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B3962072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=7D9ykOeVQ+UeFYgy3zmLav+yLA4iQmZpyiGsyUoAYOE=; b=Tt92tBI7Xt1ELXInRmYlgfV+r ZThlOQWDpZDu5QQASRiG2VevKFYs9wv2zcU2pa9HFazzk+bkfDNOuR1ZIl5neipsFAKocOZMjIz63 lkjDzo1fhjMlLmloGh9RnPElzxnA6KqhLRjRRXK1bwRnAwtTUB/UfqnqvwHx0P2wXoKus7WnTzy2Q hfnmRk7IahKgP1ybXePmMMWPx7sygtPd+qZd4S60l9EpBdxDbkaYncJXscQKpyocQ/SitZ06Sebk8 ESCFe9a/gJUsvs90l7YCBTzgxAzIXQNfcz/GuQy7MArQXOxKazhVA+JYwXcT/anihkO5JIgW5Cxe5 iEzLVeeNw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8nqB-00037x-Fv; Thu, 20 Aug 2020 16:55:03 +0000 Received: from retiisi.org.uk ([95.216.213.190] helo=hillosipuli.retiisi.org.uk) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8nq4-000344-RG; Thu, 20 Aug 2020 16:54:58 +0000 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id E79D7634C87; Thu, 20 Aug 2020 19:53:39 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1k8nop-0002qv-OM; Thu, 20 Aug 2020 19:53:39 +0300 Date: Thu, 20 Aug 2020 19:53:39 +0300 From: Sakari Ailus To: Robin Murphy Subject: Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround Message-ID: <20200820165339.GK7145@valkosipuli.retiisi.org.uk> References: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_125457_193045_6154A926 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: geert+renesas@glider.be, dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org, linux-tegra@vger.kernel.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, digetx@gmail.com, s-anna@ti.com, will@kernel.org, hch@lst.de, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, joro@8bytes.org, magnus.damm@gmail.com, linux@armlinux.org.uk, jonathanh@nvidia.com, agross@kernel.org, yong.wu@mediatek.com, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, inki.dae@samsung.com, vdumpa@nvidia.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, sw0312.kim@samsung.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, t-kristo@ti.com, kyungmin.park@samsung.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: > Now that arch/arm is wired up for default domains and iommu-dma, devices > behind IOMMUs will get mappings set up automatically as appropriate, so > there is no need for drivers to do so manually. > > Signed-off-by: Robin Murphy Thanks for the patch. I haven't looked at the details but it seems that this causes the buffer memory allocation to be physically contiguous, which causes a failure to allocate video buffers of entirely normal size. I guess that was not intentional? -----------------8<--------------------------- [ 218.934448] WARNING: CPU: 0 PID: 1994 at mm/page_alloc.c:4859 __alloc_pages_nodemask+0x9c/0xb1c [ 218.943847] Modules linked in: omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common leds_as3645a smiapp v4l2_flash_led_class led_class_flash v4l2_fwnode smiapp_pll videodev leds_gpio mc led_class [ 218.964660] CPU: 0 PID: 1994 Comm: yavta Not tainted 5.9.0-rc1-dirty #1818 [ 218.972442] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 218.978973] Backtrace: [ 218.981842] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 218.989715] r7:00000000 r6:00000009 r5:c08f03bc r4:c08f2fef [ 218.995880] [] (show_stack) from [] (dump_stack+0x28/0x30) [ 219.003631] [] (dump_stack) from [] (__warn+0x100/0x118) [ 219.010955] r5:c08f03bc r4:00000000 [ 219.014953] [] (__warn) from [] (warn_slowpath_fmt+0x84/0xa8) [ 219.022949] r9:c0232090 r8:c08f03bc r7:c0b08a88 r6:00000009 r5:000012fb r4:00000000 [ 219.031036] [] (warn_slowpath_fmt) from [] (__alloc_pages_nodemask+0x9c/0xb1c) [ 219.040557] r9:c0185c3c r8:00000000 r7:010ec000 r6:00000000 r5:0000000d r4:00000000 [ 219.048858] [] (__alloc_pages_nodemask) from [] (__dma_alloc_buffer.constprop.14+0x3c/0x90) [ 219.059570] r10:00000cc0 r9:c0185c3c r8:00000000 r7:010ec000 r6:0000000d r5:c0b08a88 [ 219.067901] r4:00000cc0 [ 219.070587] [] (__dma_alloc_buffer.constprop.14) from [] (remap_allocator_alloc+0x34/0x7c) [ 219.081207] r9:c0185c3c r8:00000247 r7:e6d7fb84 r6:010ec000 r5:c0b08a88 r4:00000001 [ 219.089263] [] (remap_allocator_alloc) from [] (__dma_alloc+0x124/0x21c) [ 219.098236] r9:ed99fc10 r8:e69aa890 r7:00000000 r6:ffffffff r5:c0b08a88 r4:e6fdd680 [ 219.106536] [] (__dma_alloc) from [] (arm_dma_alloc+0x68/0x74) [ 219.114654] r10:00000cc0 r9:c0185c3c r8:00000cc0 r7:e69aa890 r6:010ec000 r5:ed99fc10 [ 219.122985] r4:00000000 [ 219.125671] [] (arm_dma_alloc) from [] (dma_alloc_attrs+0xe4/0x120) [ 219.134216] r9:00000000 r8:e69aa890 r7:010ec000 r6:c0b08a88 r5:ed99fc10 r4:c010f634 [ 219.142517] [] (dma_alloc_attrs) from [] (vb2_dc_alloc+0xcc/0x108 [videobuf2_dma_contig]) [ 219.153076] r10:e6885ca8 r9:e6abfc48 r8:00000002 r7:00000000 r6:010ec000 r5:ed99fc10 [ 219.161407] r4:e69aa880 [ 219.164184] [] (vb2_dc_alloc [videobuf2_dma_contig]) from [] (__vb2_queue_alloc+0x258/0x4a4 [videobuf2_common]) [ 219.176696] r8:bf095b70 r7:010ec000 r6:00000000 r5:e6885ca8 r4:e6abfc00 [ 219.183959] [] (__vb2_queue_alloc [videobuf2_common]) from [] (vb2_core_reqbufs+0x408/0x498 [videobuf2_common]) [ 219.196533] r10:e6885ce8 r9:00000000 r8:e6d7fe24 r7:e6d7fcec r6:bf09ced4 r5:bf088580 [ 219.204895] r4:e6885ca8 [ 219.207672] [] (vb2_core_reqbufs [videobuf2_common]) from [] (vb2_reqbufs+0x64/0x70 [videobuf2_v4l2]) [ 219.219268] r10:00000000 r9:bf032bc0 r8:c0145608 r7:bf0ad4a4 r6:e6885ca8 r5:00000000 [ 219.227600] r4:e6d7fe24 [ 219.230499] [] (vb2_reqbufs [videobuf2_v4l2]) from [] (isp_video_reqbufs+0x40/0x54 [omap3_isp]) [ 219.241607] r7:bf0ad4a4 r6:e6d7fe24 r5:e6885c00 r4:e6cca928 [ 219.247924] [] (isp_video_reqbufs [omap3_isp]) from [] (v4l_reqbufs+0x4c/0x50 [videodev]) [ 219.258514] r7:bf0ad4a4 r6:e6885c00 r5:e6d7fe24 r4:e7efbec0 [ 219.264984] [] (v4l_reqbufs [videodev]) from [] (__video_do_ioctl+0x2d8/0x414 [videodev]) [ 219.275512] r7:bf01de00 r6:00000000 r5:00000000 r4:e6cca2e0 [ 219.281982] [] (__video_do_ioctl [videodev]) from [] (video_usercopy+0x144/0x508 [videodev]) [ 219.292816] r10:e7efbec0 r9:c0145608 r8:e6d7fe24 r7:00000000 r6:00000000 r5:bf01ebdc [ 219.300933] r4:c0145608 [ 219.304168] [] (video_usercopy [videodev]) from [] (video_ioctl2+0x1c/0x24 [videodev]) [ 219.314453] r10:e7fbfda0 r9:e7efbec0 r8:00000003 r7:00000000 r6:bee658f4 r5:c0145608 [ 219.322784] r4:e7efbec0 [ 219.325775] [] (video_ioctl2 [videodev]) from [] (v4l2_ioctl+0x50/0x64 [videodev]) [ 219.335845] [] (v4l2_ioctl [videodev]) from [] (vfs_ioctl+0x30/0x44) [ 219.344482] r7:00000000 r6:e7efbec0 r5:bee658f4 r4:c0145608 [ 219.350402] [] (vfs_ioctl) from [] (sys_ioctl+0xdc/0x7ec) [ 219.358062] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28) [ 219.366149] Exception stack(0xe6d7ffa8 to 0xe6d7fff0) [ 219.371673] ffa0: 00000000 bee65c1a 00000003 c0145608 bee658f4 00000001 [ 219.380157] ffc0: 00000000 bee65c1a 00000000 00000036 000009a0 00000000 0000ef30 010eb400 [ 219.388885] ffe0: 0001716c bee65104 0000b588 b6e413ac [ 219.394409] r10:00000036 r9:e6d7e000 r8:c0100244 r7:00000036 r6:00000000 r5:bee65c1a [ 219.402740] r4:00000000 [ 219.405426] irq event stamp: 5075 [ 219.408905] hardirqs last enabled at (5083): [] console_unlock+0x4cc/0x524 [ 219.417297] hardirqs last disabled at (5092): [] console_unlock+0x3c8/0x524 [ 219.425628] softirqs last enabled at (4532): [] __do_softirq+0x1f0/0x490 [ 219.433837] softirqs last disabled at (4493): [] irq_exit+0xe4/0x160 [ 219.441558] ---[ end trace 8c56810633cf24db ]--- [ 219.446502] omap3isp 480bc000.isp: dma_alloc_coherent of size 17743872 failed -----------------8<--------------------------- -- Kind regards, Sakari Ailus _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AC61EC433DF for ; Thu, 20 Aug 2020 16:56:23 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AB3D2072D for ; Thu, 20 Aug 2020 16:56:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="PaWGOKQT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AB3D2072D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=tHpux8iTbUbcrWbxHVm4vAlBjDkVbG+WPwzzV9vDfq8=; b=PaWGOKQTLrB9cJBV1GvQQgxG9 l1z7EKo0dV3vMhQFQh6MEtzlUgk3HCDfWMJaY/Ojem0/Mxbf5evU7Ar8Qyu3Dx/QmLwelO/kabKLn 8lQsWR7RqwdfWN2Oqj44jMR/YnUWMGzkMrnX37K63285toiMER0s6U0Vyp27nDeL0Vh+VCw8y6OnY lfnIJcEXaeypDZ5YqO5d7wQ8/mskv+3vVRq/D+PIQK2Bh+1onJ4lnsqQUjIeqMCTLiXITAZKb7WTR tkws7VEML6UGZ+fjoexIAK+UOkt/uwHAsV3YYjj+Fl7Tw2H2OrUfxvPwLurNL5f4Zivbprr6PrrjG s7gEgZxbA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8nq8-00036c-Bl; Thu, 20 Aug 2020 16:55:00 +0000 Received: from retiisi.org.uk ([95.216.213.190] helo=hillosipuli.retiisi.org.uk) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k8nq4-000344-RG; Thu, 20 Aug 2020 16:54:58 +0000 Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id E79D7634C87; Thu, 20 Aug 2020 19:53:39 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1k8nop-0002qv-OM; Thu, 20 Aug 2020 19:53:39 +0300 Date: Thu, 20 Aug 2020 19:53:39 +0300 From: Sakari Ailus To: Robin Murphy Subject: Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround Message-ID: <20200820165339.GK7145@valkosipuli.retiisi.org.uk> References: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200820_125457_193045_6154A926 X-CRM114-Status: GOOD ( 13.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: geert+renesas@glider.be, dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org, linux-tegra@vger.kernel.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, digetx@gmail.com, will@kernel.org, hch@lst.de, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, joro@8bytes.org, magnus.damm@gmail.com, linux@armlinux.org.uk, jonathanh@nvidia.com, agross@kernel.org, yong.wu@mediatek.com, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, inki.dae@samsung.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, sw0312.kim@samsung.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, t-kristo@ti.com, kyungmin.park@samsung.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: > Now that arch/arm is wired up for default domains and iommu-dma, devices > behind IOMMUs will get mappings set up automatically as appropriate, so > there is no need for drivers to do so manually. > > Signed-off-by: Robin Murphy Thanks for the patch. I haven't looked at the details but it seems that this causes the buffer memory allocation to be physically contiguous, which causes a failure to allocate video buffers of entirely normal size. I guess that was not intentional? -----------------8<--------------------------- [ 218.934448] WARNING: CPU: 0 PID: 1994 at mm/page_alloc.c:4859 __alloc_pages_nodemask+0x9c/0xb1c [ 218.943847] Modules linked in: omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common leds_as3645a smiapp v4l2_flash_led_class led_class_flash v4l2_fwnode smiapp_pll videodev leds_gpio mc led_class [ 218.964660] CPU: 0 PID: 1994 Comm: yavta Not tainted 5.9.0-rc1-dirty #1818 [ 218.972442] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 218.978973] Backtrace: [ 218.981842] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 218.989715] r7:00000000 r6:00000009 r5:c08f03bc r4:c08f2fef [ 218.995880] [] (show_stack) from [] (dump_stack+0x28/0x30) [ 219.003631] [] (dump_stack) from [] (__warn+0x100/0x118) [ 219.010955] r5:c08f03bc r4:00000000 [ 219.014953] [] (__warn) from [] (warn_slowpath_fmt+0x84/0xa8) [ 219.022949] r9:c0232090 r8:c08f03bc r7:c0b08a88 r6:00000009 r5:000012fb r4:00000000 [ 219.031036] [] (warn_slowpath_fmt) from [] (__alloc_pages_nodemask+0x9c/0xb1c) [ 219.040557] r9:c0185c3c r8:00000000 r7:010ec000 r6:00000000 r5:0000000d r4:00000000 [ 219.048858] [] (__alloc_pages_nodemask) from [] (__dma_alloc_buffer.constprop.14+0x3c/0x90) [ 219.059570] r10:00000cc0 r9:c0185c3c r8:00000000 r7:010ec000 r6:0000000d r5:c0b08a88 [ 219.067901] r4:00000cc0 [ 219.070587] [] (__dma_alloc_buffer.constprop.14) from [] (remap_allocator_alloc+0x34/0x7c) [ 219.081207] r9:c0185c3c r8:00000247 r7:e6d7fb84 r6:010ec000 r5:c0b08a88 r4:00000001 [ 219.089263] [] (remap_allocator_alloc) from [] (__dma_alloc+0x124/0x21c) [ 219.098236] r9:ed99fc10 r8:e69aa890 r7:00000000 r6:ffffffff r5:c0b08a88 r4:e6fdd680 [ 219.106536] [] (__dma_alloc) from [] (arm_dma_alloc+0x68/0x74) [ 219.114654] r10:00000cc0 r9:c0185c3c r8:00000cc0 r7:e69aa890 r6:010ec000 r5:ed99fc10 [ 219.122985] r4:00000000 [ 219.125671] [] (arm_dma_alloc) from [] (dma_alloc_attrs+0xe4/0x120) [ 219.134216] r9:00000000 r8:e69aa890 r7:010ec000 r6:c0b08a88 r5:ed99fc10 r4:c010f634 [ 219.142517] [] (dma_alloc_attrs) from [] (vb2_dc_alloc+0xcc/0x108 [videobuf2_dma_contig]) [ 219.153076] r10:e6885ca8 r9:e6abfc48 r8:00000002 r7:00000000 r6:010ec000 r5:ed99fc10 [ 219.161407] r4:e69aa880 [ 219.164184] [] (vb2_dc_alloc [videobuf2_dma_contig]) from [] (__vb2_queue_alloc+0x258/0x4a4 [videobuf2_common]) [ 219.176696] r8:bf095b70 r7:010ec000 r6:00000000 r5:e6885ca8 r4:e6abfc00 [ 219.183959] [] (__vb2_queue_alloc [videobuf2_common]) from [] (vb2_core_reqbufs+0x408/0x498 [videobuf2_common]) [ 219.196533] r10:e6885ce8 r9:00000000 r8:e6d7fe24 r7:e6d7fcec r6:bf09ced4 r5:bf088580 [ 219.204895] r4:e6885ca8 [ 219.207672] [] (vb2_core_reqbufs [videobuf2_common]) from [] (vb2_reqbufs+0x64/0x70 [videobuf2_v4l2]) [ 219.219268] r10:00000000 r9:bf032bc0 r8:c0145608 r7:bf0ad4a4 r6:e6885ca8 r5:00000000 [ 219.227600] r4:e6d7fe24 [ 219.230499] [] (vb2_reqbufs [videobuf2_v4l2]) from [] (isp_video_reqbufs+0x40/0x54 [omap3_isp]) [ 219.241607] r7:bf0ad4a4 r6:e6d7fe24 r5:e6885c00 r4:e6cca928 [ 219.247924] [] (isp_video_reqbufs [omap3_isp]) from [] (v4l_reqbufs+0x4c/0x50 [videodev]) [ 219.258514] r7:bf0ad4a4 r6:e6885c00 r5:e6d7fe24 r4:e7efbec0 [ 219.264984] [] (v4l_reqbufs [videodev]) from [] (__video_do_ioctl+0x2d8/0x414 [videodev]) [ 219.275512] r7:bf01de00 r6:00000000 r5:00000000 r4:e6cca2e0 [ 219.281982] [] (__video_do_ioctl [videodev]) from [] (video_usercopy+0x144/0x508 [videodev]) [ 219.292816] r10:e7efbec0 r9:c0145608 r8:e6d7fe24 r7:00000000 r6:00000000 r5:bf01ebdc [ 219.300933] r4:c0145608 [ 219.304168] [] (video_usercopy [videodev]) from [] (video_ioctl2+0x1c/0x24 [videodev]) [ 219.314453] r10:e7fbfda0 r9:e7efbec0 r8:00000003 r7:00000000 r6:bee658f4 r5:c0145608 [ 219.322784] r4:e7efbec0 [ 219.325775] [] (video_ioctl2 [videodev]) from [] (v4l2_ioctl+0x50/0x64 [videodev]) [ 219.335845] [] (v4l2_ioctl [videodev]) from [] (vfs_ioctl+0x30/0x44) [ 219.344482] r7:00000000 r6:e7efbec0 r5:bee658f4 r4:c0145608 [ 219.350402] [] (vfs_ioctl) from [] (sys_ioctl+0xdc/0x7ec) [ 219.358062] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28) [ 219.366149] Exception stack(0xe6d7ffa8 to 0xe6d7fff0) [ 219.371673] ffa0: 00000000 bee65c1a 00000003 c0145608 bee658f4 00000001 [ 219.380157] ffc0: 00000000 bee65c1a 00000000 00000036 000009a0 00000000 0000ef30 010eb400 [ 219.388885] ffe0: 0001716c bee65104 0000b588 b6e413ac [ 219.394409] r10:00000036 r9:e6d7e000 r8:c0100244 r7:00000036 r6:00000000 r5:bee65c1a [ 219.402740] r4:00000000 [ 219.405426] irq event stamp: 5075 [ 219.408905] hardirqs last enabled at (5083): [] console_unlock+0x4cc/0x524 [ 219.417297] hardirqs last disabled at (5092): [] console_unlock+0x3c8/0x524 [ 219.425628] softirqs last enabled at (4532): [] __do_softirq+0x1f0/0x490 [ 219.433837] softirqs last disabled at (4493): [] irq_exit+0xe4/0x160 [ 219.441558] ---[ end trace 8c56810633cf24db ]--- [ 219.446502] omap3isp 480bc000.isp: dma_alloc_coherent of size 17743872 failed -----------------8<--------------------------- -- Kind regards, Sakari Ailus _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4893C433DF for ; Thu, 20 Aug 2020 17:03:38 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9B44E208A9 for ; Thu, 20 Aug 2020 17:03:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9B44E208A9 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AF8736E98F; Thu, 20 Aug 2020 17:03:37 +0000 (UTC) X-Greylist: delayed 521 seconds by postgrey-1.36 at gabe; Thu, 20 Aug 2020 17:03:35 UTC Received: from hillosipuli.retiisi.org.uk (hillosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::81:2]) by gabe.freedesktop.org (Postfix) with ESMTPS id 01ADA6E98F for ; Thu, 20 Aug 2020 17:03:35 +0000 (UTC) Received: from valkosipuli.localdomain (valkosipuli.retiisi.org.uk [IPv6:2a01:4f9:c010:4572::80:2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hillosipuli.retiisi.org.uk (Postfix) with ESMTPS id E79D7634C87; Thu, 20 Aug 2020 19:53:39 +0300 (EEST) Received: from sailus by valkosipuli.localdomain with local (Exim 4.92) (envelope-from ) id 1k8nop-0002qv-OM; Thu, 20 Aug 2020 19:53:39 +0300 Date: Thu, 20 Aug 2020 19:53:39 +0300 From: Sakari Ailus To: Robin Murphy Subject: Re: [PATCH 17/18] media/omap3isp: Clean up IOMMU workaround Message-ID: <20200820165339.GK7145@valkosipuli.retiisi.org.uk> References: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <11d8419744e4e744a9448180801b0c4683328afd.1597931876.git.robin.murphy@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: geert+renesas@glider.be, dri-devel@lists.freedesktop.org, bjorn.andersson@linaro.org, linux-tegra@vger.kernel.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, digetx@gmail.com, s-anna@ti.com, will@kernel.org, hch@lst.de, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, joro@8bytes.org, magnus.damm@gmail.com, linux@armlinux.org.uk, jonathanh@nvidia.com, agross@kernel.org, yong.wu@mediatek.com, linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org, vdumpa@nvidia.com, linux-mediatek@lists.infradead.org, matthias.bgg@gmail.com, linux-arm-kernel@lists.infradead.org, sw0312.kim@samsung.com, iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, t-kristo@ti.com, kyungmin.park@samsung.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Robin, On Thu, Aug 20, 2020 at 04:08:36PM +0100, Robin Murphy wrote: > Now that arch/arm is wired up for default domains and iommu-dma, devices > behind IOMMUs will get mappings set up automatically as appropriate, so > there is no need for drivers to do so manually. > > Signed-off-by: Robin Murphy Thanks for the patch. I haven't looked at the details but it seems that this causes the buffer memory allocation to be physically contiguous, which causes a failure to allocate video buffers of entirely normal size. I guess that was not intentional? -----------------8<--------------------------- [ 218.934448] WARNING: CPU: 0 PID: 1994 at mm/page_alloc.c:4859 __alloc_pages_nodemask+0x9c/0xb1c [ 218.943847] Modules linked in: omap3_isp videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common leds_as3645a smiapp v4l2_flash_led_class led_class_flash v4l2_fwnode smiapp_pll videodev leds_gpio mc led_class [ 218.964660] CPU: 0 PID: 1994 Comm: yavta Not tainted 5.9.0-rc1-dirty #1818 [ 218.972442] Hardware name: Generic OMAP36xx (Flattened Device Tree) [ 218.978973] Backtrace: [ 218.981842] [] (dump_backtrace) from [] (show_stack+0x20/0x24) [ 218.989715] r7:00000000 r6:00000009 r5:c08f03bc r4:c08f2fef [ 218.995880] [] (show_stack) from [] (dump_stack+0x28/0x30) [ 219.003631] [] (dump_stack) from [] (__warn+0x100/0x118) [ 219.010955] r5:c08f03bc r4:00000000 [ 219.014953] [] (__warn) from [] (warn_slowpath_fmt+0x84/0xa8) [ 219.022949] r9:c0232090 r8:c08f03bc r7:c0b08a88 r6:00000009 r5:000012fb r4:00000000 [ 219.031036] [] (warn_slowpath_fmt) from [] (__alloc_pages_nodemask+0x9c/0xb1c) [ 219.040557] r9:c0185c3c r8:00000000 r7:010ec000 r6:00000000 r5:0000000d r4:00000000 [ 219.048858] [] (__alloc_pages_nodemask) from [] (__dma_alloc_buffer.constprop.14+0x3c/0x90) [ 219.059570] r10:00000cc0 r9:c0185c3c r8:00000000 r7:010ec000 r6:0000000d r5:c0b08a88 [ 219.067901] r4:00000cc0 [ 219.070587] [] (__dma_alloc_buffer.constprop.14) from [] (remap_allocator_alloc+0x34/0x7c) [ 219.081207] r9:c0185c3c r8:00000247 r7:e6d7fb84 r6:010ec000 r5:c0b08a88 r4:00000001 [ 219.089263] [] (remap_allocator_alloc) from [] (__dma_alloc+0x124/0x21c) [ 219.098236] r9:ed99fc10 r8:e69aa890 r7:00000000 r6:ffffffff r5:c0b08a88 r4:e6fdd680 [ 219.106536] [] (__dma_alloc) from [] (arm_dma_alloc+0x68/0x74) [ 219.114654] r10:00000cc0 r9:c0185c3c r8:00000cc0 r7:e69aa890 r6:010ec000 r5:ed99fc10 [ 219.122985] r4:00000000 [ 219.125671] [] (arm_dma_alloc) from [] (dma_alloc_attrs+0xe4/0x120) [ 219.134216] r9:00000000 r8:e69aa890 r7:010ec000 r6:c0b08a88 r5:ed99fc10 r4:c010f634 [ 219.142517] [] (dma_alloc_attrs) from [] (vb2_dc_alloc+0xcc/0x108 [videobuf2_dma_contig]) [ 219.153076] r10:e6885ca8 r9:e6abfc48 r8:00000002 r7:00000000 r6:010ec000 r5:ed99fc10 [ 219.161407] r4:e69aa880 [ 219.164184] [] (vb2_dc_alloc [videobuf2_dma_contig]) from [] (__vb2_queue_alloc+0x258/0x4a4 [videobuf2_common]) [ 219.176696] r8:bf095b70 r7:010ec000 r6:00000000 r5:e6885ca8 r4:e6abfc00 [ 219.183959] [] (__vb2_queue_alloc [videobuf2_common]) from [] (vb2_core_reqbufs+0x408/0x498 [videobuf2_common]) [ 219.196533] r10:e6885ce8 r9:00000000 r8:e6d7fe24 r7:e6d7fcec r6:bf09ced4 r5:bf088580 [ 219.204895] r4:e6885ca8 [ 219.207672] [] (vb2_core_reqbufs [videobuf2_common]) from [] (vb2_reqbufs+0x64/0x70 [videobuf2_v4l2]) [ 219.219268] r10:00000000 r9:bf032bc0 r8:c0145608 r7:bf0ad4a4 r6:e6885ca8 r5:00000000 [ 219.227600] r4:e6d7fe24 [ 219.230499] [] (vb2_reqbufs [videobuf2_v4l2]) from [] (isp_video_reqbufs+0x40/0x54 [omap3_isp]) [ 219.241607] r7:bf0ad4a4 r6:e6d7fe24 r5:e6885c00 r4:e6cca928 [ 219.247924] [] (isp_video_reqbufs [omap3_isp]) from [] (v4l_reqbufs+0x4c/0x50 [videodev]) [ 219.258514] r7:bf0ad4a4 r6:e6885c00 r5:e6d7fe24 r4:e7efbec0 [ 219.264984] [] (v4l_reqbufs [videodev]) from [] (__video_do_ioctl+0x2d8/0x414 [videodev]) [ 219.275512] r7:bf01de00 r6:00000000 r5:00000000 r4:e6cca2e0 [ 219.281982] [] (__video_do_ioctl [videodev]) from [] (video_usercopy+0x144/0x508 [videodev]) [ 219.292816] r10:e7efbec0 r9:c0145608 r8:e6d7fe24 r7:00000000 r6:00000000 r5:bf01ebdc [ 219.300933] r4:c0145608 [ 219.304168] [] (video_usercopy [videodev]) from [] (video_ioctl2+0x1c/0x24 [videodev]) [ 219.314453] r10:e7fbfda0 r9:e7efbec0 r8:00000003 r7:00000000 r6:bee658f4 r5:c0145608 [ 219.322784] r4:e7efbec0 [ 219.325775] [] (video_ioctl2 [videodev]) from [] (v4l2_ioctl+0x50/0x64 [videodev]) [ 219.335845] [] (v4l2_ioctl [videodev]) from [] (vfs_ioctl+0x30/0x44) [ 219.344482] r7:00000000 r6:e7efbec0 r5:bee658f4 r4:c0145608 [ 219.350402] [] (vfs_ioctl) from [] (sys_ioctl+0xdc/0x7ec) [ 219.358062] [] (sys_ioctl) from [] (ret_fast_syscall+0x0/0x28) [ 219.366149] Exception stack(0xe6d7ffa8 to 0xe6d7fff0) [ 219.371673] ffa0: 00000000 bee65c1a 00000003 c0145608 bee658f4 00000001 [ 219.380157] ffc0: 00000000 bee65c1a 00000000 00000036 000009a0 00000000 0000ef30 010eb400 [ 219.388885] ffe0: 0001716c bee65104 0000b588 b6e413ac [ 219.394409] r10:00000036 r9:e6d7e000 r8:c0100244 r7:00000036 r6:00000000 r5:bee65c1a [ 219.402740] r4:00000000 [ 219.405426] irq event stamp: 5075 [ 219.408905] hardirqs last enabled at (5083): [] console_unlock+0x4cc/0x524 [ 219.417297] hardirqs last disabled at (5092): [] console_unlock+0x3c8/0x524 [ 219.425628] softirqs last enabled at (4532): [] __do_softirq+0x1f0/0x490 [ 219.433837] softirqs last disabled at (4493): [] irq_exit+0xe4/0x160 [ 219.441558] ---[ end trace 8c56810633cf24db ]--- [ 219.446502] omap3isp 480bc000.isp: dma_alloc_coherent of size 17743872 failed -----------------8<--------------------------- -- Kind regards, Sakari Ailus _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel