License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 22:07:57 +08:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef _INTELFB_H
|
|
|
|
#define _INTELFB_H
|
|
|
|
|
|
|
|
/* $DHD: intelfb/intelfb.h,v 1.40 2003/06/27 15:06:25 dawes Exp $ */
|
|
|
|
|
|
|
|
#include <linux/agp_backend.h>
|
|
|
|
#include <linux/fb.h>
|
|
|
|
|
2006-06-21 02:55:55 +08:00
|
|
|
#ifdef CONFIG_FB_INTEL_I2C
|
|
|
|
#include <linux/i2c.h>
|
|
|
|
#include <linux/i2c-algo-bit.h>
|
|
|
|
#endif
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/*** Version/name ***/
|
2008-10-16 13:03:35 +08:00
|
|
|
#define INTELFB_VERSION "0.9.6"
|
2005-04-17 06:20:36 +08:00
|
|
|
#define INTELFB_MODULE_NAME "intelfb"
|
2008-10-16 13:03:35 +08:00
|
|
|
#define SUPPORTED_CHIPSETS "830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/945GME/965G/965GM"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
|
|
|
|
/*** Debug/feature defines ***/
|
|
|
|
|
|
|
|
#ifndef DEBUG
|
|
|
|
#define DEBUG 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef VERBOSE
|
|
|
|
#define VERBOSE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef REGDUMP
|
|
|
|
#define REGDUMP 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef DETECT_VGA_CLASS_ONLY
|
|
|
|
#define DETECT_VGA_CLASS_ONLY 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ALLOCATE_FOR_PANNING
|
|
|
|
#define ALLOCATE_FOR_PANNING 1
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef PREFERRED_MODE
|
|
|
|
#define PREFERRED_MODE "1024x768-32@70"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/*** hw-related values ***/
|
|
|
|
|
2005-12-19 15:11:40 +08:00
|
|
|
/* Resource Allocation */
|
|
|
|
#define INTELFB_FB_ACQUIRED 1
|
|
|
|
#define INTELFB_MMIO_ACQUIRED 2
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* PCI ids for supported devices */
|
|
|
|
#define PCI_DEVICE_ID_INTEL_830M 0x3577
|
|
|
|
#define PCI_DEVICE_ID_INTEL_845G 0x2562
|
|
|
|
#define PCI_DEVICE_ID_INTEL_85XGM 0x3582
|
2009-04-14 05:40:10 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_854 0x358E
|
2005-04-17 06:20:36 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_865G 0x2572
|
|
|
|
#define PCI_DEVICE_ID_INTEL_915G 0x2582
|
2005-11-07 17:00:33 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_915GM 0x2592
|
2006-03-23 08:23:55 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_945G 0x2772
|
2006-03-23 18:53:05 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_945GM 0x27A2
|
2008-10-16 13:03:35 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_945GME 0x27AE
|
2008-04-28 17:15:43 +08:00
|
|
|
#define PCI_DEVICE_ID_INTEL_965G 0x29A2
|
|
|
|
#define PCI_DEVICE_ID_INTEL_965GM 0x2A02
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* Size of MMIO region */
|
|
|
|
#define INTEL_REG_SIZE 0x80000
|
|
|
|
|
|
|
|
#define STRIDE_ALIGNMENT 16
|
2006-05-27 16:17:52 +08:00
|
|
|
#define STRIDE_ALIGNMENT_I9XX 64
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define PALETTE_8_ENTRIES 256
|
|
|
|
|
|
|
|
|
|
|
|
/*** Macros ***/
|
|
|
|
|
|
|
|
/* basic arithmetic */
|
|
|
|
#define KB(x) ((x) * 1024)
|
|
|
|
#define MB(x) ((x) * 1024 * 1024)
|
|
|
|
#define BtoKB(x) ((x) / 1024)
|
|
|
|
#define BtoMB(x) ((x) / 1024 / 1024)
|
|
|
|
|
|
|
|
#define GTT_PAGE_SIZE KB(4)
|
|
|
|
|
|
|
|
#define ROUND_UP_TO(x, y) (((x) + (y) - 1) / (y) * (y))
|
|
|
|
#define ROUND_DOWN_TO(x, y) ((x) / (y) * (y))
|
|
|
|
#define ROUND_UP_TO_PAGE(x) ROUND_UP_TO((x), GTT_PAGE_SIZE)
|
|
|
|
#define ROUND_DOWN_TO_PAGE(x) ROUND_DOWN_TO((x), GTT_PAGE_SIZE)
|
|
|
|
|
|
|
|
/* messages */
|
|
|
|
#define PFX INTELFB_MODULE_NAME ": "
|
|
|
|
|
|
|
|
#define ERR_MSG(fmt, args...) printk(KERN_ERR PFX fmt, ## args)
|
|
|
|
#define WRN_MSG(fmt, args...) printk(KERN_WARNING PFX fmt, ## args)
|
|
|
|
#define NOT_MSG(fmt, args...) printk(KERN_NOTICE PFX fmt, ## args)
|
|
|
|
#define INF_MSG(fmt, args...) printk(KERN_INFO PFX fmt, ## args)
|
|
|
|
#if DEBUG
|
|
|
|
#define DBG_MSG(fmt, args...) printk(KERN_DEBUG PFX fmt, ## args)
|
|
|
|
#else
|
|
|
|
#define DBG_MSG(fmt, args...) while (0) printk(fmt, ## args)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* get commonly used pointers */
|
|
|
|
#define GET_DINFO(info) (info)->par
|
|
|
|
|
|
|
|
/* misc macros */
|
|
|
|
#define ACCEL(d, i) \
|
|
|
|
((d)->accel && !(d)->ring_lockup && \
|
|
|
|
((i)->var.accel_flags & FB_ACCELF_TEXT))
|
|
|
|
|
|
|
|
/*#define NOACCEL_CHIPSET(d) \
|
|
|
|
((d)->chipset != INTEL_865G)*/
|
|
|
|
#define NOACCEL_CHIPSET(d) \
|
|
|
|
(0)
|
|
|
|
|
|
|
|
#define FIXED_MODE(d) ((d)->fixed_mode)
|
|
|
|
|
2008-02-03 23:31:49 +08:00
|
|
|
/*** Driver parameters ***/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
#define RINGBUFFER_SIZE KB(64)
|
|
|
|
#define HW_CURSOR_SIZE KB(4)
|
|
|
|
|
|
|
|
/* Intel agpgart driver */
|
|
|
|
#define AGP_PHYSICAL_MEMORY 2
|
|
|
|
|
2006-06-21 02:55:55 +08:00
|
|
|
/* store information about an Ixxx DVO */
|
|
|
|
/* The i830->i865 use multiple DVOs with multiple i2cs */
|
|
|
|
/* the i915, i945 have a single sDVO i2c bus - which is different */
|
|
|
|
#define MAX_OUTPUTS 6
|
|
|
|
|
2006-06-21 02:55:55 +08:00
|
|
|
/* these are outputs from the chip - integrated only
|
|
|
|
external chips are via DVO or SDVO output */
|
|
|
|
#define INTELFB_OUTPUT_UNUSED 0
|
|
|
|
#define INTELFB_OUTPUT_ANALOG 1
|
|
|
|
#define INTELFB_OUTPUT_DVO 2
|
|
|
|
#define INTELFB_OUTPUT_SDVO 3
|
|
|
|
#define INTELFB_OUTPUT_LVDS 4
|
|
|
|
#define INTELFB_OUTPUT_TVOUT 5
|
|
|
|
|
|
|
|
#define INTELFB_DVO_CHIP_NONE 0
|
|
|
|
#define INTELFB_DVO_CHIP_LVDS 1
|
|
|
|
#define INTELFB_DVO_CHIP_TMDS 2
|
|
|
|
#define INTELFB_DVO_CHIP_TVOUT 4
|
|
|
|
|
|
|
|
#define INTELFB_OUTPUT_PIPE_NC 0
|
|
|
|
#define INTELFB_OUTPUT_PIPE_A 1
|
|
|
|
#define INTELFB_OUTPUT_PIPE_B 2
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*** Data Types ***/
|
|
|
|
|
|
|
|
/* supported chipsets */
|
|
|
|
enum intel_chips {
|
|
|
|
INTEL_830M,
|
|
|
|
INTEL_845G,
|
|
|
|
INTEL_85XGM,
|
|
|
|
INTEL_852GM,
|
|
|
|
INTEL_852GME,
|
2009-04-14 05:40:10 +08:00
|
|
|
INTEL_854,
|
2005-04-17 06:20:36 +08:00
|
|
|
INTEL_855GM,
|
|
|
|
INTEL_855GME,
|
|
|
|
INTEL_865G,
|
2005-11-07 17:00:33 +08:00
|
|
|
INTEL_915G,
|
2006-03-23 08:23:55 +08:00
|
|
|
INTEL_915GM,
|
2006-03-23 18:53:05 +08:00
|
|
|
INTEL_945G,
|
|
|
|
INTEL_945GM,
|
2008-10-16 13:03:35 +08:00
|
|
|
INTEL_945GME,
|
2008-04-28 17:15:43 +08:00
|
|
|
INTEL_965G,
|
|
|
|
INTEL_965GM,
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct intelfb_hwstate {
|
|
|
|
u32 vga0_divisor;
|
|
|
|
u32 vga1_divisor;
|
|
|
|
u32 vga_pd;
|
|
|
|
u32 dpll_a;
|
|
|
|
u32 dpll_b;
|
|
|
|
u32 fpa0;
|
|
|
|
u32 fpa1;
|
|
|
|
u32 fpb0;
|
|
|
|
u32 fpb1;
|
|
|
|
u32 palette_a[PALETTE_8_ENTRIES];
|
|
|
|
u32 palette_b[PALETTE_8_ENTRIES];
|
|
|
|
u32 htotal_a;
|
|
|
|
u32 hblank_a;
|
|
|
|
u32 hsync_a;
|
|
|
|
u32 vtotal_a;
|
|
|
|
u32 vblank_a;
|
|
|
|
u32 vsync_a;
|
|
|
|
u32 src_size_a;
|
|
|
|
u32 bclrpat_a;
|
|
|
|
u32 htotal_b;
|
|
|
|
u32 hblank_b;
|
|
|
|
u32 hsync_b;
|
|
|
|
u32 vtotal_b;
|
|
|
|
u32 vblank_b;
|
|
|
|
u32 vsync_b;
|
|
|
|
u32 src_size_b;
|
|
|
|
u32 bclrpat_b;
|
|
|
|
u32 adpa;
|
|
|
|
u32 dvoa;
|
|
|
|
u32 dvob;
|
|
|
|
u32 dvoc;
|
|
|
|
u32 dvoa_srcdim;
|
|
|
|
u32 dvob_srcdim;
|
|
|
|
u32 dvoc_srcdim;
|
|
|
|
u32 lvds;
|
|
|
|
u32 pipe_a_conf;
|
|
|
|
u32 pipe_b_conf;
|
|
|
|
u32 disp_arb;
|
|
|
|
u32 cursor_a_control;
|
|
|
|
u32 cursor_b_control;
|
|
|
|
u32 cursor_a_base;
|
|
|
|
u32 cursor_b_base;
|
|
|
|
u32 cursor_size;
|
|
|
|
u32 disp_a_ctrl;
|
|
|
|
u32 disp_b_ctrl;
|
|
|
|
u32 disp_a_base;
|
|
|
|
u32 disp_b_base;
|
|
|
|
u32 cursor_a_palette[4];
|
|
|
|
u32 cursor_b_palette[4];
|
|
|
|
u32 disp_a_stride;
|
|
|
|
u32 disp_b_stride;
|
|
|
|
u32 vgacntrl;
|
|
|
|
u32 add_id;
|
|
|
|
u32 swf0x[7];
|
|
|
|
u32 swf1x[7];
|
|
|
|
u32 swf3x[3];
|
|
|
|
u32 fence[8];
|
|
|
|
u32 instpm;
|
|
|
|
u32 mem_mode;
|
|
|
|
u32 fw_blc_0;
|
|
|
|
u32 fw_blc_1;
|
2006-06-21 02:36:41 +08:00
|
|
|
u16 hwstam;
|
|
|
|
u16 ier;
|
|
|
|
u16 iir;
|
|
|
|
u16 imr;
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
struct intelfb_heap_data {
|
|
|
|
u32 physical;
|
|
|
|
u8 __iomem *virtual;
|
2007-10-16 16:29:31 +08:00
|
|
|
u32 offset; /* in GATT pages */
|
|
|
|
u32 size; /* in bytes */
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2006-06-21 02:55:55 +08:00
|
|
|
#ifdef CONFIG_FB_INTEL_I2C
|
|
|
|
struct intelfb_i2c_chan {
|
|
|
|
struct intelfb_info *dinfo;
|
|
|
|
u32 reg;
|
|
|
|
struct i2c_adapter adapter;
|
|
|
|
struct i2c_algo_bit_data algo;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2006-06-21 02:55:55 +08:00
|
|
|
struct intelfb_output_rec {
|
|
|
|
int type;
|
|
|
|
int pipe;
|
|
|
|
int flags;
|
|
|
|
|
|
|
|
#ifdef CONFIG_FB_INTEL_I2C
|
|
|
|
struct intelfb_i2c_chan i2c_bus;
|
|
|
|
struct intelfb_i2c_chan ddc_bus;
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
2006-06-21 02:36:41 +08:00
|
|
|
struct intelfb_vsync {
|
|
|
|
wait_queue_head_t wait;
|
|
|
|
unsigned int count;
|
2006-06-21 02:36:42 +08:00
|
|
|
int pan_display;
|
|
|
|
u32 pan_offset;
|
2006-06-21 02:36:41 +08:00
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
struct intelfb_info {
|
|
|
|
struct fb_info *info;
|
|
|
|
struct fb_ops *fbops;
|
|
|
|
struct pci_dev *pdev;
|
|
|
|
|
|
|
|
struct intelfb_hwstate save_state;
|
|
|
|
|
|
|
|
/* agpgart structs */
|
2007-10-16 16:29:31 +08:00
|
|
|
struct agp_memory *gtt_fb_mem; /* use all stolen memory or vram */
|
|
|
|
struct agp_memory *gtt_ring_mem; /* ring buffer */
|
|
|
|
struct agp_memory *gtt_cursor_mem; /* hw cursor */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* use a gart reserved fb mem */
|
|
|
|
u8 fbmem_gart;
|
|
|
|
|
video: fbdev: intelfb: use arch_phys_wc_add() and ioremap_wc()
Although this driver gives the framebuffer layer a different
size for the framebuffer it uses the entire aperture PCI BAR
size for the MTRR. Since the framebuffer is included in that
range and MTRR was used on the entire PCI BAR WC will have
been preferred on that range as well. This propagates the
WC preference on the same entire PCI BAR.
Convert the driver from using the x86 specific MTRR code to
the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add()
will avoid MTRR if write-combining is available, in order to
take advantage of that also ensure the ioremap'd area is requested
as write-combining.
There are a few motivations for this:
a) Take advantage of PAT when available
b) Help bury MTRR code away, MTRR is architecture specific and on
x86 its replaced by PAT
c) Help with the goal of eventually using _PAGE_CACHE_UC over
_PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit
de33c442e titled "x86 PAT: fix performance drop for glx,
use UC minus for ioremap(), ioremap_nocache() and
pci_mmap_page_range()")
The conversion done is expressed by the following Coccinelle
SmPL patch, it additionally required manual intervention to
address all the #ifdery and removal of redundant things which
arch_phys_wc_add() already addresses such as verbose message
about when MTRR fails and doing nothing when we didn't get
an MTRR.
@ mtrr_found @
expression index, base, size;
@@
-index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1);
+index = arch_phys_wc_add(base, size);
@ mtrr_rm depends on mtrr_found @
expression mtrr_found.index, mtrr_found.base, mtrr_found.size;
@@
-mtrr_del(index, base, size);
+arch_phys_wc_del(index);
@ mtrr_rm_zero_arg depends on mtrr_found @
expression mtrr_found.index;
@@
-mtrr_del(index, 0, 0);
+arch_phys_wc_del(index);
@ mtrr_rm_fb_info depends on mtrr_found @
struct fb_info *info;
expression mtrr_found.index;
@@
-mtrr_del(index, info->fix.smem_start, info->fix.smem_len);
+arch_phys_wc_del(index);
@ ioremap_replace_nocache depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@
-info->screen_base = ioremap_nocache(base, size);
+info->screen_base = ioremap_wc(base, size);
@ ioremap_replace_default depends on mtrr_found @
struct fb_info *info;
expression base, size;
@@
-info->screen_base = ioremap(base, size);
+info->screen_base = ioremap_wc(base, size);
Generated-by: Coccinelle SmPL
Cc: Maik Broemme <mbroemme@plusserver.de>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Suresh Siddha <sbsiddha@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Juergen Gross <jgross@suse.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Antonino Daplas <adaplas@gmail.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
2015-04-22 04:16:25 +08:00
|
|
|
int wc_cookie;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* heap data */
|
|
|
|
struct intelfb_heap_data aperture;
|
|
|
|
struct intelfb_heap_data fb;
|
|
|
|
struct intelfb_heap_data ring;
|
|
|
|
struct intelfb_heap_data cursor;
|
|
|
|
|
|
|
|
/* mmio regs */
|
|
|
|
u32 mmio_base_phys;
|
|
|
|
u8 __iomem *mmio_base;
|
|
|
|
|
|
|
|
/* fb start offset (in bytes) */
|
|
|
|
u32 fb_start;
|
|
|
|
|
|
|
|
/* ring buffer */
|
2006-06-23 13:05:39 +08:00
|
|
|
u32 ring_head;
|
2005-04-17 06:20:36 +08:00
|
|
|
u32 ring_tail;
|
|
|
|
u32 ring_tail_mask;
|
|
|
|
u32 ring_space;
|
|
|
|
u32 ring_lockup;
|
|
|
|
|
|
|
|
/* palette */
|
2007-07-17 19:05:44 +08:00
|
|
|
u32 pseudo_palette[16];
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* chip info */
|
|
|
|
int pci_chipset;
|
|
|
|
int chipset;
|
|
|
|
const char *name;
|
|
|
|
int mobile;
|
|
|
|
|
|
|
|
/* current mode */
|
|
|
|
int bpp, depth;
|
|
|
|
u32 visual;
|
|
|
|
int xres, yres, pitch;
|
|
|
|
int pixclock;
|
|
|
|
|
|
|
|
/* current pipe */
|
|
|
|
int pipe;
|
|
|
|
|
|
|
|
/* some flags */
|
|
|
|
int accel;
|
|
|
|
int hwcursor;
|
|
|
|
int fixed_mode;
|
|
|
|
int ring_active;
|
2005-12-19 15:11:40 +08:00
|
|
|
int flag;
|
2006-06-21 02:36:41 +08:00
|
|
|
unsigned long irq_flags;
|
|
|
|
int open;
|
|
|
|
|
|
|
|
/* vsync */
|
|
|
|
struct intelfb_vsync vsync;
|
|
|
|
spinlock_t int_lock;
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/* hw cursor */
|
|
|
|
int cursor_on;
|
|
|
|
int cursor_blanked;
|
|
|
|
u8 cursor_src[64];
|
|
|
|
|
|
|
|
/* initial parameters */
|
|
|
|
int initial_vga;
|
|
|
|
struct fb_var_screeninfo initial_var;
|
|
|
|
u32 initial_fb_base;
|
|
|
|
u32 initial_video_ram;
|
|
|
|
u32 initial_pitch;
|
|
|
|
|
|
|
|
/* driver registered */
|
|
|
|
int registered;
|
2007-10-16 16:29:31 +08:00
|
|
|
|
2006-03-20 17:26:45 +08:00
|
|
|
/* index into plls */
|
|
|
|
int pll_index;
|
2006-06-21 02:55:55 +08:00
|
|
|
|
|
|
|
/* outputs */
|
|
|
|
int num_outputs;
|
|
|
|
struct intelfb_output_rec output[MAX_OUTPUTS];
|
2005-04-17 06:20:36 +08:00
|
|
|
};
|
|
|
|
|
2007-10-16 16:29:33 +08:00
|
|
|
#define IS_I9XX(dinfo) (((dinfo)->chipset == INTEL_915G) || \
|
|
|
|
((dinfo)->chipset == INTEL_915GM) || \
|
|
|
|
((dinfo)->chipset == INTEL_945G) || \
|
2008-04-28 17:15:43 +08:00
|
|
|
((dinfo)->chipset == INTEL_945GM) || \
|
2008-10-16 13:03:35 +08:00
|
|
|
((dinfo)->chipset == INTEL_945GME) || \
|
2008-04-28 17:15:43 +08:00
|
|
|
((dinfo)->chipset == INTEL_965G) || \
|
|
|
|
((dinfo)->chipset == INTEL_965GM))
|
2006-03-23 10:06:32 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/*** function prototypes ***/
|
|
|
|
|
|
|
|
extern int intelfb_var_to_depth(const struct fb_var_screeninfo *var);
|
|
|
|
|
2006-06-21 02:55:55 +08:00
|
|
|
#ifdef CONFIG_FB_INTEL_I2C
|
|
|
|
extern void intelfb_create_i2c_busses(struct intelfb_info *dinfo);
|
2006-06-21 02:55:55 +08:00
|
|
|
extern void intelfb_delete_i2c_busses(struct intelfb_info *dinfo);
|
2006-06-21 02:55:55 +08:00
|
|
|
#endif
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif /* _INTELFB_H */
|