Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3890437ybz; Tue, 28 Apr 2020 02:07:34 -0700 (PDT) X-Google-Smtp-Source: APiQypLpWr+qq6i7Z8aXK2QxwZ345snyFwOqytG/NbsDbz76ruSjDohqGyBhCCKbzILgyKw/Onhw X-Received: by 2002:a05:6402:75a:: with SMTP id p26mr21527410edy.311.1588064854611; Tue, 28 Apr 2020 02:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588064854; cv=none; d=google.com; s=arc-20160816; b=V8yLd0eNayinFqOe4h1mV7YkqzCTwEbPyGDsLLTYGLBb49cRJFgd8P2OxAa9kVfCTc I3UDRKGtydB4EbeyQg2jVNtnukFku6P7lC93E/x+mMMHQmvutljHAw3bf7BsqWLqkzBO bDJjiOuBgSVgEeOC9mFMdk8cWhA4FSuLO2m93MoI/tVg/Y9hqjWtwq8ox31jWWCwwWMb 5WlV7e6qD6Xm0MXo+tHlVqEZGr2SfpNA8vwZq+Mn5vfaEv1SWL1xFbra9Y+JObYPy/Vu eVEurIIFRwdm0ex1WJFP2WW0zbroMiA/KXP4UrtmHPrd36OeQ9B3pHUIOB60C6qzS5nz CY2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=YUw3ZVF+ZBJcEOXX8GP2Is3+iNlLZ4yOm4NdSohEasE=; b=bpbyqtiUp+zw+uyzdHj8Iyks6IxpU9guCyA1mEdtl7Y4k0GJ8v8hL+pMVcgQhSVXs2 FhS3EocawpYzWNdec1lSnTMkrZyzmo/qJ2b/onpSS0zsQBfLtzwiY1zOd6q8N8UR1NNQ qFZ+HsFEoKsohJOH3ZmnqGVzeMIZnZJFV654EJ6rQolYWtO4EMor2WlGMqXlxCz8TqUD OmqkCmPEi8LsENkG5LEZ1puFmbE4308HS00Bi2ciwvZIvqnRrE+244ffVy1BoEpNBkUg Wrar6zTgbvdGUhjV6etxL1wgXde+fSM4vOjiS/WGeGL49oWyezIjWgYdxjPguQVqa1M6 RrnA== 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 cw10si1447814ejb.369.2020.04.28.02.07.10; Tue, 28 Apr 2020 02:07:34 -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 S1726636AbgD1JF2 (ORCPT + 99 others); Tue, 28 Apr 2020 05:05:28 -0400 Received: from foss.arm.com ([217.140.110.172]:48042 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbgD1JF2 (ORCPT ); Tue, 28 Apr 2020 05:05:28 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2F4BF30E; Tue, 28 Apr 2020 02:05:27 -0700 (PDT) Received: from [10.57.41.45] (unknown [10.57.41.45]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6399E3F305; Tue, 28 Apr 2020 02:05:25 -0700 (PDT) Subject: Re: [PATCH 2/2] arm: dts: stm32f769-disco: Enable MIPI DSI display support To: Adrian Pop , Alexandre Torgue , Lee Jones Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , Maxime Coquelin , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org References: <20200424182139.32190-1-pop.adrian61@gmail.com> <3efb57a1-283b-f2f0-66a4-97e88c6c02d6@st.com> From: Vladimir Murzin Message-ID: <81d9b932-ef2d-6d5c-9a58-2edb88e7e593@arm.com> Date: Tue, 28 Apr 2020 10:05:44 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Adrian, On 4/27/20 9:05 PM, Adrian Pop wrote: > Added lee.jones@linaro.org. > > First, thank you all for taking a look at my changes! > > Hello Alex, > > On Mon, Apr 27, 2020 at 11:28 AM Alexandre Torgue > wrote: >> >> Hi Adrian >> >> On 4/24/20 8:21 PM, Adrian Pop wrote: >>> STM32f769-disco features a 4" MIPI DSI display: add support for it. >>> >>> Signed-off-by: Adrian Pop >>> --- >> >> Commit title should be ARM: dts: stm32: ... > > Will fix in next version if that's ok. > >> >> Can you explain a bit more in your commit message why do you use a >> reserved memory pool for DMA and where this pool is located. (I assume >> it's linked to a story of DMA and cache memory attribute on cortexM7...) > > Need to look more into this, but if I remove it, /dev/fb0 is not > available anymore and I get a warning stating: > ... > [drm] Supports vblank timestamp caching Rev 2 (21.10.2013). > [drm] Initialized stm 1.0.0 20170330 for 40016800.display-controller on minor 0 > ------------[ cut here ]------------ > WARNING: CPU: 0 PID: 13 at arch/arm/mm/dma-mapping-nommu.c:50 0xc000b8ed > CPU: 0 PID: 13 Comm: kworker/0:1 Not tainted 5.6.0-next-20200412 #23 > Hardware name: STM32 (Device Tree Support) > Workqueue: events 0xc014fa35 > Function entered at [] from [] > ... > > When I looked in arch/arm/mm/dma-mapping-nommu.c:50, there is a comment stating: > > /* > * dma_alloc_from_global_coherent() may fail because: > * > * - no consistent DMA region has been defined, so we can't > * continue. > * - there is no space left in consistent DMA region, so we > * only can fallback to generic allocator if we are > * advertised that consistency is not required. > */ > > This is the reason I added the reserved-memory. > > About the location, does it need to be hardcoded? On my board > (STM32F769I-Disco, tftp boot) in boot log I get: > ... > Reserved memory: created DMA memory pool at 0xc0ef1000, size 1 MiB > OF: reserved mem: initialized node linux,dma, compatible id shared-dma-pool > ... > I'd recommend to place it at specific address, otherwise it will play badly with CONFIG_MPU=y. MPU covers only single contiguous memblock (due to limitations in number of available MPU regions), so placing DMA pool anywhere may result in split of such contiguous memblock, as effect you may see that some memory is not used. Usually, folks place DMA pool at the end of RAM. >> >> Did you try this configuration with XIP boot ? > > I did not try with XIP. Currently loading zImage from tftp to memory. > Will try with XIP as well, and get back with feedback. > Bear in mind that with CONFIG_MPU=y XIP start address need to be aligned to 1M. Cheers Vladimir