mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 12:14:10 +08:00
arch/parisc: Implement fb_is_primary_device() under arch/parisc
Move PARISC's implementation of fb_is_primary_device() into the architecture directory. This the place of the declaration and where other architectures implement this function. No functional changes. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com> Cc: Helge Deller <deller@gmx.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Helge Deller <deller@gmx.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230417125651.25126-14-tzimmermann@suse.de
This commit is contained in:
parent
d77f0ecdac
commit
cf41d18b72
@ -119,6 +119,8 @@ export LIBGCC
|
|||||||
|
|
||||||
libs-y += arch/parisc/lib/ $(LIBGCC)
|
libs-y += arch/parisc/lib/ $(LIBGCC)
|
||||||
|
|
||||||
|
drivers-y += arch/parisc/video/
|
||||||
|
|
||||||
boot := arch/parisc/boot
|
boot := arch/parisc/boot
|
||||||
|
|
||||||
PALO := $(shell if (which palo 2>&1); then : ; \
|
PALO := $(shell if (which palo 2>&1); then : ; \
|
||||||
|
@ -12,7 +12,7 @@ static inline void fb_pgprotect(struct file *file, struct vm_area_struct *vma,
|
|||||||
pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
|
pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_FB_STI)
|
#if defined(CONFIG_STI_CORE)
|
||||||
int fb_is_primary_device(struct fb_info *info);
|
int fb_is_primary_device(struct fb_info *info);
|
||||||
#else
|
#else
|
||||||
static inline int fb_is_primary_device(struct fb_info *info)
|
static inline int fb_is_primary_device(struct fb_info *info)
|
||||||
|
3
arch/parisc/video/Makefile
Normal file
3
arch/parisc/video/Makefile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
|
||||||
|
obj-$(CONFIG_STI_CORE) += fbdev.o
|
27
arch/parisc/video/fbdev.c
Normal file
27
arch/parisc/video/fbdev.c
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
|
/*
|
||||||
|
* Copyright (C) 2000 Philipp Rumpf <prumpf@tux.org>
|
||||||
|
* Copyright (C) 2001-2020 Helge Deller <deller@gmx.de>
|
||||||
|
* Copyright (C) 2001-2002 Thomas Bogendoerfer <tsbogend@alpha.franken.de>
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/module.h>
|
||||||
|
|
||||||
|
#include <asm/fb.h>
|
||||||
|
|
||||||
|
#include <video/sticore.h>
|
||||||
|
|
||||||
|
int fb_is_primary_device(struct fb_info *info)
|
||||||
|
{
|
||||||
|
struct sti_struct *sti;
|
||||||
|
|
||||||
|
sti = sti_get_rom(0);
|
||||||
|
|
||||||
|
/* if no built-in graphics card found, allow any fb driver as default */
|
||||||
|
if (!sti)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
/* return true if it's the default built-in framebuffer driver */
|
||||||
|
return (sti->info == info);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL(fb_is_primary_device);
|
@ -30,7 +30,6 @@
|
|||||||
#include <asm/pdc.h>
|
#include <asm/pdc.h>
|
||||||
#include <asm/cacheflush.h>
|
#include <asm/cacheflush.h>
|
||||||
#include <asm/grfioctl.h>
|
#include <asm/grfioctl.h>
|
||||||
#include <asm/fb.h>
|
|
||||||
|
|
||||||
#include <video/sticore.h>
|
#include <video/sticore.h>
|
||||||
|
|
||||||
@ -1148,24 +1147,6 @@ int sti_call(const struct sti_struct *sti, unsigned long func,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_FB_STI)
|
|
||||||
/* check if given fb_info is the primary device */
|
|
||||||
int fb_is_primary_device(struct fb_info *info)
|
|
||||||
{
|
|
||||||
struct sti_struct *sti;
|
|
||||||
|
|
||||||
sti = sti_get_rom(0);
|
|
||||||
|
|
||||||
/* if no built-in graphics card found, allow any fb driver as default */
|
|
||||||
if (!sti)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
/* return true if it's the default built-in framebuffer driver */
|
|
||||||
return (sti->info == info);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(fb_is_primary_device);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer");
|
MODULE_AUTHOR("Philipp Rumpf, Helge Deller, Thomas Bogendoerfer");
|
||||||
MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines");
|
MODULE_DESCRIPTION("Core STI driver for HP's NGLE series graphics cards in HP PARISC machines");
|
||||||
MODULE_LICENSE("GPL v2");
|
MODULE_LICENSE("GPL v2");
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
#ifndef STICORE_H
|
#ifndef STICORE_H
|
||||||
#define STICORE_H
|
#define STICORE_H
|
||||||
|
|
||||||
|
struct fb_info;
|
||||||
|
|
||||||
/* generic STI structures & functions */
|
/* generic STI structures & functions */
|
||||||
|
|
||||||
#define MAX_STI_ROMS 4 /* max no. of ROMs which this driver handles */
|
#define MAX_STI_ROMS 4 /* max no. of ROMs which this driver handles */
|
||||||
|
Loading…
Reference in New Issue
Block a user