WIP: drm/tegra: Add 3D support

This is a preliminary patch that adds support for 3D support on top of
Terje's and Arto's host1x and gr2d patches.

There are a few things that still need to be resolved before this can be
applied. I haven't been able to test Tegra30 support so it'd be good if
somebody with hardware could give it a try. I can probably arrange to
test it on a CardHu if nobody else steps up, but it'll take a while
until I get that setup. Looking at the downstream kernels indicates that
Tegra30 has a second clock and powergate domain and if those really are
required then this patch won't work on Tegra30.

One other important piece that is missing is a list of address registers
to feed to the firewall so that submitted command streams can be checked
for validity. I've already talked to Terje about that, but it seems like
it may turn out to be problematic. What with NVIDIA not wanting to
provide the register descriptions and all that. We'll need to resolve
this in some way before this patch can be merged.

Finally I want to refactor some of the commonalities between gr2d and
gr3d so that they can share more code.

If people want to give this a spin, there are some very basic test
programs available here[0]. The tests from the grate repository are
probably the most useful right now since they test both the gr2d and
gr3d modules and therefore can be used to verify that this patch
actually works.

[0]: https://github.com/organizations/grate-driver

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
drm/tegra: Add support for tiled buffer objects

The gr2d and gr3d engines work more efficiently on buffers with a tiled
memory layout. Allow created buffers to be marked as tiled so that the
display controller can scan them out properly.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
[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>
ARM: dts: s3c6410-mini6410: Enable 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>