Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1387536pxa; Thu, 20 Aug 2020 09:58:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3ZKRYhPB/Y3DXrfHKXeUJfCGXvETeVOSCw8Ilhi9pvcYYSruV/skgLKZ8YkOtWTjnaV9C X-Received: by 2002:a17:906:b157:: with SMTP id bt23mr4378221ejb.354.1597942732564; Thu, 20 Aug 2020 09:58:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597942732; cv=none; d=google.com; s=arc-20160816; b=zSRKApTXJGNevkRxbh+0ONY86nWh1ohqcbHAAUYE2Wjg4gHgyhdIYokOwJ2PZv8U42 gRJh24dsnTQ0M0lH3RDpCKTvsSuKysS5oH9rQr1bB4mxXyLlsKfpq4tSA+naHPmrHFH1 WluJRMpYXfZsILxUPiKPiuLiJ41r3RVteA/gZjsh4wprxea29JcAdCbaCDEqukFuHO+J yJ3f+IKQtskKHXPNWwycsjKveyyh1sYe1gwQuTF4BF5sx5F3svlXm7H36j3xR1l2HtCU mKTGonrvUvcnTnshEz6jiFWql0mgWz7E73ycwaCTaowhXYuuk++eCN4cB8U0wuG5ePEY glRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=fsN9PGkVCHpg02W4KyxJBcI8kj2Svb8eKjLfCMd7p6U=; b=Ds69tIvslBJNsZqCyTryVH1BDqVfbpSEdB0g6pTJLr9md/47Bew5k1vWI1P9iJeLwl Jr5CRPrxzUIF2H8j7/9RsmhTWXNisp8bNbGD3vd4wBk3SPcRrD01/WGDGbpMza93KBII NK3HIQ+Nj0aH8RxL4by/QpSqKdA7Ph9HMlotxQFL35LA4DJcV2ojVmIHqZUof4FWtYvF WRjE4DiXDu0Eg0x9pCA7761JfhCmShgeJ0WuE8xNJ2lIbusISFEZ05vvRsSU7y6NtiJ7 dAh+GrPJGoNNx9SQxoE/Uyr2uOieyPlJ+685YtTYOV8ubGXOLadnECBVmOUfTxi7SNNW IOTQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r9si1620081eji.408.2020.08.20.09.58.28; Thu, 20 Aug 2020 09:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730398AbgHTQy7 (ORCPT + 99 others); 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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