[NOMERGE] drm/exynos: Add S3C6410 G3D driver

This patch adds a work in progress DRM driver for the G3D of S3C6410.

History of work done:

 - moved development from spica-3.0 to mainline 3.8 kernel
 - moved under DRM subsystem

 - adapted parts of exynos-drm driver for OpenFIMG use
 - converted G3D driver to DRM subdriver

 - rebased to Linux 3.9
 - prepared for Common Clock Framework clock semantics
 - reworked probe to use managed resources
 - removed useless flushing from runtime suspend
 - added Device Tree bindings
 - used macros to define dev_pm_ops

 - moved to exynos-drm
 - removed forked OpenFIMG DRM

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
ARM: dts: s3c6410: Add node for G3D

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] S3C6410 G3D DRM driver integration fixups

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - simplified state update requests
 - updated ToDo list
 - updated license text
 - removed legacy fence implementation
 - added new fence implementation (TODO: signalling to userspace)
 - formatting fixes
 - removed incomplete private BO implementation
 - dropped context request spinlock
 - reworked request submission to be DRM-friendly
+ a bunch of minor fixes.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
Revert "drm/exynos: consider buffer allocation without iommu"

This reverts commit 694be458794da6415288978c7b5f8288ae2dc5c3.
Revert "drm/exynos: consider no iommu support to console framebuffer"

This reverts commit c704f1b47d6cb4b61b2e120030088c2a7cefcc13.
Revert "drm/exynos: use DMA_ATTR_NO_KERNEL_MAPPING attribute"

This reverts commit 4744ad2414bd890d37a99df4726be733137aa3f7.

Conflicts:
	drivers/gpu/drm/exynos/exynos_drm_buf.c
drm/exynos: buf: Prepare for allocations without kernel mapping

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
drm/exynos: buf: Allow buffers without kernel mapping

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - kref-based request management
 - simplified shader data types description
 - moved hardware configuration to new apply() request callback
 - added basic support for texture and framebuffer setup requests
 - added state_restore_list to help handle full state restore
 - renamed geometry buffers to draw buffers
 - updated ToDo list
and several minor fixups of previous WiP.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - restored previous implementation of fences
 - reworked whole state restore to use state_restore_list
 - added state init and shader data init requests
 - reworked shader data management
 - factored out common request data allocation and free functions
 - added texture and framebuffer disable support.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Changes added:
 - Separated state update from draw buffer handling
 - Minor fixes and tweaks

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Minor tweaks.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[drm] exynos: Add g3d_priv pointer to exynos_drm_gem_obj struct

The s3c6410-g3d subdriver requires extra private data per GEM object.
This patch adds private data field to Exynos GEM object struct, which
gets allocated first time an object is used by G3D driver and freed when
the object is destroyed.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - added validation of request data size for most requests
 - added support for framebuffers and textures
 - optimized register accesses using readl_/writel_relaxed wherever
   strict ordering is not important
 - separated __user pointers from kernel pointers
 - several stylistic fixes

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - removed unused FGRA_D_OFF_R_IN register
 - added missing FGPF_CBMSK register
 - separated shader data and shader program request structs
 - fixed integer types used in userspace API.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - simplified fence handling.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - configuration of shader registers,
 - request handling wrapper functions,
 - start/stop of pixel shader,
 - more safety checks,
 - optional debugging messages,
 - bug fixes.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - moved register initialization to runtime resume,
 - minor code cleanup,
 - bug fixes.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
[WiP] Samsung FIMG-3DSE DRM driver work in progress

Added changes:
 - disabled debugging messages,
 - added support for watchpoint registers,
 - moved verbose debugging functions under separate ifdefs,
 - fixed software reset handling,
 - separated cache flushing from pipeline flushing,
 - fixed handling of idle,
 - bug fixes.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>