exynos-drm: hack in extra resolution support

exynos-drm drops certain modes from Exynos4412 setups due to a mixer
bug.

Instead of dropping such modes, we apply a workaround:
Massaging of the values in the way implemented in this patch makes the
system usable, although it is missing the top row of pixels, and the
rightmost column too.

However this can't be applied to all modes, so we filter a few out
that are known bad.
drm/exynos: configurable overscan compensation

Add some DRM properties to enable overscan compensation.
The properties are badly named "underscan" for consistency
with Radeon driver.

The obvious way to compensate for overscan is just to scale the
image down a bit, creating some black borders around the edge,
which we would expect not to be visible.

Unfortunately the mixer can't scale the images, so we instead
slightly reduce the resolution of the image, and display it
in the centre of the mixer output, creating black borders.

When userspace sets these properties, it is also expected to
comply with the lower resolution that is generated as a result,
and submit appropriately sized buffers for display.
drm_crtc: Remove sanity checks from crtc setup

When using cropped underscan we need a frame buffer smaller than the crtc.  This patch defeats the checks that prevent that from happening.
exynos-drm: mixer: Obey buffer pitch

The exynos mixer's "span" should really use pitch - not width.
Needed for overscan compensation to work right.
drm/exynos: accept flip requests when the crtc is off

Previously, we were rejecting flip requests when off. But
Mali does not like being told 'no' for an answer, and ignores it.
So let's honour these requests as if the display were powered up.
v4l2-core: Round up in clamp_align

In most use cases, it's easyer to deal with a larger size and crop it,
then a smaller video size.

Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
s5p-fimc: Align imagesize to row size for tiled formats

For tiled format, we need to allocated a multiple of the row size. A good
example is for 1280x720, wich get adjusted to 1280x736. In tiles this mean Y
plane is 20x23 and UV plane 20x12. Because of the rounding, the previous code
would only have enough space to fit half of the last row.

dsd: most of the original 3.8 version of this patch was already included
upstream in fa8880bece7321d61a7a5e7bf4b67832071ee047
s5p-fimc: Use roundup() instead of ALIGN()

The size of a row is not always a power of two, so ALIGN cannot be used.
MFC: use CMA for memory banks

Maybe due to requesting large allocations, the default fixed
allocation code fails due to lack of vmalloc space.

Our 3.8 code also ran these banks as CMA allocations, presumably
to allow other users of that memory when MFC is not being used.

Enabling CMA here is easier said than done:

Contiguous regions must be defined at early boot time (before
cma_init_reserved_areas is called), but at that time, we don't have
the struct device that we'll use for MFC.

To cope with this, we just create a parentless device at early boot
time, and then pick that one up later when the real mfc driver is
probed.

We also ignore the base address given in the DT and just go for
a dynamic allocation. However we make sure the allocations go in
low memory, because these allocations are used extensively in the kernel
as well as userspace.
FIMC/MFC: static device node names

Hardcode these numbers to match the layout in the 3.8 kernel:
 s5p-fimc-md: Registered fimc.0.m2m as /dev/video10
 s5p-fimc-md: Registered fimc.0.capture as /dev/video11
 s5p-fimc-md: Registered fimc.1.m2m as /dev/video12
 s5p-fimc-md: Registered fimc.1.capture as /dev/video13
 s5p-mfc 13400000.codec: decoder registered as /dev/video8
 s5p-mfc 13400000.codec: encoder registered as /dev/video9
exynos4-is: don't fail if no ports are found

Some boards do not have any accessible camera ports, but would still
like to use the internal color conversion functionality of the FIMC.
Don't fail probe in that situation.
ODROID DT: enable mfc

Try to configure the MFC CMA reservation to allow up to 4 contexts
running HD videos. Bank configurations are:

Left MFC: 256, Right MFC 128.

The clock is setup like it is done in the hardkernel kernel.
Revert "[media] s5p-mfc: Don't allocate codec buffers on STREAMON"

This reverts commit 9d87e8375d2f9974130d20bac907de4716be4f22.

That commit adds a s5p_mfc_close_mfc_inst call to output_reqbufs, which
is part of the codepath hit when you start to play a video with gstreamer.

This causes the driver to ask the hardware to close the instance, however
at this point we haven't opened an instance yet, so the hardware generates
an error interrupt.
s5p-mfc: Use decode status instead of display status on MFCv5

Commit 90c0ae50097 changed how the frame_type of a decoded frame
gets determined, by switching from the get_dec_frame_type to
get_disp_frame_type operation. Unfortunately it seems that on MFC v5 the
result of get_disp_frame_type is always 0 (no display) when decoding
(tested with H264), resulting in no frame ever being output from the
decoder.

This patch reverts MFC v5 to the previous behaviour while keeping the
new behaviour for v6 and up.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Mali + ump + umplock r4p0-00rel0
Mali + ump + umplock build integration
Mali: update for new shrinker API
Mali: initialize from device tree

Based on work by Alban Browaeys.
Mali: ODROID platform integration
UMP: ODROID platform integration