Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2726997rdb; Mon, 4 Dec 2023 06:06:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQ8WsiGIF2gEUsuehjetXT0G24L92qmx3E8yXXzoPH/Z4L5rHaPdZO8UaIrp6HYbHdpRgQ X-Received: by 2002:a17:902:8d8b:b0:1d0:6ffd:9e24 with SMTP id v11-20020a1709028d8b00b001d06ffd9e24mr3754584plo.118.1701698769389; Mon, 04 Dec 2023 06:06:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701698769; cv=none; d=google.com; s=arc-20160816; b=NtLAfetuOASTfSM84ZW9ialonDWjzoTlxHS0FoOaeMI33VBfhwxyDDSjbPrT4bwDCS 4z2fBzSvBlpr/F6XMAxFG+FViKsCmM9MsVjYoq/RasRvY/gJZ7iQm1YXJ5EgcnIhALcw Iz1QUpPWsxDvfA0AJCJ+L4YZwIROkesitW0tOaszwCj8G3CvnwuwLoNma2WE5A6/QRrw kqdIMLkq22yhvGaNVyDPS0CNzqPRmd13rf8gyYdrx++83ORKt0ISo04ELThHWqc+8OAH gaRYxugTlQiKlD1CYcRvHX3lcmQ05UIOZkl+IyoO2OU7NRgpAPEbAT2IrHejJJ0npGyo 47Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=MikWwilY6AlAEwPb9n44T6+u3WbTD+M+d4po/lQ5HnM=; fh=GWQV52manuVpXHVdCz2/oXTzNnB63/ydRfcrmr1LRtk=; b=VTvHs5U10ryH+sZIM8RySoPJqfS+5f+jYA83po3/8S/isLfZPkJbt5VozPiK/1zXLq NcEBE0SZq7AHNERPSK4yXFJ1fIo78FUgyg67991pR6Qgf5aF7mQ5wXTSEFFr6GgKx1/4 KIi+0DnEDhXTrfNCZAG62mmGtZBTA8dZgVzemlIULngIPEJknHFPaD/PvqBjh/wQoQSP w/Xl5fJOzE4P1I0Jf3vZT63G1HCPRX8uCFYSlU4eOdIOwfE7YilhfFA7f85LzO0D7KZp nDh6Ur7wQgH9bZQzUW6X0V44LI2E133EXqbtenyRaF4S5yWe2giyOfXQVrykbtMCngjf c3Eg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=amMSqmlL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id x12-20020a1709028ecc00b001cf677b6c20si7756411plo.594.2023.12.04.06.06.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 06:06:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=amMSqmlL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E77EA80736A3; Mon, 4 Dec 2023 06:06:04 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344963AbjLDOF1 (ORCPT + 99 others); Mon, 4 Dec 2023 09:05:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56652 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235745AbjLDOFV (ORCPT ); Mon, 4 Dec 2023 09:05:21 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83368E5 for ; Mon, 4 Dec 2023 06:05:27 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 27F92C433CD; Mon, 4 Dec 2023 14:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701698727; bh=MikWwilY6AlAEwPb9n44T6+u3WbTD+M+d4po/lQ5HnM=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=amMSqmlL1JlBBzMHA2Naxsq67iDGHlfBCYjsbioFEsOFfxOlM2DrNMd0I+MxfH33P msSS2fIf8o21zKhKOvXpH06Y86QrA0fjnnD/Xpe5Wwpc4XrvwFznpjQtbOCZkAUQV0 0kI4T/HnGzFPrNcTUbjm+UuODnTv2Vu6mD6WdSUN58fNjsqoFM6BNk6u9NGspoKAX4 UKaSkPZ2q2rDd2y/ZM9TerSzNkj9cXl0uLNTu5T0WAXP5BXgVnaLKlKFLQmjxUVtUw WbxdMpUWrEhtyEt47lrOZcWUrR4RA6x6uxtDHTfMmz1BxeZmMUCcrNWFmm+iD5Nyd8 PutoXb93DphXQ== Received: by mail-lf1-f52.google.com with SMTP id 2adb3069b0e04-50bf7bc38c0so1125501e87.2; Mon, 04 Dec 2023 06:05:27 -0800 (PST) X-Gm-Message-State: AOJu0YzjOosNaGLNrjfsymfM1VvIqiV4ieU29S9xWCIdgfD/7xnFP9XL BkHn/yDTRm7YES/5RWnt43RyP/d9DYwXDd9FCQ== X-Received: by 2002:a05:6512:2250:b0:50b:ffb3:5ca with SMTP id i16-20020a056512225000b0050bffb305camr133278lfu.116.1701698725294; Mon, 04 Dec 2023 06:05:25 -0800 (PST) MIME-Version: 1.0 References: <20231113085305.1823455-1-javierm@redhat.com> <87jzqi59bt.fsf@minerva.mail-host-address-is-not-set> <874jhj1fm3.fsf@minerva.mail-host-address-is-not-set> <58672ab8-99bf-4a2a-af79-031d1e8fcba0@suse.de> <87fs0mxlyp.fsf@minerva.mail-host-address-is-not-set> <87a5qqxq56.fsf@minerva.mail-host-address-is-not-set> In-Reply-To: <87a5qqxq56.fsf@minerva.mail-host-address-is-not-set> From: Rob Herring Date: Mon, 4 Dec 2023 08:05:12 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] of/platform: Disable sysfb if a simple-framebuffer node is found To: Javier Martinez Canillas Cc: Thomas Zimmermann , Ard Biesheuvel , devicetree@vger.kernel.org, Sergio Lopez , Sima Vetter , Hector Martin , Andrew Worsley , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Frank Rowand Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 06:06:05 -0800 (PST) On Mon, Dec 4, 2023 at 3:39=E2=80=AFAM Javier Martinez Canillas wrote: > > Rob Herring writes: > > Hello Rob, > > > On Fri, Dec 1, 2023 at 4:21=E2=80=AFAM Javier Martinez Canillas > > [...] > > >> >> I don't have a better idea than this patch but maybe Thomas or Sima= do? > >> > > >> > At SUSE, we've carried such a patch in our repos for some time. It w= orks > >> > around the double-framebuffer problem in a similar way. [1] > >> > > >> > >> Thanks for the information. I see that your patch is basically mine bu= t > >> doing it unconditionally while this one only does the sysfb_disable() = if > >> a "simple-framebuffer" DT node has been found. > >> > >> > As Javier mentioned, we do track the framebuffer ranges for EFI/VESA= /OF > >> > framebuffers in the graphics aperture helpers. Fbdev has done this f= or > >> > decades, and the current codebase extends and harmonizes this > >> > functionality among fbdev and DRM drivers. > >> > > >> > WRT DT vs EFI: AFAIK the EFI support on affected platforms looks at = the > >> > DT to set up the EFI framebuffer. So IMHO the DT is the authoritativ= e > >> > source on the framebuffer. > >> > > >> > >> Agreed. Sima Vetter also mentioned on IRC that they think this patch i= s > >> the least bad option. Rob, Ard any thoughts? Maybe we can land this as > >> a fix and then figure how this could be better handled in the long ter= m? > > > > What about moving the DT setup code here to sysfb? Then we just setup > > the right thing up front. > > > > Right now sysfb is pretty platform agnostic, in the sense that just looks > at the screen_info global struct and uses it to add the platform data tha= t > contains the firmware provided framebuffer. > > How the screen_info was filled (e.g: by the Linux EFI stub using the GOP > or the x86 early boot code using VESA) is transparent to sysfb. For this > reason adding platform specific logic there, like finding OF nodes, is no= t > desirable. > > I also suggested to Thomas to move the DT setup code to sysfb but he said > that would be the wrong approach for the reason mentioned above. Please > correct me Thomas if I'm misremembering here. > > > However, there might be one other issue with that and this fix. The DT > > simplefb can have resources such as clocks and regulators. With > > fw_devlink, the driver won't probe until those dependencies are met. > > So if you want the framebuffer console up early, then you may want to > > register the EFI framebuffer first and then handoff to the DT simplefb > > when it probes (rather than registering the device). > > > > But I agree, probably better to take this patch now and have those > > quirks instead of flat out not working. > > > > If we do that what's the plan? Are you thinking about merging this patch > through your OF tree or do you want to go through drm-misc with your ack? I can take it. Do we need this in 6.7 and stable? Rob