mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
2701932899
commit
f26b9343f5
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue