From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4B72FEB64DD for ; Wed, 5 Jul 2023 08:03:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:References :In-Reply-To:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DmFkEyd2pMet/bV9rIz9CJSynq0Ih59VS2rnrDtdvNc=; b=FOeh7ULY1jG3dZ iBU0yLjL60Fc7K25LCJ7C7V2ui+hwpOQ3TO1F8DlNQ6u/vs/CDy21tzFPSBS5pxusFNsTfWciGd9m jOA0skrwMB4tXp0Lw0wC5q3gIb+Lw7NicH+D/yBRS5pxdJ05ahygSi7bYf07+OMoVZyZawpZ6TJw7 /Wh+D0xBpWot2kLcEsfn9o/wEE50lNaoup6qjzpdsZqxx0JPZsgJixb0FF+fEUT6T65oUm/iTjFZF 3Gb2s5bQazkmeDpKsy1NF0LoZH3ItcrtRupWBB/BZlFxybyNjnHVD8VzIbTdZt2yK1YMAIN0MVLZQ QetCjjyXmm307eNdofig==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qGxTB-00F8Iq-0q; Wed, 05 Jul 2023 08:02:37 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qGxT8-00F8H5-0E for linux-arm-kernel@lists.infradead.org; Wed, 05 Jul 2023 08:02:35 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688544151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=XDgcQtPSCk85F9YjOuVpAuyCl327gSG/7+9nyPHiobU=; b=HVNH53ZDOszA2ZQz3FXyXsIdeqgezqU0uNVYe9yOyAHL6wluM2dvAM16LhKgyJWDFGOQmn tb2JRp6RWWHzNzPXI9PkC+ELtVg840KchYLERyVasoxVVEy+OMxCArJ6ecJOa0Aa21JF+6 cOz8UIM1odQz1gioutujRaqMF28O6Tc= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-645-S8CVLvEZMwG43hCEWPhzkg-1; Wed, 05 Jul 2023 04:02:30 -0400 X-MC-Unique: S8CVLvEZMwG43hCEWPhzkg-1 Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3f5df65fa35so37826835e9.3 for ; Wed, 05 Jul 2023 01:02:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688544149; x=1691136149; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=XDgcQtPSCk85F9YjOuVpAuyCl327gSG/7+9nyPHiobU=; b=jNd9i8bGIiQE4phYmunJW9RKz6U0VZXeSoOz2YSWHsyLgTHM5shKJLn5u8fOpGdz8M C07BqZBuaLtzdnkC5zIMOZ36y9sR7gWKZsvFqFq//Tqm68pTLGrChhGL+P/nMVwoWAQP N1sCJSlEtdCUSoVFh9lBrHC4DAFzagvTMvlZJe7zq+DUB0i7WypEqCm9WoXXM72fspCq IhOhbWuTWjzrvKza6dSfUQqYZdxUzc0pVy3ZEHTjBMbzbPSsBI1OVJGCHv4gYP+Rbv4o mY1aFYu3qOUSsHfIg04NktdMDHTQzatJlUPjpXdZr6bXla3ax4UMniZ66URUWzIFxkCB wKLQ== X-Gm-Message-State: AC+VfDzALnUhcHN+aSb1oTp3cAaqPmDCnVv0XlyIan2hOcNmwjfmqUx8 plKT5qYMZ8qLhMARrb6IIDFKWt1KugGODs7kZLj323ME8mvRl5YMmpPSJHcDc27XqHhiq1vRwrg v8lR6+ZDKmiPK6O5KO/WWMojqXH+g4EdMGkc= X-Received: by 2002:a05:600c:b54:b0:3f5:ffe3:46a7 with SMTP id k20-20020a05600c0b5400b003f5ffe346a7mr12254776wmr.9.1688544149339; Wed, 05 Jul 2023 01:02:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4vylDlXvfuU9EWjWb12pZMcRCpkOIK+1WjIMZRSIYzVmT0WCKJ1Gd1jMG8KQnYrrWHnxleng== X-Received: by 2002:a05:600c:b54:b0:3f5:ffe3:46a7 with SMTP id k20-20020a05600c0b5400b003f5ffe346a7mr12254706wmr.9.1688544148234; Wed, 05 Jul 2023 01:02:28 -0700 (PDT) Received: from localhost (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id x8-20020a5d4908000000b0031432c2fb95sm8956824wrq.88.2023.07.05.01.02.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jul 2023 01:02:27 -0700 (PDT) From: Javier Martinez Canillas To: Thomas Zimmermann , arnd@arndb.de, deller@gmx.de, daniel@ffwll.ch, airlied@gmail.com Cc: linux-hyperv@vger.kernel.org, linux-efi@vger.kernel.org, linux-ia64@vger.kernel.org, linux-sh@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-mips@vger.kernel.org, sparclinux@vger.kernel.org, linux-riscv@lists.infradead.org, linux-arch@vger.kernel.org, linux-hexagon@vger.kernel.org, linux-staging@lists.linux.dev, linux-csky@vger.kernel.org, Antonino Daplas , Maik Broemme , loongarch@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Randy Dunlap , linux-kernel@vger.kernel.org, Thomas Zimmermann , linux-alpha@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH 10/12] fbdev/core: Use fb_is_primary_device() in fb_firmware_edid() In-Reply-To: <20230629121952.10559-11-tzimmermann@suse.de> References: <20230629121952.10559-1-tzimmermann@suse.de> <20230629121952.10559-11-tzimmermann@suse.de> Date: Wed, 05 Jul 2023 10:02:27 +0200 Message-ID: <878rbuss4s.fsf@minerva.mail-host-address-is-not-set> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230705_010234_205384_8CDF0744 X-CRM114-Status: GOOD ( 14.47 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Thomas Zimmermann writes: > Detect the primary VGA device with fb_is_primary_device() in the > implementation of fb_firmware_edid(). Remove the existing code. > An explanation about why this is possible would be useful here. > Adapt the function to receive an instance of struct fb_info and > update all callers. > [...] > -const unsigned char *fb_firmware_edid(struct device *device) > +const unsigned char *fb_firmware_edid(struct fb_info *info) > { > - struct pci_dev *dev = NULL; > - struct resource *res = NULL; > unsigned char *edid = NULL; > > - if (device) > - dev = to_pci_dev(device); > - > - if (dev) > - res = &dev->resource[PCI_ROM_RESOURCE]; > - > - if (res && res->flags & IORESOURCE_ROM_SHADOW) This open codes what used to be the fb_is_primary_device() logic before commit 5ca1479cd35d ("fbdev: Simplify fb_is_primary_device for x86"). But now after that commit there is functional change since the ROM shadowing check would be dropped. I believe that's OK and Sima explains in their commit message that vga_default_device() should be enough and the check is redundant. Still, I think that this change should be documented in your commit message. With that change, Reviewed-by: Javier Martinez Canillas -- Best regards, Javier Martinez Canillas Core Platforms Red Hat _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel