drm/exynos: mixer: set correct mode for range of resolutions

With this patch, mixer driver find the correct resolution mode for
the range of resolutions, upto 1080 vertical lines. Resolution will
be categorized to NTSC SD, PAL SD or HD and the correct mode is
set to the mixer configuration register.

Signed-off-by: Rahul Sharma <rahul.sharma@samsung.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Inki Dae <inki.dae@samsung.com>
drm/exynos: do not use generic flags to dumb

This patch removes the use of dumb flags from driver.

As Dave pointed out, the dumb flags are not driver specific
so this should be removed from driver.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
drm/exynos: Debounce HDMI hotplug interrupts

This patch debounces hotplug interrupts generated by the HDMI hotplug
gpio. The reason this is needed is that we get multiple (5) interrupts
every time a monitor is inserted which causes us to needlessly enable
and disable the IP block.

BUG=chromium:220033
TEST=Many hotplugs without any 20s freeze

Change-Id: I2d9a57e0a9206b2739de5234ba024b964afd038c
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/56289
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
[rebased for 3.8 by Daniel Drake, eos-shell #1610]
drm/exynos: wait for the completion of pending page flip

This patch fixes the issue that drm_vblank_get() is failed.

The issus occurs when next page flip request is tried
if previous page flip event wasn't completed yet and then
dpms became off.

So this patch make sure that page flip event is completed
before dpms goes to off.

Signed-off-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>

Conflicts:
	drivers/gpu/drm/exynos/exynos_drm_crtc.c
drm/exynos: power up HDMI before mixer

Testing on Exynos4412, when changing screen resolution under GNOME/X11,
first DPMS is set to OFF via drm_mode_obj_set_property_ioctl.

This is done via drm_hdmi_dpms which powers down the mixer then the
HDMI component.

Then the mode change happens. We then see this call chain, powering things
back on:
 exynos_drm_crtc_commit
  exynos_drm_crtc_dpms
   exynos_drm_encoder_crtc_dpms
    drm_hdmi_dpms

And at this point, drm_hdmi_dpms first powers on the mixer, then the
HDMI component.

Strangely enough, this works fine on the first resolution change, but
on the second it hangs in mixer_poweron() in:
	mixer_reg_write(res, MXR_INT_EN, ctx->int_en);

Through some experiments I determined that this register write will
hang the machine here unless the hdmi_resources.hdmi clock is running.
I can't explain why there is a difference between the first and second
time; I did check that the underlying clock gating register has the
same value in both cases.

Anyway, the mixer clearly has some kind of dependency on the HDMI
component, so lets make sure we power that up first.

Signed-off-by: Daniel Drake <drake@endlessm.com>
media/mfc: use shipped firmware paths

linux-firmware ships these files in /lib/firmware/s5p-mfc.
Use these paths.
Revert "HDMI_DDC I2C2 bus uses GPIO based bitbanging"

This reverts commit 98b6c57b1d1a92223044762577eac4a682f48f27.

The hardware offers us I2C capabilities directly. Why drive it
as a GPIO and use CPU bit-banging to convert it back to I2C?
http://forum.odroid.com/viewtopic.php?f=8&t=3850
exynos-drm: hack in timing fixes for 1024x768

As discussed at
http://article.gmane.org/gmane.linux.kernel.samsung-soc/25135
the 1024x768 timings don't quite work out of the box, for unknown reasons.

However, 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. (to be fixed later, hopefully)

Fix up 1280x1024 in the same way.

[endlessm/eos-shell#1592]