[PATCH 40/48] drm: omapdrm: dsi: Don't pass channel to dispc init/uninit functions
Sebastian Reichel
sre at kernel.org
Tue Oct 17 20:13:42 UTC 2017
Hi,
On Fri, Oct 13, 2017 at 05:59:36PM +0300, Laurent Pinchart wrote:
> 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: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.co.uk>
-- Sebastian
> drivers/gpu/drm/omapdrm/dss/dsi.c | 21 ++++++++++-----------
> 1 file changed, 10 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
> index 9be26eb262f3..d1cc036ed280 100644
> --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
> +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
> @@ -217,10 +217,8 @@ struct dsi_reg { u16 module; u16 idx; };
> typedef void (*omap_dsi_isr_t) (void *arg, u32 mask);
> struct dsi_data;
>
> -static int dsi_display_init_dispc(struct dsi_data *dsi,
> - enum omap_channel channel);
> -static void dsi_display_uninit_dispc(struct dsi_data *dsi,
> - enum omap_channel channel);
> +static int dsi_display_init_dispc(struct dsi_data *dsi);
> +static void dsi_display_uninit_dispc(struct dsi_data *dsi);
>
> static int dsi_vc_send_null(struct dsi_data *dsi, int channel);
>
> @@ -3847,7 +3845,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
> return -ENODEV;
> }
>
> - r = dsi_display_init_dispc(dsi, dispc_channel);
> + r = dsi_display_init_dispc(dsi);
> if (r)
> goto err_init_dispc;
>
> @@ -3897,7 +3895,7 @@ static int dsi_enable_video_output(struct omap_dss_device *dssdev, int channel)
> dsi_vc_enable(dsi, channel, false);
> }
> err_pix_fmt:
> - dsi_display_uninit_dispc(dsi, dispc_channel);
> + dsi_display_uninit_dispc(dsi);
> err_init_dispc:
> return r;
> }
> @@ -3920,7 +3918,7 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int 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)
> @@ -4106,9 +4104,9 @@ static int dsi_configure_dispc_clocks(struct dsi_data *dsi)
> return 0;
> }
>
> -static int dsi_display_init_dispc(struct dsi_data *dsi,
> - enum omap_channel channel)
> +static int dsi_display_init_dispc(struct dsi_data *dsi)
> {
> + enum omap_channel channel = dsi->output.dispc_channel;
> int r;
>
> dss_select_lcd_clk_source(dsi->dss, channel, dsi->module_id == 0 ?
> @@ -4169,9 +4167,10 @@ static int dsi_display_init_dispc(struct dsi_data *dsi,
> return r;
> }
>
> -static void dsi_display_uninit_dispc(struct dsi_data *dsi,
> - enum omap_channel channel)
> +static void dsi_display_uninit_dispc(struct dsi_data *dsi)
> {
> + enum omap_channel channel = dsi->output.dispc_channel;
> +
> if (dsi->mode == OMAP_DSS_DSI_CMD_MODE)
> dss_mgr_unregister_framedone_handler(channel,
> dsi_framedone_irq_callback, dsi);
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20171017/3d2e992a/attachment.sig>
More information about the dri-devel
mailing list