提交 f81b0fd4 编写于 作者: L Laurent Pinchart 提交者: Tomi Valkeinen

drm: omapdrm: dsi: Don't pass channel to dispc init/uninit functions

The dsi_display_init_dispc() and dsi_display_uninit_dispc() functions
take a channel argument that is reduntant as it is always identical to
the dsi->output.dispc_channel. Remove the argument and use the field
directly in the functions to avoid misuse.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: NSebastian Reichel <sebastian.reichel@collabora.co.uk>
上级 4600ea9c
...@@ -215,10 +215,8 @@ struct dsi_reg { u16 module; u16 idx; }; ...@@ -215,10 +215,8 @@ struct dsi_reg { u16 module; u16 idx; };
typedef void (*omap_dsi_isr_t) (void *arg, u32 mask); typedef void (*omap_dsi_isr_t) (void *arg, u32 mask);
struct dsi_data; struct dsi_data;
static int dsi_display_init_dispc(struct dsi_data *dsi, static int dsi_display_init_dispc(struct dsi_data *dsi);
enum omap_channel channel); static void dsi_display_uninit_dispc(struct dsi_data *dsi);
static void dsi_display_uninit_dispc(struct dsi_data *dsi,
enum omap_channel channel);
static int dsi_vc_send_null(struct dsi_data *dsi, int channel); static int dsi_vc_send_null(struct dsi_data *dsi, int channel);
...@@ -3845,7 +3843,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) ...@@ -3845,7 +3843,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
return -ENODEV; return -ENODEV;
} }
r = dsi_display_init_dispc(dsi, dispc_channel); r = dsi_display_init_dispc(dsi);
if (r) if (r)
goto err_init_dispc; goto err_init_dispc;
...@@ -3895,7 +3893,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel) ...@@ -3895,7 +3893,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
dsi_vc_enable(dsi, channel, false); dsi_vc_enable(dsi, channel, false);
} }
err_pix_fmt: err_pix_fmt:
dsi_display_uninit_dispc(dsi, dispc_channel); dsi_display_uninit_dispc(dsi);
err_init_dispc: err_init_dispc:
return r; return r;
} }
...@@ -3918,7 +3916,7 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel ...@@ -3918,7 +3916,7 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int channel
dss_mgr_disable(dispc_channel); dss_mgr_disable(dispc_channel);
dsi_display_uninit_dispc(dsi, dispc_channel); dsi_display_uninit_dispc(dsi);
} }
static void dsi_update_screen_dispc(struct dsi_data *dsi) static void dsi_update_screen_dispc(struct dsi_data *dsi)
...@@ -4104,9 +4102,9 @@ static int dsi_configure_dispc_clocks(struct dsi_data *dsi) ...@@ -4104,9 +4102,9 @@ static int dsi_configure_dispc_clocks(struct dsi_data *dsi)
return 0; return 0;
} }
static int dsi_display_init_dispc(struct dsi_data *dsi, static int dsi_display_init_dispc(struct dsi_data *dsi)
enum omap_channel channel)
{ {
enum omap_channel channel = dsi->output.dispc_channel;
int r; int r;
dss_select_lcd_clk_source(dsi->dss, channel, dsi->module_id == 0 ? dss_select_lcd_clk_source(dsi->dss, channel, dsi->module_id == 0 ?
...@@ -4167,9 +4165,10 @@ static int dsi_display_init_dispc(struct dsi_data *dsi, ...@@ -4167,9 +4165,10 @@ static int dsi_display_init_dispc(struct dsi_data *dsi,
return r; return r;
} }
static void dsi_display_uninit_dispc(struct dsi_data *dsi, static void dsi_display_uninit_dispc(struct dsi_data *dsi)
enum omap_channel channel)
{ {
enum omap_channel channel = dsi->output.dispc_channel;
if (dsi->mode == OMAP_DSS_DSI_CMD_MODE) if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
dss_mgr_unregister_framedone_handler(channel, dss_mgr_unregister_framedone_handler(channel,
dsi_framedone_irq_callback, dsi); dsi_framedone_irq_callback, dsi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册