Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp28711589rwd; Wed, 5 Jul 2023 01:17:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrhyJ9HQ5KnYCzEyZxSSq6pCLhvEwzyIcP4myBJk6J/Uv96PLyr6V6ozSky6idI8ofu49A X-Received: by 2002:a92:cc0d:0:b0:345:d58d:9ae6 with SMTP id s13-20020a92cc0d000000b00345d58d9ae6mr14124194ilp.9.1688545058329; Wed, 05 Jul 2023 01:17:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688545058; cv=none; d=google.com; s=arc-20160816; b=YYUDqJEo1hitF6edeiNuzwX5rrGUpGGf1yRStE3vfnpTKUsXX/Rcf3WhqUTQOyLEhi /yfCKnfoklIJLYrDIJFYH7ApQFFaViOllFM6/0sk6AcJuAA8SThSyob6ZWa5TECBTcDR rp6yEZ5PG3+cfPwRxCPJXPSd0813MKcBkuonnUaBr5LzMzma+Z3KemrfDqNw8hte0PYb SBjJybiEN4bV9M0KH8tPbzrTSMRBMvLHSgTXWOOW+O/j6YT8/AMEQH0mw4k7K6+LUEeZ dt747JoCNvzD8t6Y8e0ZZfamimv5/p1AQDySROlk5fbtGOI1fM0ML5yDzKLLU01yq3l9 Z6Xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=XDgcQtPSCk85F9YjOuVpAuyCl327gSG/7+9nyPHiobU=; fh=MPzuy+9dymYGbmu3ep/g7j3L65Ekr5HhPz6cinLKrQU=; b=s04P9ouj6PKQCgi2iDPgePecdqZoCbTtLP2Tsit9Fidr3wbLvR588dQ4y+0DFA2QK7 PUH9RlTamhAMmXN+vJh/9DA7mfBlsU8y4XsCpIyXa/oLEiUX+C7grnIH4mjs8aA3ZOyr s4K3KA0cucScbP6afYQAAF2Z6AoaeZ7Dqu04jHVi2bnmay/8AGA+1yIKtM3dDws7pl4U YUcdPFldkUDKqryIn1xcgNbljPcRYwQTyhZF+rG/2XjIousYHlARijhU1Qk8CJgWUDqp SiVOeo+ILfr90XHCEK/WcfyLtCyGGSansl9bqrULSY8b8ToNJCdetg9/JPqmJcN/UlKa mycA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=HVNH53ZD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g193-20020a636bca000000b0055acc92299esi19921989pgc.240.2023.07.05.01.17.26; Wed, 05 Jul 2023 01:17:38 -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=@redhat.com header.s=mimecast20190719 header.b=HVNH53ZD; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232108AbjGEIDe (ORCPT + 99 others); Wed, 5 Jul 2023 04:03:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbjGEIDa (ORCPT ); Wed, 5 Jul 2023 04:03:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9B1A71992 for ; Wed, 5 Jul 2023 01:02:32 -0700 (PDT) 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-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-70-qKNfMiEVNnaKq6zitYP1bA-1; Wed, 05 Jul 2023 04:02:30 -0400 X-MC-Unique: qKNfMiEVNnaKq6zitYP1bA-1 Received: by mail-wm1-f71.google.com with SMTP id 5b1f17b1804b1-3fbba70b470so37568315e9.1 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=PK8XTq7g3kQgCH26hAtR4H2KADMeLHMBwzXoX1X77y9Q1tP7QO2DH9vkgAm9XBV3nM 8DtOoaN+Eo+KyzHPrsHbE5f1xzmu17ZfUmQ3T7d77z2j6GlciXStzXS7WiCMoJVW0L8o XlxGhzCB5RkKh/EzgW2wKrnkDPva1/45yEuEzQ/hilO6BFHnFkoeqv/2m2JRkLIeDaQy 0lBG9EM0UqiJFDA4uyS54tSTgB9cg6OoaT/5lXfcZpTP37S7xtZJ9aQbqULghUmUl5q1 85nEKDV1SqOFy8uCS9UjOXTboIMA03Iv/qb0ItQdNylcuEYXeX0NV2N2vGm/4bv7RM4W RH8w== X-Gm-Message-State: AC+VfDwlaeRvKYZzOAPw5r72zpjDowwevHkFuhcltOia8Cf9IYexxr4i COse0zUzWrESNfDwffyKgowKG0835rzxqBw3qch7SlowP5gleksrZC7ZaHbb9ZxJkxZvQQEe4Nk 6Lrr8bQYDmJwH/LXWF2mA9n96 X-Received: by 2002:a05:600c:b54:b0:3f5:ffe3:46a7 with SMTP id k20-20020a05600c0b5400b003f5ffe346a7mr12254788wmr.9.1688544149399; Wed, 05 Jul 2023 01:02:29 -0700 (PDT) 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 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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