DNS Instantiate vidi driver

Change-Id: Ifef973e2d13d7085697d6fb7b794d82a3b4baaae
drm/exynos: Remove apply manager callback

This patch removes the apply() manager callback in favor of putting the
relevant commits in the individual drivers. This will mitigate some of
the difference between the suspend/resume path and the dpms path

Change-Id: I7d3ea0ef935bc374f44bdb9b6e7efa512eb5bbb4
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Remove dpms link between encoder/connector

This patch removes the call from encoder dpms into connector dpms (which
will then call back into encoder dpms through the helper function). The
callback is likely to keep connector->dpms in the right state when
initiating dpms from crtc or encoder, but this isn't the right way to do
it. This patch is the first step towards rationalizing power management
in the exynos drm driver.

Change-Id: I64f77cc6d6c57c993a2c054f899557bca757e29c
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Rename display_op power_on to dpms

This patch renames the display_op power_on to dpms to accurately reflect
what the function does.

The side-effect of this patch is that the new hdmi dpms callback is now
invoked twice in the dpms path. This is safe and will be dealt with when
the exynos_drm shim goes away.

Change-Id: I49d2ad045a8204d7a669ecb58b22811b12153b6a
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Don't keep dpms state in encoder

This patch removes the dpms state tracking in encoder. This
state is at best confusing and at worst incorrect since the display
drivers can turn on and off without propagating the value.

Change-Id: I1bbdd8afb8da64cb74d72a762cbf81c236f62faa
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Use unsigned long for possible_crtcs

Change all instances of possible_crtcs in the exynos drm driver to be
unsigned long. This matches the type used in the drm layer.

BUG=None
TEST=Compiles, no regressions on snow

Change-Id: I82bbd9d5020a169394e0d859b5aa283364206be0
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58208
drm/exynos: Split manager/display/subdrv

This patch splits display and manager from subdrv. The result is that
crtc functions can directly call into manager callbacks and encoder
functions can directly call into display callbacks. This will allow
us to remove the exynos_drm_hdmi shim and support mixer/hdmi & fimd/dp
with common code.

Signed-off-by: Sean Paul <seanpaul@chromium.org>

Change-Id: I337432f3cff86bd0adf685c2bb412788e86c984d
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: hdmi: remove the i2c drivers and use devtree

The i2c client was previously being passed into the hdmi driver via a
dedicated i2c driver, and then a global variable. This patch removes all
of that and just uses the device tree to get the i2c_client. This patch
also properly references the client so we don't lose it before we're
done with it.

Change-Id: Ic5d31cf8d652f0f2943d5d9f53a917b09de76bbd
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Remove exynos_drm_hdmi shim

This patch trims exynos_drm_hdmi out of the driver. The reason it
existed in the first place was to make up for the mixture of
display/overlay/manager ops being spread across hdmi and mixer. With
that code now rationalized, mixer and hdmi map directly to
exynos_drm_crtc and exynos_drm_encoder, respectively. Since there is a
1:1 mapping, we no longer need this layer.

Change-Id: Ied88631eff8c85b15c24d0ab721c6843510b3171
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Use drm_mode_copy to copy modes

This patch changes the manual copying of mode to adjusted_mode in
mode_fixup to use drm_mode_copy instead of handling things manually.

BUG=None
TEST=No regressions

Change-Id: Id0daa5a472981aeca69a0522c7939fcc8bcd9981
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/58225
drm/exynos: Disable unused crtc planes from crtc

This patch moves the code which disables unused crtc planes from the
encoder to the crtc. Since there is a 1:1 encoder/crtc mapping in
exynos, the only valid crtc change the pre-existing code could catch is
disconnecting an active crtc from the encoder. Thus it is functionally
equivalent to just disable all planes attached to a crtc when the crtc
is disabled.

Change-Id: I63dd231c969808e962eb3bdd568f86d9250bd69f
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Add mode_set manager operation

This patch adds a mode_set callback to the manager operations which
sets the crtc's current mode to the manager driver.

Change-Id: I4795b157edd303b839c937dbac5caa5430fce8a2
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Implement mode_fixup manager operation

This patch adds a new manager callback for mode_fixup and pipes it
through exynos_drm_crtc.

Change-Id: If0c64638b960b11ae9c40ddb036eba31d5a91964
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Use mode_set to configure fimd

This patch uses the mode passed into mode_set to configure fimd instead
of directly using the panel from context. This will allow us to move
the exynos_drm_display implementation from fimd into the DP driver
where it belongs.

Change-Id: I5735fd5ee861145bf0311b7f45543b75b9b83a10
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Remove unused/useless fimd_context members

This patch removes a few fimd_context members which are either entirely
unused or unneeded.

Change-Id: I4ac5ab1cea19d3f8e97e021475b665f04d41599a
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Move dp driver from video/ to drm/

This patch moves the code from video/ to drm/

Change-Id: Icce103fab1949d0cc1a84a340d321bbe9e8a97e1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Move display implementation into dp

This patch moves the exynos_drm_display implementation from fimd into
the dp driver. This will allow for tighter integration of the dp driver
into the exynos drm driver.

Change-Id: I057b4b899a704ad776f6f8f0a8ab2625e5271dd1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
ARM: dts: Move display-timings node from fimd to dp

This patch moves the display-timings node from fimd to dp to reflect the
device tree bindings change.

Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Implement dpms display callback in DP

This patch implements the dpms display callback for the DP driver.

Change-Id: I17ab59eb1f84f92a5258291f6d80340a409b00ba
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drm/exynos: Clean up FIMD power on/off routines

This patch separates the fimd_activate function into poweron/poweroff
functions to be more consistent with the other drivers in exynos drm. It
also properly cleans up after failures in poweron. The functions have
also been shuffled around such that they are all in the same
spot in the file and poweron/poweroff can be called from the dpms function.

Change-Id: I3a4f242559a6f3f1b2f634450fdbbd196231a790
Signed-off-by: Sean Paul <seanpaul@chromium.org>