Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B1B83C83F1A for ; Sun, 20 Jul 2025 06:05:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 141DD10E147; Sun, 20 Jul 2025 06:05:28 +0000 (UTC) Received: from bmailout2.hostsharing.net (bmailout2.hostsharing.net [83.223.78.240]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3221310E147 for ; Sun, 20 Jul 2025 06:05:27 +0000 (UTC) Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout2.hostsharing.net (Postfix) with ESMTPS id 27A9320091AE; Sun, 20 Jul 2025 08:05:25 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 11943CC674; Sun, 20 Jul 2025 08:05:25 +0200 (CEST) Date: Sun, 20 Jul 2025 08:05:25 +0200 From: Lukas Wunner To: Mario Limonciello Cc: Bjorn Helgaas , David Airlie , Alex Deucher , Christian =?iso-8859-1?Q?K=F6nig?= , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon , Robin Murphy , Alex Williamson , Jaroslav Kysela , Takashi Iwai , "open list:DRM DRIVERS" , open list , "open list:INTEL IOMMU (VT-d)" , "open list:PCI SUBSYSTEM" , "open list:VFIO DRIVER" , "open list:SOUND" , Daniel Dadap Subject: Re: [PATCH v9 9/9] PCI: Add a new 'boot_display' attribute Message-ID: References: <20250718173648.GA2704349@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, Jul 18, 2025 at 12:44:11PM -0500, Mario Limonciello wrote: > On 7/18/2025 12:36 PM, Bjorn Helgaas wrote: > > On Fri, Jul 18, 2025 at 12:29:05PM -0500, Mario Limonciello wrote: > > > On 7/18/2025 12:25 PM, Bjorn Helgaas wrote: > > > > In addition to Mani's question about whether /sys/bus/pci/ is the > > > > right place for this (which is a very good question), it's also been > > > > pointed out to me that we've been trying to get rid of > > > > pci_create_sysfs_dev_files() for years. > > > > > > > > If it's possible to make this a static attribute that would be much, > > > > much cleaner. > > > > > > Right - I tried to do this, but the problem is at the time the PCI device is > > > created the information needed to make the judgement isn't ready. The > > > options end up being: > > > * a sysfs file for every display device with 0/1 > > > * a sysfs file that is not accurate until later in the boot > > > > What's missing? The specifics might be helpful if someone has another > > crack at getting rid of pci_create_sysfs_dev_files() in the future. > > The underlying SCREEN_INFO code tries to walk through all the PCI devices in > a loop, but at the time all the devices are walked the memory regions > associated with the device weren't populated. > > So my earlier hack was to re-run the screen info check, and it was awful. Well have you explored the sysfs_update_group() approach you mentioned earlier? https://lore.kernel.org/r/5cc01163-1feb-4a18-8060-27f4da39b2e4@kernel.org/ Thanks, Lukas