Re: [PATCH 10/12] fbdev/core: Use fb_is_primary_device() in fb_firmware_edid()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Thomas Zimmermann <tzimmermann@xxxxxxx>, arnd@xxxxxxxx, deller@xxxxxx, daniel@xxxxxxxx, airlied@xxxxxxxxx
- Subject: Re: [PATCH 10/12] fbdev/core: Use fb_is_primary_device() in fb_firmware_edid()
- From: Javier Martinez Canillas <javierm@xxxxxxxxxx>
- Date: Wed, 05 Jul 2023 10:02:27 +0200
- Cc: linux-hyperv@xxxxxxxxxxxxxxx, linux-efi@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-fbdev@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-staging@xxxxxxxxxxxxxxx, linux-csky@xxxxxxxxxxxxxxx, Antonino Daplas <adaplas@xxxxxxxxx>, Maik Broemme <mbroemme@xxxxxxxxxx>, loongarch@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, Randy Dunlap <rdunlap@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, Thomas Zimmermann <tzimmermann@xxxxxxx>, linux-alpha@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx
- In-reply-to: <20230629121952.10559-11-tzimmermann@suse.de>
- References: <20230629121952.10559-1-tzimmermann@suse.de> <20230629121952.10559-11-tzimmermann@suse.de>
Thomas Zimmermann <tzimmermann@xxxxxxx> 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 <javierm@xxxxxxxxxx>
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]