Skip to content

Commit f26b934

Browse files
Andrzej Hajdadaeinki
authored andcommitted
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>
1 parent 2701932 commit f26b934

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/exynos/exynos_drm_drv.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ struct exynos_drm_crtc_ops {
154154
void (*clock_enable)(struct exynos_drm_crtc *crtc, bool enable);
155155
};
156156

157+
struct exynos_drm_clk {
158+
void (*enable)(struct exynos_drm_clk *clk, bool enable);
159+
};
160+
157161
/*
158162
* Exynos specific crtc structure.
159163
*
@@ -182,8 +186,16 @@ struct exynos_drm_crtc {
182186
atomic_t pending_update;
183187
const struct exynos_drm_crtc_ops *ops;
184188
void *ctx;
189+
struct exynos_drm_clk *pipe_clk;
185190
};
186191

192+
static inline void exynos_drm_pipe_clk_enable(struct exynos_drm_crtc *crtc,
193+
bool enable)
194+
{
195+
if (crtc->pipe_clk)
196+
crtc->pipe_clk->enable(crtc->pipe_clk, enable);
197+
}
198+
187199
struct exynos_drm_g2d_private {
188200
struct device *dev;
189201
struct list_head inuse_cmdlist;

0 commit comments

Comments
 (0)