aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/exynos/exynos_drm_drv.h
diff options
context:
space:
mode:
authorAndrzej Hajda <a.hajda@samsung.com>2016-03-23 14:25:58 +0100
committerInki Dae <daeinki@gmail.com>2016-04-30 01:04:24 +0900
commitf26b9343f582f44ec920474d71b4b2220b1ed9a8 (patch)
treef6cf06166ef5c4da0b83d12791bb53218a4e325d /drivers/gpu/drm/exynos/exynos_drm_drv.h
parentdrm/exynos: add helper to get crtc from pipe (diff)
downloadlinux-dev-f26b9343f582f44ec920474d71b4b2220b1ed9a8.tar.xz
linux-dev-f26b9343f582f44ec920474d71b4b2220b1ed9a8.zip
drm/exynos: add support for pipeline clock to the framework
Components belonging to the same pipeline often requires synchronized clocks. Such clocks are sometimes provided by external clock controller, but they can be also provided by pipeline components. In latter case there should be a way to access them from another component belonging to the same pipeline. This is the case of: - DECON,FIMD -> HDMI and HDMI-PHY clock, - FIMD -> DP and DP clock in FIMD. The latter case has been solved by clock_enable callback in exynos_drm_crtc_ops. This solutin will not work with HDMI path as in this case clock is provided by encoder. This patch provides more generic solution allowing to register pipeline clock during initialization in exynos_drm_crtc structure. This way the clock will be easily accessible from both components. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
Diffstat (limited to 'drivers/gpu/drm/exynos/exynos_drm_drv.h')
-rw-r--r--drivers/gpu/drm/exynos/exynos_drm_drv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.h b/drivers/gpu/drm/exynos/exynos_drm_drv.h
index 481b6022c707..7d84835a8cdf 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_drv.h
+++ b/drivers/gpu/drm/exynos/exynos_drm_drv.h
@@ -154,6 +154,10 @@ struct exynos_drm_crtc_ops {
void (*clock_enable)(struct exynos_drm_crtc *crtc, bool enable);
};
+struct exynos_drm_clk {
+ void (*enable)(struct exynos_drm_clk *clk, bool enable);
+};
+
/*
* Exynos specific crtc structure.
*
@@ -182,8 +186,16 @@ struct exynos_drm_crtc {
atomic_t pending_update;
const struct exynos_drm_crtc_ops *ops;
void *ctx;
+ struct exynos_drm_clk *pipe_clk;
};
+static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc,
+ bool enable)
+{
+ if (crtc->pipe_clk)
+ crtc->pipe_clk->enable(crtc->pipe_clk, enable);
+}
+
struct exynos_drm_g2d_private {
struct device *dev;
struct list_head inuse_cmdlist;