Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4928421imm; Tue, 26 Jun 2018 03:03:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLnctadMQcyWdorLQlAHv7DS3tSdWIGUpInhAOf0Bt87vrBVMgfPvEGm6v4bf7YI19BTFBh X-Received: by 2002:a65:48cd:: with SMTP id o13-v6mr740136pgs.99.1530007400071; Tue, 26 Jun 2018 03:03:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530007400; cv=none; d=google.com; s=arc-20160816; b=hWllyOSlBK6GvrYBM/Un4rt6CRPoOOH7KeTlFw1i96MqvmdpJa+SdQeB/0hWZ9zUCn udsSuNi2Xn6s6AdFtLAP2byftwtdFXBIiOTouT/We0Ua/UCqSQCthe0EcQVgO/AdMz14 vFzOa4UF+YnXIZ8q2CSEUl/m0EZT0QvXtTKEpO5jhSSdFPZ62m8fsY7JKfFVvP61fo/G yNYd15Rb0RjMu4ON6GR9NDzBVk9qbgHXsEzNpH/NC/EIpFH25KblZRkZ4QPCVkyQsl8V GsV1gQjI+q3qAnUoRgBClZLaxih/eErmpOnTFaD/4WmUDMtqWS8i9kdsSC8mmQQocfir RzhQ== 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:arc-authentication-results; bh=KqfeDWG/gckwQ4rYnfislrZ+G/R5RF0C0HjkEWC60a4=; b=GwzgI8AX4TrsYNV4WZEE6/8Ro+K0In+YrTRT3uCRpU+9dlO1+BS4kmgJiNoQzhiHF2 h9IehK1Ujp8Ah2+coJxTcendMJuTfXyl9LJ1GhjuOUjt9g7ErEs5cn9aGusdC1wktXT0 H7H4bN1d/sxn5oGxucQEGgKp7GrYMWiCCgGyB/+VHmVpV5rbFrdQcZEEABzisV5LrchN aOAtbtmTVIfhZd4BJFSggZ9LX7aWbubprrbaS/75CSPVUbRe7wZYO31L7l23vZxPz7cp /PGh536HN+ASiTEHQNcB8biHT+V6R5UFn0/4d1qxyBABV9TzIaLLoE1GbQvB0ryBkD02 bweA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z5-v6si1189364pln.347.2018.06.26.03.03.05; Tue, 26 Jun 2018 03:03:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934091AbeFZKBo (ORCPT + 99 others); Tue, 26 Jun 2018 06:01:44 -0400 Received: from mail-ed1-f66.google.com ([209.85.208.66]:44247 "EHLO mail-ed1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934028AbeFZKBi (ORCPT ); Tue, 26 Jun 2018 06:01:38 -0400 Received: by mail-ed1-f66.google.com with SMTP id c17-v6so618008eds.11 for ; Tue, 26 Jun 2018 03:01:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KqfeDWG/gckwQ4rYnfislrZ+G/R5RF0C0HjkEWC60a4=; b=g8Zjfixfrq+o2YLDe39tTvN6IlW6Fme/3zb7+/Uq88ZdYgSVJyKGG92XGoE0b5LU9R cCPBxEO1rqWtgqg1ZiYWcIApbqcD/itt5vtTEPKWG5Cd4ZMs0JTshlHzu+glXbO6CvCO iqjcBcJrXoBNrc6XiuAST6BUTrPHH/z9/2+4qq/XbJYO10I9Czdraakf9waavcuqR5X2 EcuZodnNHsj//caWVeXkZ3dq/bNEkYGOQIxCe1jrOg+JadtfqYxMpupQOyJdumwJICGs ZwIGUWclmbffYwKTT2IQw84uUT9u1D7tkVcoY9/JCmbOc1qhpM5mKcJsnMkysR7esK82 tFyw== X-Gm-Message-State: APt69E39GNm5pYlziSFVM3JhOBoGWjqQfEfwLSA7ThY8oX8up7b1eaga 0ItKBlett7iyyVa5+m15/u828NqFfm8= X-Received: by 2002:a50:cb0d:: with SMTP id g13-v6mr1175315edi.81.1530007297234; Tue, 26 Jun 2018 03:01:37 -0700 (PDT) Received: from shalem.localdomain (546A5441.cm-12-3b.dynamic.ziggo.nl. [84.106.84.65]) by smtp.gmail.com with ESMTPSA id o25-v6sm558311edr.75.2018.06.26.03.01.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 26 Jun 2018 03:01:36 -0700 (PDT) Subject: Re: simple-framebuffer enquire To: Michael Nazzareno Trimarchi Cc: Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, LKML References: From: Hans de Goede Message-ID: <9fb661e6-482b-76e0-2af0-a62a70e5606d@redhat.com> Date: Tue, 26 Jun 2018 12:01:35 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed 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, On 25-06-18 15:29, Michael Nazzareno Trimarchi wrote: > Hi Hans > > In order to let it even registered the simplefb I have added this > change. According on what I understand > from the code seems that this is the way to acquire memory with the > correct attribute > > diff --git a/drivers/video/fbdev/simplefb.c b/drivers/video/fbdev/simplefb.c > index a3c44ec..7e61ce3 100644 > --- a/drivers/video/fbdev/simplefb.c > +++ b/drivers/video/fbdev/simplefb.c > @@ -466,8 +466,8 @@ static int simplefb_probe(struct platform_device *pdev) > > info->fbops = &simplefb_ops; > info->flags = FBINFO_DEFAULT | FBINFO_MISC_FIRMWARE; > - info->screen_base = ioremap_wc(info->fix.smem_start, > - info->fix.smem_len); > + info->screen_base = arch_memremap_wb(info->fix.smem_start, > + info->fix.smem_len); I'm not sure why you need this? wb certainly is not optimal for a framebuffer, the existing wc mapping is really what you want. > if (!info->screen_base) { > ret = -ENOMEM; > goto error_fb_release; > > Another question is > > aliases { > display0 = &lcdif; > }; > > chosen { > #address-cells = <1>; > #size-cells = <1>; > ranges; > > stdout-path = &uart1; > framebuffer0: framebuffer@86fd6080 { > compatible = "simple-framebuffer"; > reg = <0x86fd6080 (480 * 272 * 4)>; > width = <480>; > height = <272>; > stride = <(480 * 4)>; > format = "a8r8g8b8"; > clocks = <&clks IMX6UL_CLK_LCDIF_PIX>, > <&clks IMX6UL_CLK_LCDIF_APB>, > <&clks IMX6UL_CLK_DUMMY>, > <&clks IMX6UL_CLK_GPIO3>, > <&clks IMX6UL_CLK_GPIO4>; > nshut-supply = <®_lcd_nshut>; > nreset-supply = <®_lcd_nreset>; This looks like GPIOS to me why are you modeling this a supplies? Anyways ... > display = <&lcdif>; > }; > }; > }; > > How do you ensure that regulators that are bind to gpios can be > maintain during boot? Any regulators listed in the simplefb dt-node will be kept enabled until remove_conflicting_framebuffers is called() from the native display driver. To keep them enabled while loading the native display driver, you should get and enable them in the native display driver *before* calling remove_conflicting_framebuffers() (and the same goes for the clocks). Regards, Hans > A small minor comment is how to automatic switch then to normal > framebuffer. Anyway seems > that > #address-cells = <1>; > #size-cells = <1>; > ranges; > > are mandatory and they are in the dts documentation. > > Best regards > Michael >