mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 04:38:03 +00:00
34cda5ab89
Commit2fd001cd36
("arch: Rename fbdev header and source files") renames the video source files under arch/ such that they do not refer to fbdev any longer. The new files named video.o conflict with ACPI's video.ko module. Modprobing the ACPI module can then fail with warnings about missing symbols, as shown below. (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol acpi_video_unregister (err -2) (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol acpi_video_register_backlight (err -2) (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol __acpi_video_get_backlight_type (err -2) (i915_selftest:1107) igt_kmod-WARNING: i915: Unknown symbol acpi_video_register (err -2) Fix the issue by renaming the architecture's video.o to video-common.o. Reported-by: Chaitanya Kumar Borah <chaitanya.kumar.borah@intel.com> Closes: https://lore.kernel.org/intel-gfx/9dcac6e9-a3bf-4ace-bbdc-f697f767f9e0@suse.de/T/#t Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Fixes:2fd001cd36
("arch: Rename fbdev header and source files") Reviewed-by: Hans de Goede <hdegoede@redhat.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: linux-arch@vger.kernel.org Cc: linux-fbdev@vger.kernel.org Cc: dri-devel@lists.freedesktop.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
42 lines
906 B
C
42 lines
906 B
C
/*
|
|
* Copyright (C) 2007 Antonino Daplas <adaplas@gmail.com>
|
|
*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file COPYING in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
*/
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/pci.h>
|
|
#include <linux/vgaarb.h>
|
|
|
|
#include <asm/video.h>
|
|
|
|
pgprot_t pgprot_framebuffer(pgprot_t prot,
|
|
unsigned long vm_start, unsigned long vm_end,
|
|
unsigned long offset)
|
|
{
|
|
pgprot_val(prot) &= ~_PAGE_CACHE_MASK;
|
|
if (boot_cpu_data.x86 > 3)
|
|
pgprot_val(prot) |= cachemode2protval(_PAGE_CACHE_MODE_UC_MINUS);
|
|
|
|
return prot;
|
|
}
|
|
EXPORT_SYMBOL(pgprot_framebuffer);
|
|
|
|
bool video_is_primary_device(struct device *dev)
|
|
{
|
|
struct pci_dev *pdev;
|
|
|
|
if (!dev_is_pci(dev))
|
|
return false;
|
|
|
|
pdev = to_pci_dev(dev);
|
|
|
|
return (pdev == vga_default_device());
|
|
}
|
|
EXPORT_SYMBOL(video_is_primary_device);
|
|
|
|
MODULE_LICENSE("GPL");
|