Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp20753876rwd; Thu, 29 Jun 2023 06:41:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7a6tPbRFw1cjL4Up9YIiR+GQEI9BZxUUZOF2s/mu66qOKgm+XKnAjovI2cU3x7I10flz+6 X-Received: by 2002:a05:6a21:9982:b0:12b:fe14:8bc8 with SMTP id ve2-20020a056a21998200b0012bfe148bc8mr5826620pzb.7.1688046109063; Thu, 29 Jun 2023 06:41:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688046109; cv=none; d=google.com; s=arc-20160816; b=GHca1hAGtRXU0QHJBCIY3yB56B8ptOHaIjsOcN5jvxrSe1/5LjxBjmDKIAElj0FV2k yRGWDLJ00EyqlqQpHCnggSlAngQZi9SlFwfCulmCmiEl3CLinOkS8nq3IX6XrCerIFs2 Rpsy6QH+GfCkxw1Tog5gVgo2voaRWalOiFxkVZ7XbaNHoxKGFy2QT5GXereMfwNTaITQ XcuPTfYee97HylrY3PUspSJk/mlnKFOfeliJ60uIhRE980Y+tOYRh54uEd6ze2sobHf1 dnBGGniy7EI7N6lt0nhjJEYFIxiVJFAst+qUojYsqCRZdZqeH8yMTUfXu+HEdg7KYMEz oeMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=fzEp5wc1N4xfnU7pMFQwstMWnCUW1KpffY9nt8n1q0E=; fh=H2kp8YUqSpV3mmz8wxOI3VJv1vvNwxxOYapwYWQB9JI=; b=BkU7MQVsDXf5OXXZk+M9oRHkdF1Ts8mDMcO0zClG08OYjCH3y9awMnDI3i+fVgcA6m Uy72E2kjEGsUjZ00l59MucQ2qviNcdXzaF09bSsafPjCHctFNqFSs5ys+ijsRaDz4whe GnrRqeY6MDba2ReUL+1VaXPF/G8WQCRhHjr98Uskyu0ZyGisRmXfpIqGCGbtreR1aXUi DorpFG7/h2iEi4OW80KgyT/jeSyb7rkADTOvdE7QG4bgiAaPsnODgEeK1URMW3tDkLL/ U8dJV/U/jRBQjidPt7kKRYjVZ8HAu45vASjcBJJy0CeTdNz6lZ7xjcZ1GOg2wZ+pjzIZ 50yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=LcvTxzhq; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=fyh1ajjE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k64-20020a638443000000b0053f9a37c607si10696826pgd.711.2023.06.29.06.41.33; Thu, 29 Jun 2023 06:41:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b=LcvTxzhq; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=fyh1ajjE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232132AbjF2NdZ (ORCPT + 99 others); Thu, 29 Jun 2023 09:33:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232094AbjF2NdL (ORCPT ); Thu, 29 Jun 2023 09:33:11 -0400 Received: from wnew3-smtp.messagingengine.com (wnew3-smtp.messagingengine.com [64.147.123.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B835730F6; Thu, 29 Jun 2023 06:33:10 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailnew.west.internal (Postfix) with ESMTP id B1FAF2B00152; Thu, 29 Jun 2023 09:33:08 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Thu, 29 Jun 2023 09:33:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1688045588; x=1688052788; bh=fz Ep5wc1N4xfnU7pMFQwstMWnCUW1KpffY9nt8n1q0E=; b=LcvTxzhqR3NoPlUVvK OSmh2HXq0TKY72TPC0mGFyZL0KXvjsqnUtwwDauvmZMJLb5NJHO5zC7uiIPaXimT gzsidicsFWLRov6t4tFnhjdpszLK6hNyyqPfbDn62gWWs0Kof8U6fw258RVzajax TvEI9fr4nmLUhZ9eWf5cl+Gznh5JCGNWo9vfb9WqVUcXA4M4zI8VmRSOc4Rpqa2j 5ha9dObpeYiBRXh4uBF8Bo02V+0ZfPpN2oP/dF7iFMYdXyANDgvRcnqLaw0UQ7TO r1HYR4swvYxxa9cMKtxPWwjmkzaxBCii0Km30Ly6pgOJfleJm4wepJ/1GiUa/suS Y7xQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1688045588; x=1688052788; bh=fzEp5wc1N4xfn U7pMFQwstMWnCUW1KpffY9nt8n1q0E=; b=fyh1ajjE7le9b8SLHXPaGdLDEYcOx QNrQVUJ3xaaQqLGBpnORFKOR91qIZo0pC/rbPTctQCecVgWTu8aWuxe/ayiMwhSL eDIob7sa1BmbCpUowwbQwkuGz16jQSanIvdHA2EF8BgyO4NL3hh0u77vR4TeuGFE rEtOhAHeEVwheX+0G+0z5POYm6ret69YXQ+gaXS7thrMG3c0vVj9IaYGsJsEflu+ T4OjKxK0ew2/nKXrZblbKAcre4LFmDxtHNMO5w/ZzKHZCdES6wCDDurx5azbCNGj 6s0XP9I64f1KhHJXsIN9/c95TfKYzHJGQZmAuCAxQNaTiAIrzIxu8sIYA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrtdeggdeiiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdetrhhn ugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrghtth gvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedtkeet ffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrrh hnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id DA5E4B60086; Thu, 29 Jun 2023 09:33:07 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-499-gf27bbf33e2-fm-20230619.001-gf27bbf33 Mime-Version: 1.0 Message-Id: <4d711508-c299-49f2-8691-e75d68f2485e@app.fastmail.com> In-Reply-To: <20230629121952.10559-1-tzimmermann@suse.de> References: <20230629121952.10559-1-tzimmermann@suse.de> Date: Thu, 29 Jun 2023 15:31:28 +0200 From: "Arnd Bergmann" To: "Thomas Zimmermann" , "Helge Deller" , "Daniel Vetter" , "Dave Airlie" Cc: Linux-Arch , linux-hyperv@vger.kernel.org, linux-efi@vger.kernel.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, "linux-csky@vger.kernel.org" , linux-mips@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, loongarch@lists.linux.dev, linux-alpha@vger.kernel.org, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH 00/12] arch,fbdev: Move screen_info into arch/ Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 29, 2023, at 13:45, Thomas Zimmermann wrote: > The variables screen_info and edid_info provide information about > the system's screen, and possibly EDID data of the connected display. > Both are defined and set by architecture code. But both variables are > declared in non-arch header files. Dependencies are at bease loosely > tracked. To resolve this, move the global state screen_info and its > companion edid_info into arch/. Only declare them on architectures > that define them. List dependencies on the variables in the Kconfig > files. Also clean up the callers. > > Patch 1 to 4 resolve a number of unnecessary include statements of > . The header should only be included in source > files that access struct screen_info. > > Patches 5 to 7 move the declaration of screen_info and edid_info to > . Architectures that provide either set > a Kconfig token to enable them. > > Patches 8 to 9 make users of screen_info depend on the architecture's > feature. > > Finally, patches 10 to 12 rework fbdev's handling of firmware EDID > data to make use of existing helpers and the refactored edid_info. > > Tested on x86-64. Built for a variety of platforms. This all looks like a nice cleanup! > Future directions: with the patchset in place, it will become possible > to provide screen_info and edid_info only if there are users. Some > architectures do this by testing for CONFIG_VT, CONFIG_DUMMY_CONSOLE, > etc. A more uniform approach would be nice. We should also attempt > to minimize access to the global screen_info as much as possible. To > do so, some drivers, such as efifb and vesafb, would require an update. > The firmware's EDID data could possibly made available outside of fbdev. > For example, the simpledrm and ofdrm drivers could provide such data > to userspace compositors. I suspect that most architectures that provide a screen_info only have this in order to compile the framebuffer drivers, and provide hardcoded data that does not even reflect any real hardware. We can probably reduce the number of architectures that do this a lot, especially if we get EFI out of the picture. Arnd