![Greg Kroah-Hartman](/assets/img/avatar_default.png)
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>
200 lines
6.1 KiB
C
200 lines
6.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef __ASM_SH_MOBILE_LCDC_H__
|
|
#define __ASM_SH_MOBILE_LCDC_H__
|
|
|
|
#include <linux/fb.h>
|
|
#include <video/sh_mobile_meram.h>
|
|
|
|
/* Register definitions */
|
|
#define _LDDCKR 0x410
|
|
#define LDDCKR_ICKSEL_BUS (0 << 16)
|
|
#define LDDCKR_ICKSEL_MIPI (1 << 16)
|
|
#define LDDCKR_ICKSEL_HDMI (2 << 16)
|
|
#define LDDCKR_ICKSEL_EXT (3 << 16)
|
|
#define LDDCKR_ICKSEL_MASK (7 << 16)
|
|
#define LDDCKR_MOSEL (1 << 6)
|
|
#define _LDDCKSTPR 0x414
|
|
#define _LDINTR 0x468
|
|
#define LDINTR_FE (1 << 10)
|
|
#define LDINTR_VSE (1 << 9)
|
|
#define LDINTR_VEE (1 << 8)
|
|
#define LDINTR_FS (1 << 2)
|
|
#define LDINTR_VSS (1 << 1)
|
|
#define LDINTR_VES (1 << 0)
|
|
#define LDINTR_STATUS_MASK (0xff << 0)
|
|
#define _LDSR 0x46c
|
|
#define LDSR_MSS (1 << 10)
|
|
#define LDSR_MRS (1 << 8)
|
|
#define LDSR_AS (1 << 1)
|
|
#define _LDCNT1R 0x470
|
|
#define LDCNT1R_DE (1 << 0)
|
|
#define _LDCNT2R 0x474
|
|
#define LDCNT2R_BR (1 << 8)
|
|
#define LDCNT2R_MD (1 << 3)
|
|
#define LDCNT2R_SE (1 << 2)
|
|
#define LDCNT2R_ME (1 << 1)
|
|
#define LDCNT2R_DO (1 << 0)
|
|
#define _LDRCNTR 0x478
|
|
#define LDRCNTR_SRS (1 << 17)
|
|
#define LDRCNTR_SRC (1 << 16)
|
|
#define LDRCNTR_MRS (1 << 1)
|
|
#define LDRCNTR_MRC (1 << 0)
|
|
#define _LDDDSR 0x47c
|
|
#define LDDDSR_LS (1 << 2)
|
|
#define LDDDSR_WS (1 << 1)
|
|
#define LDDDSR_BS (1 << 0)
|
|
|
|
#define LDMT1R_VPOL (1 << 28)
|
|
#define LDMT1R_HPOL (1 << 27)
|
|
#define LDMT1R_DWPOL (1 << 26)
|
|
#define LDMT1R_DIPOL (1 << 25)
|
|
#define LDMT1R_DAPOL (1 << 24)
|
|
#define LDMT1R_HSCNT (1 << 17)
|
|
#define LDMT1R_DWCNT (1 << 16)
|
|
#define LDMT1R_IFM (1 << 12)
|
|
#define LDMT1R_MIFTYP_RGB8 (0x0 << 0)
|
|
#define LDMT1R_MIFTYP_RGB9 (0x4 << 0)
|
|
#define LDMT1R_MIFTYP_RGB12A (0x5 << 0)
|
|
#define LDMT1R_MIFTYP_RGB12B (0x6 << 0)
|
|
#define LDMT1R_MIFTYP_RGB16 (0x7 << 0)
|
|
#define LDMT1R_MIFTYP_RGB18 (0xa << 0)
|
|
#define LDMT1R_MIFTYP_RGB24 (0xb << 0)
|
|
#define LDMT1R_MIFTYP_YCBCR (0xf << 0)
|
|
#define LDMT1R_MIFTYP_SYS8A (0x0 << 0)
|
|
#define LDMT1R_MIFTYP_SYS8B (0x1 << 0)
|
|
#define LDMT1R_MIFTYP_SYS8C (0x2 << 0)
|
|
#define LDMT1R_MIFTYP_SYS8D (0x3 << 0)
|
|
#define LDMT1R_MIFTYP_SYS9 (0x4 << 0)
|
|
#define LDMT1R_MIFTYP_SYS12 (0x5 << 0)
|
|
#define LDMT1R_MIFTYP_SYS16A (0x7 << 0)
|
|
#define LDMT1R_MIFTYP_SYS16B (0x8 << 0)
|
|
#define LDMT1R_MIFTYP_SYS16C (0x9 << 0)
|
|
#define LDMT1R_MIFTYP_SYS18 (0xa << 0)
|
|
#define LDMT1R_MIFTYP_SYS24 (0xb << 0)
|
|
#define LDMT1R_MIFTYP_MASK (0xf << 0)
|
|
|
|
#define LDDFR_CF1 (1 << 18)
|
|
#define LDDFR_CF0 (1 << 17)
|
|
#define LDDFR_CC (1 << 16)
|
|
#define LDDFR_YF_420 (0 << 8)
|
|
#define LDDFR_YF_422 (1 << 8)
|
|
#define LDDFR_YF_444 (2 << 8)
|
|
#define LDDFR_YF_MASK (3 << 8)
|
|
#define LDDFR_PKF_ARGB32 (0x00 << 0)
|
|
#define LDDFR_PKF_RGB16 (0x03 << 0)
|
|
#define LDDFR_PKF_RGB24 (0x0b << 0)
|
|
#define LDDFR_PKF_MASK (0x1f << 0)
|
|
|
|
#define LDSM1R_OS (1 << 0)
|
|
|
|
#define LDSM2R_OSTRG (1 << 0)
|
|
|
|
#define LDPMR_LPS (3 << 0)
|
|
|
|
#define _LDDWD0R 0x800
|
|
#define LDDWDxR_WDACT (1 << 28)
|
|
#define LDDWDxR_RSW (1 << 24)
|
|
#define _LDDRDR 0x840
|
|
#define LDDRDR_RSR (1 << 24)
|
|
#define LDDRDR_DRD_MASK (0x3ffff << 0)
|
|
#define _LDDWAR 0x900
|
|
#define LDDWAR_WA (1 << 0)
|
|
#define _LDDRAR 0x904
|
|
#define LDDRAR_RA (1 << 0)
|
|
|
|
enum {
|
|
RGB8 = LDMT1R_MIFTYP_RGB8, /* 24bpp, 8:8:8 */
|
|
RGB9 = LDMT1R_MIFTYP_RGB9, /* 18bpp, 9:9 */
|
|
RGB12A = LDMT1R_MIFTYP_RGB12A, /* 24bpp, 12:12 */
|
|
RGB12B = LDMT1R_MIFTYP_RGB12B, /* 12bpp */
|
|
RGB16 = LDMT1R_MIFTYP_RGB16, /* 16bpp */
|
|
RGB18 = LDMT1R_MIFTYP_RGB18, /* 18bpp */
|
|
RGB24 = LDMT1R_MIFTYP_RGB24, /* 24bpp */
|
|
YUV422 = LDMT1R_MIFTYP_YCBCR, /* 16bpp */
|
|
SYS8A = LDMT1R_IFM | LDMT1R_MIFTYP_SYS8A, /* 24bpp, 8:8:8 */
|
|
SYS8B = LDMT1R_IFM | LDMT1R_MIFTYP_SYS8B, /* 18bpp, 8:8:2 */
|
|
SYS8C = LDMT1R_IFM | LDMT1R_MIFTYP_SYS8C, /* 18bpp, 2:8:8 */
|
|
SYS8D = LDMT1R_IFM | LDMT1R_MIFTYP_SYS8D, /* 16bpp, 8:8 */
|
|
SYS9 = LDMT1R_IFM | LDMT1R_MIFTYP_SYS9, /* 18bpp, 9:9 */
|
|
SYS12 = LDMT1R_IFM | LDMT1R_MIFTYP_SYS12, /* 24bpp, 12:12 */
|
|
SYS16A = LDMT1R_IFM | LDMT1R_MIFTYP_SYS16A, /* 16bpp */
|
|
SYS16B = LDMT1R_IFM | LDMT1R_MIFTYP_SYS16B, /* 18bpp, 16:2 */
|
|
SYS16C = LDMT1R_IFM | LDMT1R_MIFTYP_SYS16C, /* 18bpp, 2:16 */
|
|
SYS18 = LDMT1R_IFM | LDMT1R_MIFTYP_SYS18, /* 18bpp */
|
|
SYS24 = LDMT1R_IFM | LDMT1R_MIFTYP_SYS24, /* 24bpp */
|
|
};
|
|
|
|
enum { LCDC_CHAN_DISABLED = 0,
|
|
LCDC_CHAN_MAINLCD,
|
|
LCDC_CHAN_SUBLCD };
|
|
|
|
enum { LCDC_CLK_BUS, LCDC_CLK_PERIPHERAL, LCDC_CLK_EXTERNAL };
|
|
|
|
#define LCDC_FLAGS_DWPOL (1 << 0) /* Rising edge dot clock data latch */
|
|
#define LCDC_FLAGS_DIPOL (1 << 1) /* Active low display enable polarity */
|
|
#define LCDC_FLAGS_DAPOL (1 << 2) /* Active low display data polarity */
|
|
#define LCDC_FLAGS_HSCNT (1 << 3) /* Disable HSYNC during VBLANK */
|
|
#define LCDC_FLAGS_DWCNT (1 << 4) /* Disable dotclock during blanking */
|
|
|
|
struct sh_mobile_lcdc_sys_bus_cfg {
|
|
unsigned long ldmt2r;
|
|
unsigned long ldmt3r;
|
|
unsigned long deferred_io_msec;
|
|
};
|
|
|
|
struct sh_mobile_lcdc_sys_bus_ops {
|
|
void (*write_index)(void *handle, unsigned long data);
|
|
void (*write_data)(void *handle, unsigned long data);
|
|
unsigned long (*read_data)(void *handle);
|
|
};
|
|
|
|
struct sh_mobile_lcdc_panel_cfg {
|
|
unsigned long width; /* Panel width in mm */
|
|
unsigned long height; /* Panel height in mm */
|
|
int (*setup_sys)(void *sys_ops_handle,
|
|
struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
|
|
void (*start_transfer)(void *sys_ops_handle,
|
|
struct sh_mobile_lcdc_sys_bus_ops *sys_ops);
|
|
void (*display_on)(void);
|
|
void (*display_off)(void);
|
|
};
|
|
|
|
/* backlight info */
|
|
struct sh_mobile_lcdc_bl_info {
|
|
const char *name;
|
|
int max_brightness;
|
|
int (*set_brightness)(int brightness);
|
|
};
|
|
|
|
struct sh_mobile_lcdc_overlay_cfg {
|
|
int fourcc;
|
|
unsigned int max_xres;
|
|
unsigned int max_yres;
|
|
};
|
|
|
|
struct sh_mobile_lcdc_chan_cfg {
|
|
int chan;
|
|
int fourcc;
|
|
int colorspace;
|
|
int interface_type; /* selects RGBn or SYSn I/F, see above */
|
|
int clock_divider;
|
|
unsigned long flags; /* LCDC_FLAGS_... */
|
|
const struct fb_videomode *lcd_modes;
|
|
int num_modes;
|
|
struct sh_mobile_lcdc_panel_cfg panel_cfg;
|
|
struct sh_mobile_lcdc_bl_info bl_info;
|
|
struct sh_mobile_lcdc_sys_bus_cfg sys_bus_cfg; /* only for SYSn I/F */
|
|
const struct sh_mobile_meram_cfg *meram_cfg;
|
|
|
|
struct platform_device *tx_dev; /* HDMI/DSI transmitter device */
|
|
};
|
|
|
|
struct sh_mobile_lcdc_info {
|
|
int clock_source;
|
|
struct sh_mobile_lcdc_chan_cfg ch[2];
|
|
struct sh_mobile_lcdc_overlay_cfg overlays[4];
|
|
struct sh_mobile_meram_info *meram_dev;
|
|
};
|
|
|
|
#endif /* __ASM_SH_MOBILE_LCDC_H__ */
|