mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-14 22:44:27 +08:00
b24413180f
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>
181 lines
6.9 KiB
C
181 lines
6.9 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __MATROXFB_DAC1064_H__
|
|
#define __MATROXFB_DAC1064_H__
|
|
|
|
|
|
#include "matroxfb_base.h"
|
|
|
|
#ifdef CONFIG_FB_MATROX_MYSTIQUE
|
|
extern struct matrox_switch matrox_mystique;
|
|
#endif
|
|
#ifdef CONFIG_FB_MATROX_G
|
|
extern struct matrox_switch matrox_G100;
|
|
#endif
|
|
#ifdef NEED_DAC1064
|
|
void DAC1064_global_init(struct matrox_fb_info *minfo);
|
|
void DAC1064_global_restore(struct matrox_fb_info *minfo);
|
|
#endif
|
|
|
|
#define M1064_INDEX 0x00
|
|
#define M1064_PALWRADD 0x00
|
|
#define M1064_PALDATA 0x01
|
|
#define M1064_PIXRDMSK 0x02
|
|
#define M1064_PALRDADD 0x03
|
|
#define M1064_X_DATAREG 0x0A
|
|
#define M1064_CURPOSXL 0x0C /* can be accessed as DWORD */
|
|
#define M1064_CURPOSXH 0x0D
|
|
#define M1064_CURPOSYL 0x0E
|
|
#define M1064_CURPOSYH 0x0F
|
|
|
|
#define M1064_XCURADDL 0x04
|
|
#define M1064_XCURADDH 0x05
|
|
#define M1064_XCURCTRL 0x06
|
|
#define M1064_XCURCTRL_DIS 0x00 /* transparent, transparent, transparent, transparent */
|
|
#define M1064_XCURCTRL_3COLOR 0x01 /* transparent, 0, 1, 2 */
|
|
#define M1064_XCURCTRL_XGA 0x02 /* 0, 1, transparent, complement */
|
|
#define M1064_XCURCTRL_XWIN 0x03 /* transparent, transparent, 0, 1 */
|
|
/* drive DVI by standard(0)/DVI(1) PLL */
|
|
/* if set(1), C?DVICLKEN and C?DVICLKSEL must be set(1) */
|
|
#define M1064_XDVICLKCTRL_DVIDATAPATHSEL 0x01
|
|
/* drive CRTC1 by standard(0)/DVI(1) PLL */
|
|
#define M1064_XDVICLKCTRL_C1DVICLKSEL 0x02
|
|
/* drive CRTC2 by standard(0)/DVI(1) PLL */
|
|
#define M1064_XDVICLKCTRL_C2DVICLKSEL 0x04
|
|
/* pixel clock allowed to(0)/blocked from(1) driving CRTC1 */
|
|
#define M1064_XDVICLKCTRL_C1DVICLKEN 0x08
|
|
/* DVI PLL loop filter bandwidth selection bits */
|
|
#define M1064_XDVICLKCTRL_DVILOOPCTL 0x30
|
|
/* CRTC2 pixel clock allowed to(0)/blocked from(1) driving CRTC2 */
|
|
#define M1064_XDVICLKCTRL_C2DVICLKEN 0x40
|
|
/* P1PLL loop filter bandwidth selection */
|
|
#define M1064_XDVICLKCTRL_P1LOOPBWDTCTL 0x80
|
|
#define M1064_XCURCOL0RED 0x08
|
|
#define M1064_XCURCOL0GREEN 0x09
|
|
#define M1064_XCURCOL0BLUE 0x0A
|
|
#define M1064_XCURCOL1RED 0x0C
|
|
#define M1064_XCURCOL1GREEN 0x0D
|
|
#define M1064_XCURCOL1BLUE 0x0E
|
|
#define M1064_XDVICLKCTRL 0x0F
|
|
#define M1064_XCURCOL2RED 0x10
|
|
#define M1064_XCURCOL2GREEN 0x11
|
|
#define M1064_XCURCOL2BLUE 0x12
|
|
#define DAC1064_XVREFCTRL 0x18
|
|
#define DAC1064_XVREFCTRL_INTERNAL 0x3F
|
|
#define DAC1064_XVREFCTRL_EXTERNAL 0x00
|
|
#define DAC1064_XVREFCTRL_G100_DEFAULT 0x03
|
|
#define M1064_XMULCTRL 0x19
|
|
#define M1064_XMULCTRL_DEPTH_8BPP 0x00 /* 8 bpp paletized */
|
|
#define M1064_XMULCTRL_DEPTH_15BPP_1BPP 0x01 /* 15 bpp paletized + 1 bpp overlay */
|
|
#define M1064_XMULCTRL_DEPTH_16BPP 0x02 /* 16 bpp paletized */
|
|
#define M1064_XMULCTRL_DEPTH_24BPP 0x03 /* 24 bpp paletized */
|
|
#define M1064_XMULCTRL_DEPTH_24BPP_8BPP 0x04 /* 24 bpp direct + 8 bpp overlay paletized */
|
|
#define M1064_XMULCTRL_2G8V16 0x05 /* 15 bpp video direct, half xres, 8bpp paletized */
|
|
#define M1064_XMULCTRL_G16V16 0x06 /* 15 bpp video, 15bpp graphics, one of them paletized */
|
|
#define M1064_XMULCTRL_DEPTH_32BPP 0x07 /* 24 bpp paletized + 8 bpp unused */
|
|
#define M1064_XMULCTRL_GRAPHICS_PALETIZED 0x00
|
|
#define M1064_XMULCTRL_VIDEO_PALETIZED 0x08
|
|
#define M1064_XPIXCLKCTRL 0x1A
|
|
#define M1064_XPIXCLKCTRL_SRC_PCI 0x00
|
|
#define M1064_XPIXCLKCTRL_SRC_PLL 0x01
|
|
#define M1064_XPIXCLKCTRL_SRC_EXT 0x02
|
|
#define M1064_XPIXCLKCTRL_SRC_SYS 0x03 /* G200/G400 */
|
|
#define M1064_XPIXCLKCTRL_SRC_PLL2 0x03 /* G450 */
|
|
#define M1064_XPIXCLKCTRL_SRC_MASK 0x03
|
|
#define M1064_XPIXCLKCTRL_EN 0x00
|
|
#define M1064_XPIXCLKCTRL_DIS 0x04
|
|
#define M1064_XPIXCLKCTRL_PLL_DOWN 0x00
|
|
#define M1064_XPIXCLKCTRL_PLL_UP 0x08
|
|
#define M1064_XGENCTRL 0x1D
|
|
#define M1064_XGENCTRL_VS_0 0x00
|
|
#define M1064_XGENCTRL_VS_1 0x01
|
|
#define M1064_XGENCTRL_ALPHA_DIS 0x00
|
|
#define M1064_XGENCTRL_ALPHA_EN 0x02
|
|
#define M1064_XGENCTRL_BLACK_0IRE 0x00
|
|
#define M1064_XGENCTRL_BLACK_75IRE 0x10
|
|
#define M1064_XGENCTRL_SYNC_ON_GREEN 0x00
|
|
#define M1064_XGENCTRL_NO_SYNC_ON_GREEN 0x20
|
|
#define M1064_XGENCTRL_SYNC_ON_GREEN_MASK 0x20
|
|
#define M1064_XMISCCTRL 0x1E
|
|
#define M1064_XMISCCTRL_DAC_DIS 0x00
|
|
#define M1064_XMISCCTRL_DAC_EN 0x01
|
|
#define M1064_XMISCCTRL_MFC_VGA 0x00
|
|
#define M1064_XMISCCTRL_MFC_MAFC 0x02
|
|
#define M1064_XMISCCTRL_MFC_DIS 0x06
|
|
#define GX00_XMISCCTRL_MFC_MAFC 0x02
|
|
#define GX00_XMISCCTRL_MFC_PANELLINK 0x04
|
|
#define GX00_XMISCCTRL_MFC_DIS 0x06
|
|
#define GX00_XMISCCTRL_MFC_MASK 0x06
|
|
#define M1064_XMISCCTRL_DAC_6BIT 0x00
|
|
#define M1064_XMISCCTRL_DAC_8BIT 0x08
|
|
#define M1064_XMISCCTRL_DAC_WIDTHMASK 0x08
|
|
#define M1064_XMISCCTRL_LUT_DIS 0x00
|
|
#define M1064_XMISCCTRL_LUT_EN 0x10
|
|
#define G400_XMISCCTRL_VDO_MAFC12 0x00
|
|
#define G400_XMISCCTRL_VDO_BYPASS656 0x40
|
|
#define G400_XMISCCTRL_VDO_C2_MAFC12 0x80
|
|
#define G400_XMISCCTRL_VDO_C2_BYPASS656 0xC0
|
|
#define G400_XMISCCTRL_VDO_MASK 0xE0
|
|
#define M1064_XGENIOCTRL 0x2A
|
|
#define M1064_XGENIODATA 0x2B
|
|
#define DAC1064_XSYSPLLM 0x2C
|
|
#define DAC1064_XSYSPLLN 0x2D
|
|
#define DAC1064_XSYSPLLP 0x2E
|
|
#define DAC1064_XSYSPLLSTAT 0x2F
|
|
#define M1064_XZOOMCTRL 0x38
|
|
#define M1064_XZOOMCTRL_1 0x00
|
|
#define M1064_XZOOMCTRL_2 0x01
|
|
#define M1064_XZOOMCTRL_4 0x03
|
|
#define M1064_XSENSETEST 0x3A
|
|
#define M1064_XSENSETEST_BCOMP 0x01
|
|
#define M1064_XSENSETEST_GCOMP 0x02
|
|
#define M1064_XSENSETEST_RCOMP 0x04
|
|
#define M1064_XSENSETEST_PDOWN 0x00
|
|
#define M1064_XSENSETEST_PUP 0x80
|
|
#define M1064_XCRCREML 0x3C
|
|
#define M1064_XCRCREMH 0x3D
|
|
#define M1064_XCRCBITSEL 0x3E
|
|
#define M1064_XCOLKEYMASKL 0x40
|
|
#define M1064_XCOLKEYMASKH 0x41
|
|
#define M1064_XCOLKEYL 0x42
|
|
#define M1064_XCOLKEYH 0x43
|
|
#define M1064_XPIXPLLAM 0x44
|
|
#define M1064_XPIXPLLAN 0x45
|
|
#define M1064_XPIXPLLAP 0x46
|
|
#define M1064_XPIXPLLBM 0x48
|
|
#define M1064_XPIXPLLBN 0x49
|
|
#define M1064_XPIXPLLBP 0x4A
|
|
#define M1064_XPIXPLLCM 0x4C
|
|
#define M1064_XPIXPLLCN 0x4D
|
|
#define M1064_XPIXPLLCP 0x4E
|
|
#define M1064_XPIXPLLSTAT 0x4F
|
|
|
|
#define M1064_XTVO_IDX 0x87
|
|
#define M1064_XTVO_DATA 0x88
|
|
|
|
#define M1064_XOUTPUTCONN 0x8A
|
|
#define M1064_XSYNCCTRL 0x8B
|
|
#define M1064_XVIDPLLSTAT 0x8C
|
|
#define M1064_XVIDPLLP 0x8D
|
|
#define M1064_XVIDPLLM 0x8E
|
|
#define M1064_XVIDPLLN 0x8F
|
|
|
|
#define M1064_XPWRCTRL 0xA0
|
|
#define M1064_XPWRCTRL_PANELPDN 0x04
|
|
|
|
#define M1064_XPANMODE 0xA2
|
|
|
|
enum POS1064 {
|
|
POS1064_XCURADDL=0, POS1064_XCURADDH, POS1064_XCURCTRL,
|
|
POS1064_XCURCOL0RED, POS1064_XCURCOL0GREEN, POS1064_XCURCOL0BLUE,
|
|
POS1064_XCURCOL1RED, POS1064_XCURCOL1GREEN, POS1064_XCURCOL1BLUE,
|
|
POS1064_XCURCOL2RED, POS1064_XCURCOL2GREEN, POS1064_XCURCOL2BLUE,
|
|
POS1064_XVREFCTRL, POS1064_XMULCTRL, POS1064_XPIXCLKCTRL, POS1064_XGENCTRL,
|
|
POS1064_XMISCCTRL,
|
|
POS1064_XGENIOCTRL, POS1064_XGENIODATA, POS1064_XZOOMCTRL, POS1064_XSENSETEST,
|
|
POS1064_XCRCBITSEL,
|
|
POS1064_XCOLKEYMASKL, POS1064_XCOLKEYMASKH, POS1064_XCOLKEYL, POS1064_XCOLKEYH,
|
|
POS1064_XOUTPUTCONN, POS1064_XPANMODE, POS1064_XPWRCTRL };
|
|
|
|
|
|
#endif /* __MATROXFB_DAC1064_H__ */
|