linux/drivers/video/fbdev/mb862xx/mb862xxfb_accel.h
Greg Kroah-Hartman b24413180f 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-02 11:10:55 +01:00

205 lines
10 KiB
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __MB826XXFB_ACCEL_H__
#define __MB826XXFB_ACCEL_H__
/* registers */
#define GDC_GEO_REG_INPUT_FIFO 0x00000400L
/* Special Registers */
#define GDC_REG_CTRL 0x00000400L
#define GDC_REG_FIFO_STATUS 0x00000404L
#define GDC_REG_FIFO_COUNT 0x00000408L
#define GDC_REG_SETUP_STATUS 0x0000040CL
#define GDC_REG_DDA_STATUS 0x00000410L
#define GDC_REG_ENGINE_STATUS 0x00000414L
#define GDC_REG_ERROR_STATUS 0x00000418L
#define GDC_REG_MODE_MISC 0x00000420L /* MDR0 */
#define GDC_REG_MODE_LINE 0x00000424L /* MDR1 */
#define GDC_REG_MODE_POLYGON 0x00000428L /* MDR2 */
#define GDC_REG_MODE_TEXTURE 0x0000042CL /* MDR3 */
#define GDC_REG_MODE_BITMAP 0x00000430L /* MDR4 */
#define GDC_REG_MODE_EXTENSION 0x0000043CL /* MDR7 */
/* Configuration Registers */
#define GDC_REG_DRAW_BASE 0x00000440L
#define GDC_REG_X_RESOLUTION 0x00000444L
#define GDC_REG_Z_BASE 0x00000448L
#define GDC_REG_TEXTURE_BASE 0x0000044CL
#define GDC_REG_POLYGON_FLAG_BASE 0x00000450L
#define GDC_REG_CLIP_XMIN 0x00000454L
#define GDC_REG_CLIP_XMAX 0x00000458L
#define GDC_REG_CLIP_YMIN 0x0000045CL
#define GDC_REG_CLIP_YMAX 0x00000460L
#define GDC_REG_TEXURE_SIZE 0x00000464L
#define GDC_REG_TILE_SIZE 0x00000468L
#define GDC_REG_TEX_BUF_OFFSET 0x0000046CL
/* for MB86293 or later */
#define GDC_REG_ALPHA_MAP_BASE 0x00000474L /* ABR */
/* Constant Registers */
#define GDC_REG_FOREGROUND_COLOR 0x00000480L
#define GDC_REG_BACKGROUND_COLOR 0x00000484L
#define GDC_REG_ALPHA 0x00000488L
#define GDC_REG_LINE_PATTERN 0x0000048CL
#define GDC_REG_TEX_BORDER_COLOR 0x00000494L
#define GDC_REG_LINE_PATTERN_OFFSET 0x000003E0L
/* Coomand Code */
#define GDC_CMD_PIXEL 0x00000000L
#define GDC_CMD_PIXEL_Z 0x00000001L
#define GDC_CMD_X_VECTOR 0x00000020L
#define GDC_CMD_Y_VECTOR 0x00000021L
#define GDC_CMD_X_VECTOR_NOEND 0x00000022L
#define GDC_CMD_Y_VECTOR_NOEND 0x00000023L
#define GDC_CMD_X_VECTOR_BLPO 0x00000024L
#define GDC_CMD_Y_VECTOR_BLPO 0x00000025L
#define GDC_CMD_X_VECTOR_NOEND_BLPO 0x00000026L
#define GDC_CMD_Y_VECTOR_NOEND_BLPO 0x00000027L
#define GDC_CMD_AA_X_VECTOR 0x00000028L
#define GDC_CMD_AA_Y_VECTOR 0x00000029L
#define GDC_CMD_AA_X_VECTOR_NOEND 0x0000002AL
#define GDC_CMD_AA_Y_VECTOR_NOEND 0x0000002BL
#define GDC_CMD_AA_X_VECTOR_BLPO 0x0000002CL
#define GDC_CMD_AA_Y_VECTOR_BLPO 0x0000002DL
#define GDC_CMD_AA_X_VECTOR_NOEND_BLPO 0x0000002EL
#define GDC_CMD_AA_Y_VECTOR_NOEND_BLPO 0x0000002FL
#define GDC_CMD_0_VECTOR 0x00000030L
#define GDC_CMD_1_VECTOR 0x00000031L
#define GDC_CMD_0_VECTOR_NOEND 0x00000032L
#define GDC_CMD_1_VECTOR_NOEND 0x00000033L
#define GDC_CMD_0_VECTOR_BLPO 0x00000034L
#define GDC_CMD_1_VECTOR_BLPO 0x00000035L
#define GDC_CMD_0_VECTOR_NOEND_BLPO 0x00000036L
#define GDC_CMD_1_VECTOR_NOEND_BLPO 0x00000037L
#define GDC_CMD_AA_0_VECTOR 0x00000038L
#define GDC_CMD_AA_1_VECTOR 0x00000039L
#define GDC_CMD_AA_0_VECTOR_NOEND 0x0000003AL
#define GDC_CMD_AA_1_VECTOR_NOEND 0x0000003BL
#define GDC_CMD_AA_0_VECTOR_BLPO 0x0000003CL
#define GDC_CMD_AA_1_VECTOR_BLPO 0x0000003DL
#define GDC_CMD_AA_0_VECTOR_NOEND_BLPO 0x0000003EL
#define GDC_CMD_AA_1_VECTOR_NOEND_BLPO 0x0000003FL
#define GDC_CMD_BLT_FILL 0x00000041L
#define GDC_CMD_BLT_DRAW 0x00000042L
#define GDC_CMD_BITMAP 0x00000043L
#define GDC_CMD_BLTCOPY_TOP_LEFT 0x00000044L
#define GDC_CMD_BLTCOPY_TOP_RIGHT 0x00000045L
#define GDC_CMD_BLTCOPY_BOTTOM_LEFT 0x00000046L
#define GDC_CMD_BLTCOPY_BOTTOM_RIGHT 0x00000047L
#define GDC_CMD_LOAD_TEXTURE 0x00000048L
#define GDC_CMD_LOAD_TILE 0x00000049L
#define GDC_CMD_TRAP_RIGHT 0x00000060L
#define GDC_CMD_TRAP_LEFT 0x00000061L
#define GDC_CMD_TRIANGLE_FAN 0x00000062L
#define GDC_CMD_FLAG_TRIANGLE_FAN 0x00000063L
#define GDC_CMD_FLUSH_FB 0x000000C1L
#define GDC_CMD_FLUSH_Z 0x000000C2L
#define GDC_CMD_POLYGON_BEGIN 0x000000E0L
#define GDC_CMD_POLYGON_END 0x000000E1L
#define GDC_CMD_CLEAR_POLY_FLAG 0x000000E2L
#define GDC_CMD_NORMAL 0x000000FFL
#define GDC_CMD_VECTOR_BLPO_FLAG 0x00040000L
#define GDC_CMD_FAST_VECTOR_BLPO_FLAG 0x00000004L
/* for MB86293 or later */
#define GDC_CMD_MDR1 0x00000000L
#define GDC_CMD_MDR1S 0x00000002L
#define GDC_CMD_MDR1B 0x00000004L
#define GDC_CMD_MDR2 0x00000001L
#define GDC_CMD_MDR2S 0x00000003L
#define GDC_CMD_MDR2TL 0x00000007L
#define GDC_CMD_GMDR1E 0x00000010L
#define GDC_CMD_GMDR2E 0x00000020L
#define GDC_CMD_OVERLAP_SHADOW_XY 0x00000000L
#define GDC_CMD_OVERLAP_SHADOW_XY_COMPOSITION 0x00000001L
#define GDC_CMD_OVERLAP_Z_PACKED_ONBS 0x00000007L
#define GDC_CMD_OVERLAP_Z_ORIGIN 0x00000000L
#define GDC_CMD_OVERLAP_Z_NON_TOPLEFT 0x00000001L
#define GDC_CMD_OVERLAP_Z_BORDER 0x00000002L
#define GDC_CMD_OVERLAP_Z_SHADOW 0x00000003L
#define GDC_CMD_BLTCOPY_ALT_ALPHA 0x00000000L /* Reserverd */
#define GDC_CMD_DC_LOGOUT 0x00000000L /* Reserverd */
#define GDC_CMD_BODY_FORE_COLOR 0x00000000L
#define GDC_CMD_BODY_BACK_COLOR 0x00000001L
#define GDC_CMD_SHADOW_FORE_COLOR 0x00000002L
#define GDC_CMD_SHADOW_BACK_COLOR 0x00000003L
#define GDC_CMD_BORDER_FORE_COLOR 0x00000004L
#define GDC_CMD_BORDER_BACK_COLOR 0x00000005L
/* Type Code Table */
#define GDC_TYPE_G_NOP 0x00000020L
#define GDC_TYPE_G_BEGIN 0x00000021L
#define GDC_TYPE_G_BEGINCONT 0x00000022L
#define GDC_TYPE_G_END 0x00000023L
#define GDC_TYPE_G_VERTEX 0x00000030L
#define GDC_TYPE_G_VERTEXLOG 0x00000032L
#define GDC_TYPE_G_VERTEXNOPLOG 0x00000033L
#define GDC_TYPE_G_INIT 0x00000040L
#define GDC_TYPE_G_VIEWPORT 0x00000041L
#define GDC_TYPE_G_DEPTHRANGE 0x00000042L
#define GDC_TYPE_G_LOADMATRIX 0x00000043L
#define GDC_TYPE_G_VIEWVOLUMEXYCLIP 0x00000044L
#define GDC_TYPE_G_VIEWVOLUMEZCLIP 0x00000045L
#define GDC_TYPE_G_VIEWVOLUMEWCLIP 0x00000046L
#define GDC_TYPE_SETLVERTEX2I 0x00000072L
#define GDC_TYPE_SETLVERTEX2IP 0x00000073L
#define GDC_TYPE_SETMODEREGISTER 0x000000C0L
#define GDC_TYPE_SETGMODEREGISTER 0x000000C1L
#define GDC_TYPE_OVERLAPXYOFFT 0x000000C8L
#define GDC_TYPE_OVERLAPZOFFT 0x000000C9L
#define GDC_TYPE_DC_LOGOUTADDR 0x000000CCL
#define GDC_TYPE_SETCOLORREGISTER 0x000000CEL
#define GDC_TYPE_G_BEGINE 0x000000E1L
#define GDC_TYPE_G_BEGINCONTE 0x000000E2L
#define GDC_TYPE_G_ENDE 0x000000E3L
#define GDC_TYPE_DRAWPIXEL 0x00000000L
#define GDC_TYPE_DRAWPIXELZ 0x00000001L
#define GDC_TYPE_DRAWLINE 0x00000002L
#define GDC_TYPE_DRAWLINE2I 0x00000003L
#define GDC_TYPE_DRAWLINE2IP 0x00000004L
#define GDC_TYPE_DRAWTRAP 0x00000005L
#define GDC_TYPE_DRAWVERTEX2I 0x00000006L
#define GDC_TYPE_DRAWVERTEX2IP 0x00000007L
#define GDC_TYPE_DRAWRECTP 0x00000009L
#define GDC_TYPE_DRAWBITMAPP 0x0000000BL
#define GDC_TYPE_BLTCOPYP 0x0000000DL
#define GDC_TYPE_BLTCOPYALTERNATEP 0x0000000FL
#define GDC_TYPE_LOADTEXTUREP 0x00000011L
#define GDC_TYPE_BLTTEXTUREP 0x00000013L
#define GDC_TYPE_BLTCOPYALTALPHABLENDP 0x0000001FL
#define GDC_TYPE_SETVERTEX2I 0x00000070L
#define GDC_TYPE_SETVERTEX2IP 0x00000071L
#define GDC_TYPE_DRAW 0x000000F0L
#define GDC_TYPE_SETREGISTER 0x000000F1L
#define GDC_TYPE_SYNC 0x000000FCL
#define GDC_TYPE_INTERRUPT 0x000000FDL
#define GDC_TYPE_NOP 0x0
/* Raster operation */
#define GDC_ROP_CLEAR 0x0000
#define GDC_ROP_AND 0x0001
#define GDC_ROP_AND_REVERSE 0x0002
#define GDC_ROP_COPY 0x0003
#define GDC_ROP_AND_INVERTED 0x0004
#define GDC_ROP_NOP 0x0005
#define GDC_ROP_XOR 0x0006
#define GDC_ROP_OR 0x0007
#define GDC_ROP_NOR 0x0008
#define GDC_ROP_EQUIV 0x0009
#define GDC_ROP_INVERT 0x000A
#define GDC_ROP_OR_REVERSE 0x000B
#define GDC_ROP_COPY_INVERTED 0x000C
#define GDC_ROP_OR_INVERTED 0x000D
#define GDC_ROP_NAND 0x000E
#define GDC_ROP_SET 0x000F
#endif