Commit 7c009851 authored by Tomi Valkeinen's avatar Tomi Valkeinen

drm/omap: add writeback funcs to dispc_ops

Add writeback specific dispc functions to dispc_ops so that omapdrm can
use them.  Also move 'enum dss_writeback_channel' to the public
omapdss.h for omapdrm.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 13bb1601
...@@ -715,7 +715,7 @@ static u32 dispc_mgr_get_sync_lost_irq(struct dispc_device *dispc, ...@@ -715,7 +715,7 @@ static u32 dispc_mgr_get_sync_lost_irq(struct dispc_device *dispc,
return mgr_desc[channel].sync_lost_irq; return mgr_desc[channel].sync_lost_irq;
} }
u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc) static u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc)
{ {
return DISPC_IRQ_FRAMEDONEWB; return DISPC_IRQ_FRAMEDONEWB;
} }
...@@ -750,12 +750,12 @@ static void dispc_mgr_go(struct dispc_device *dispc, enum omap_channel channel) ...@@ -750,12 +750,12 @@ static void dispc_mgr_go(struct dispc_device *dispc, enum omap_channel channel)
mgr_fld_write(dispc, channel, DISPC_MGR_FLD_GO, 1); mgr_fld_write(dispc, channel, DISPC_MGR_FLD_GO, 1);
} }
bool dispc_wb_go_busy(struct dispc_device *dispc) static bool dispc_wb_go_busy(struct dispc_device *dispc)
{ {
return REG_GET(dispc, DISPC_CONTROL2, 6, 6) == 1; return REG_GET(dispc, DISPC_CONTROL2, 6, 6) == 1;
} }
void dispc_wb_go(struct dispc_device *dispc) static void dispc_wb_go(struct dispc_device *dispc)
{ {
enum omap_plane_id plane = OMAP_DSS_WB; enum omap_plane_id plane = OMAP_DSS_WB;
bool enable, go; bool enable, go;
...@@ -2771,7 +2771,7 @@ static int dispc_ovl_setup(struct dispc_device *dispc, ...@@ -2771,7 +2771,7 @@ static int dispc_ovl_setup(struct dispc_device *dispc,
return r; return r;
} }
int dispc_wb_setup(struct dispc_device *dispc, static int dispc_wb_setup(struct dispc_device *dispc,
const struct omap_dss_writeback_info *wi, const struct omap_dss_writeback_info *wi,
bool mem_to_mem, const struct videomode *vm, bool mem_to_mem, const struct videomode *vm,
enum dss_writeback_channel channel_in) enum dss_writeback_channel channel_in)
...@@ -2854,6 +2854,11 @@ int dispc_wb_setup(struct dispc_device *dispc, ...@@ -2854,6 +2854,11 @@ int dispc_wb_setup(struct dispc_device *dispc,
return 0; return 0;
} }
static bool dispc_has_writeback(struct dispc_device *dispc)
{
return dispc->feat->has_writeback;
}
static int dispc_ovl_enable(struct dispc_device *dispc, static int dispc_ovl_enable(struct dispc_device *dispc,
enum omap_plane_id plane, bool enable) enum omap_plane_id plane, bool enable)
{ {
...@@ -4709,6 +4714,12 @@ static const struct dispc_ops dispc_ops = { ...@@ -4709,6 +4714,12 @@ static const struct dispc_ops dispc_ops = {
.ovl_enable = dispc_ovl_enable, .ovl_enable = dispc_ovl_enable,
.ovl_setup = dispc_ovl_setup, .ovl_setup = dispc_ovl_setup,
.ovl_get_color_modes = dispc_ovl_get_color_modes, .ovl_get_color_modes = dispc_ovl_get_color_modes,
.wb_get_framedone_irq = dispc_wb_get_framedone_irq,
.wb_setup = dispc_wb_setup,
.has_writeback = dispc_has_writeback,
.wb_go_busy = dispc_wb_go_busy,
.wb_go = dispc_wb_go,
}; };
/* DISPC HW IP initialisation */ /* DISPC HW IP initialisation */
......
...@@ -102,17 +102,6 @@ enum dss_dsi_content_type { ...@@ -102,17 +102,6 @@ enum dss_dsi_content_type {
DSS_DSI_CONTENT_GENERIC, DSS_DSI_CONTENT_GENERIC,
}; };
enum dss_writeback_channel {
DSS_WB_LCD1_MGR = 0,
DSS_WB_LCD2_MGR = 1,
DSS_WB_TV_MGR = 2,
DSS_WB_OVL0 = 3,
DSS_WB_OVL1 = 4,
DSS_WB_OVL2 = 5,
DSS_WB_OVL3 = 6,
DSS_WB_LCD3_MGR = 7,
};
enum dss_clk_source { enum dss_clk_source {
DSS_CLK_SRC_FCK = 0, DSS_CLK_SRC_FCK = 0,
...@@ -448,16 +437,6 @@ int dispc_mgr_get_clock_div(struct dispc_device *dispc, ...@@ -448,16 +437,6 @@ int dispc_mgr_get_clock_div(struct dispc_device *dispc,
struct dispc_clock_info *cinfo); struct dispc_clock_info *cinfo);
void dispc_set_tv_pclk(struct dispc_device *dispc, unsigned long pclk); void dispc_set_tv_pclk(struct dispc_device *dispc, unsigned long pclk);
u32 dispc_wb_get_framedone_irq(struct dispc_device *dispc);
bool dispc_wb_go_busy(struct dispc_device *dispc);
void dispc_wb_go(struct dispc_device *dispc);
void dispc_wb_set_channel_in(struct dispc_device *dispc,
enum dss_writeback_channel channel);
int dispc_wb_setup(struct dispc_device *dispc,
const struct omap_dss_writeback_info *wi,
bool mem_to_mem, const struct videomode *vm,
enum dss_writeback_channel channel_in);
#ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS #ifdef CONFIG_OMAP2_DSS_COLLECT_IRQ_STATS
static inline void dss_collect_irq_stats(u32 irqstatus, unsigned int *irq_arr) static inline void dss_collect_irq_stats(u32 irqstatus, unsigned int *irq_arr)
{ {
......
...@@ -626,6 +626,17 @@ omapdss_of_find_source_for_first_ep(struct device_node *node); ...@@ -626,6 +626,17 @@ omapdss_of_find_source_for_first_ep(struct device_node *node);
struct device_node *dss_of_port_get_parent_device(struct device_node *port); struct device_node *dss_of_port_get_parent_device(struct device_node *port);
u32 dss_of_port_get_port_number(struct device_node *port); u32 dss_of_port_get_port_number(struct device_node *port);
enum dss_writeback_channel {
DSS_WB_LCD1_MGR = 0,
DSS_WB_LCD2_MGR = 1,
DSS_WB_TV_MGR = 2,
DSS_WB_OVL0 = 3,
DSS_WB_OVL1 = 4,
DSS_WB_OVL2 = 5,
DSS_WB_OVL3 = 6,
DSS_WB_LCD3_MGR = 7,
};
struct dss_mgr_ops { struct dss_mgr_ops {
int (*connect)(struct omap_drm_private *priv, int (*connect)(struct omap_drm_private *priv,
enum omap_channel channel, enum omap_channel channel,
...@@ -732,6 +743,15 @@ struct dispc_ops { ...@@ -732,6 +743,15 @@ struct dispc_ops {
const u32 *(*ovl_get_color_modes)(struct dispc_device *dispc, const u32 *(*ovl_get_color_modes)(struct dispc_device *dispc,
enum omap_plane_id plane); enum omap_plane_id plane);
u32 (*wb_get_framedone_irq)(struct dispc_device *dispc);
int (*wb_setup)(struct dispc_device *dispc,
const struct omap_dss_writeback_info *wi,
bool mem_to_mem, const struct videomode *vm,
enum dss_writeback_channel channel_in);
bool (*has_writeback)(struct dispc_device *dispc);
bool (*wb_go_busy)(struct dispc_device *dispc);
void (*wb_go)(struct dispc_device *dispc);
}; };
struct dispc_device *dispc_get_dispc(struct dss_device *dss); struct dispc_device *dispc_get_dispc(struct dss_device *dss);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment