gpu: vivante: Initial import of GC860 Vivante kernel side driver.

Initial import of Vivante GPU code version 2.5.3.2.5.b7 for Ingenic
JZ4770 SoC with Vivante GC860 VPU. The copyright headers were updated
to be GPL again, since the previous 2.5.3.2.5.x releases had it and
then they were accidentally changed due to auto-generation of files.
Updated the date to be 2012.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Apply latest Ingenic patch to Vivante driver.

This was the last support patch from Vivante to Ingenic that the
GCW-Zero team received.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Make Vivante driver buildable on GCW0.

Make changes necessary in order to build the the GC860 driver for
the JZ4770 platforms:

* All instances of CONFIG_SOC_JZ4770 were changed to CONFIG_MACH_JZ4770
  which is a more standard naming.
* The VM_RESERVED flag is no longer used in 3.7 and newer kernels. The
  flag is replaced by either VM_IO or (VM_DONTEXPAND | VM_DONTDUMP) in
  newer kernels. Since VM_IO was already there, it made sense just to
  replace VM_RESERVED with VM_DONTDUMP flag for completeness. Maybe in
  the future just VM_IO can be used.
* The 'do_mmap_pgoff' and 'do_munmap' functions in 'mm/mmap.c' were
  being used by the driver. These do not get exported to kernel modules,
  so new functions 'plat_do_mmap_pgoff' and 'plat_do_munmap' were
  created and exported. They are simple wrapper functions that pass the
  arguments straight to the corresponding 'mm/mmap.c' functions.
* Added '-Wframe-larger-than=1032' to EXTRA_CFLAGS to silence warning.
* Fixed a string format warning.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>

Conflicts:
	arch/mips/jz4770/board-gcw0.c
gpu: vivante: Make the GC860 selectable.

Add the Vivante GC860 driver to the config and build system so
that the user can select and build it. The configuration file
has also been updated.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>

Conflicts:
	drivers/gpu/Makefile
	drivers/video/Kconfig
gpu: vivante: Move 'gc_hal_kernel_debug.c' to new directory.

This change moves 'gc_hal_kernel_debug.c' from the directory
'hal/os/linux/kernel' to 'hal/kernel' to match the etna_viv
driver. All the new header files have been added. The other
changes were made to use the new 'gc_hal_kernel_debug.c' file.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Complete merge with 'etna_viv' driver tree.

This imports the 'etna_viv' code and adds changes for the JZ4770 SoC.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Clean up build system files.

Clean up the CFLAGS to match the newer Vivante driver code from the
'etna_viv' project. Make config options the same as 'etna_viv'.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Make kernel memory map functions generic again.

The functions 'do_mmap_pgoff' and 'do_munmap' are not exported to
driver modules. For Ingenic and other MIPS platforms, wrapper
functions are used instead.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Fixed #define name for GPU config check

Note that module or built-in is not determined for at the GC860 level,
but for the whole Vivante driver instead.
MIPS: JZ4770: GCW0: defconfig: Update GPU config option names
gpu: vivante: Make kernel memory map functions generic again.

The functions 'do_mmap_pgoff' and 'do_munmap' are not exported to
driver modules. For Ingenic and other MIPS platforms, wrapper
functions are used instead.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>

Conflicts:
	arch/mips/jz4770/board-gcw0.c
gpu: vivante: ETNAVIV: Add new driver.

This new driver is a port of the <https://github.com/laanwj/etna_viv>
Project Etnaviv. It is an attempt to create an opensource driver and
userspace for Vivante GCxxx series of embedded GPUs. Support for the
Ingenic JZ4770 on the GCW0 has been added.

Signed-off-by: Steven J. Hill <sjhill@realitydiluted.com>
gpu: vivante: Add Kconfig option for ETNAVIV driver
gpu: vivante: Kernel 3.9 fixes

remove __devinit, add extra argument to do_mmap_pgoff
gpu: vivante: DEBUG support for ETNAVIV
gpu: vivante: Clarify Kconfig entries
gpu: vivante: Document workaround in board-gcw0.c
gpu: vivante: Document makefile for ETNAVIV driver
gpu: vivante: Normalize gcw0_defconfig

Restore the defconfig to the original state, this means no (un)loading
of modules in default config. Do enable VIVANTE_V2 by default as
it is the preferred version used by the current Etnaviv user space
driver.