diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2017-02-07 12:16:20 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-02-07 23:47:26 +0300 |
commit | 64b0e1d6c6a14dcbf0bde8b98207fc6b3569ce50 (patch) | |
tree | f3707e01266a5ff1db9d4848e6e2b510b77b4003 /drivers/gpu/drm/exynos/exynos_hdmi.c | |
parent | 82308e27a96de176f0ded76883d14f0fead47508 (diff) | |
download | linux-64b0e1d6c6a14dcbf0bde8b98207fc6b3569ce50.tar.xz |
drm: exynos: use vblank hooks in struct drm_crtc_funcs
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
As the result, exynos_drm_crtc_enable[disable]_vblank() become static
functions. They are moved around a bit to save forward declaration
though. Also while at it, we move one step further to kill
exynos_drm_crtc_from_pipe() completely by updating hdmi_bind() a bit.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-9-git-send-email-shawnguo@kernel.org
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_hdmi.c')
-rw-r--r-- | drivers/gpu/drm/exynos/exynos_hdmi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 5ed8b1effe71..752e8a3afc79 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -42,7 +42,6 @@ #include <drm/exynos_drm.h> -#include "exynos_drm_drv.h" #include "exynos_drm_crtc.h" #define HOTPLUG_DEBOUNCE_MS 1100 @@ -1657,6 +1656,8 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data) struct drm_device *drm_dev = data; struct hdmi_context *hdata = dev_get_drvdata(dev); struct drm_encoder *encoder = &hdata->encoder; + struct exynos_drm_crtc *exynos_crtc; + struct drm_crtc *crtc; int ret, pipe; hdata->drm_dev = drm_dev; @@ -1668,7 +1669,9 @@ static int hdmi_bind(struct device *dev, struct device *master, void *data) hdata->phy_clk.enable = hdmiphy_clk_enable; - exynos_drm_crtc_from_pipe(drm_dev, pipe)->pipe_clk = &hdata->phy_clk; + crtc = drm_crtc_from_index(drm_dev, pipe); + exynos_crtc = to_exynos_crtc(crtc); + exynos_crtc->pipe_clk = &hdata->phy_clk; encoder->possible_crtcs = 1 << pipe; |