Re: [PATCH] video/aperture: match the pci device when calling sysfb_disable()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 12, 2024 at 8:10 AM Thomas Zimmermann <tzimmermann@xxxxxxx> wrote:
>
> Hi
>
> Am 10.08.24 um 13:44 schrieb kernel test robot:
> > Hi Alex,
> >
> > kernel test robot noticed the following build errors:
> >
> > [auto build test ERROR on drm-misc/drm-misc-next]
> > [also build test ERROR on linus/master v6.11-rc2 next-20240809]
> > [If your patch is applied to the wrong git tree, kindly drop us a note.
> > And when submitting patch, we suggest to use '--base' as documented in
> > https://git-scm.com/docs/git-format-patch#_base_tree_information]
> >
> > url:    https://github.com/intel-lab-lkp/linux/commits/Alex-Deucher/video-aperture-match-the-pci-device-when-calling-sysfb_disable/20240810-021357
> > base:   git://anongit.freedesktop.org/drm/drm-misc drm-misc-next
> > patch link:    https://lore.kernel.org/r/20240809150327.2485848-1-alexander.deucher%40amd.com
> > patch subject: [PATCH] video/aperture: match the pci device when calling sysfb_disable()
> > config: csky-randconfig-001-20240810 (https://download.01.org/0day-ci/archive/20240810/202408101951.tXyqYOzv-lkp@xxxxxxxxx/config)
> > compiler: csky-linux-gcc (GCC) 14.1.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240810/202408101951.tXyqYOzv-lkp@xxxxxxxxx/reproduce)
> >
> > If you fix the issue in a separate patch/commit (i.e. not just a new version of
> > the same patch/commit), kindly add following tags
> > | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> > | Closes: https://lore.kernel.org/oe-kbuild-all/202408101951.tXyqYOzv-lkp@xxxxxxxxx/
> >
> > All errors (new ones prefixed by >>):
> >
> >     csky-linux-ld: drivers/video/aperture.o: in function `aperture_remove_conflicting_pci_devices':
> >>> aperture.c:(.text+0x222): undefined reference to `screen_info_pci_dev'
>
> Strange. There's a already placeholder [1] for architectures without
> PCI. Otherwise the source file is listed at [2].

So I dug into this, and the problem seems to be that
CONFIG_SCREEN_INFO is not defined in that config.  I can't figure out
how this should work in that case or why this is not a problem in
drivers/firmware/sysfb.c.

Something like this works:
diff --git a/drivers/video/aperture.c b/drivers/video/aperture.c
index 56a5a0bc2b1af..50e98210c9fe5 100644
--- a/drivers/video/aperture.c
+++ b/drivers/video/aperture.c
@@ -347,7 +347,9 @@ EXPORT_SYMBOL(__aperture_remove_legacy_vga_devices);
  */
 int aperture_remove_conflicting_pci_devices(struct pci_dev *pdev,
const char *name)
 {
+#if defined(CONFIG_SCREEN_INFO)
        struct screen_info *si = &screen_info;
+#endif
        bool primary = false;
        resource_size_t base, size;
        int bar, ret = 0;
@@ -355,8 +357,10 @@ int
aperture_remove_conflicting_pci_devices(struct pci_dev *pdev, const
char *na
        if (pdev == vga_default_device())
                primary = true;

+#if defined(CONFIG_SCREEN_INFO)
        if (pdev == screen_info_pci_dev(si))
                sysfb_disable();
+#endif

        for (bar = 0; bar < PCI_STD_NUM_BARS; ++bar) {
                if (!(pci_resource_flags(pdev, bar) & IORESOURCE_MEM))

But that can't be the right fix...  Any ideas?

Alex

>
> [1]
> https://elixir.bootlin.com/linux/v6.10/source/include/linux/screen_info.h#L127
> [2] https://elixir.bootlin.com/linux/v6.10/source/drivers/video/Makefile#L11
>
> Best regards
> Thomas
>
> >     csky-linux-ld: drivers/video/aperture.o: in function `devm_aperture_acquire_release':
> >>> aperture.c:(.text+0x2c0): undefined reference to `screen_info'
> >>> csky-linux-ld: aperture.c:(.text+0x2c4): undefined reference to `screen_info_pci_dev'
>
> --
> --
> Thomas Zimmermann
> Graphics Driver Developer
> SUSE Software Solutions Germany GmbH
> Frankenstrasse 146, 90461 Nuernberg, Germany
> GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
> HRB 36809 (AG Nuernberg)
>




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux