Message ID | 20201124124538.660710-73-tomi.valkeinen@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Convert DSI code to use drm_mipi_dsi and drm_panel | expand |
Hi Tomi, Thank you for the patch. On Tue, Nov 24, 2020 at 02:45:30PM +0200, Tomi Valkeinen wrote: > Clean up the code by inlining dsi_enable_video_outputs and > dsi_disable_video_outputs functions. > > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > drivers/gpu/drm/omapdrm/dss/dsi.c | 55 +++++++++++++------------------ > 1 file changed, 22 insertions(+), 33 deletions(-) > > diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c > index a01e09c9b477..4f79d6c664ff 100644 > --- a/drivers/gpu/drm/omapdrm/dss/dsi.c > +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c > @@ -3336,20 +3336,6 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int vc) > dsi_display_uninit_dispc(dsi); > } > > -static void dsi_disable_video_outputs(struct omap_dss_device *dssdev) > -{ > - struct dsi_data *dsi = to_dsi_data(dssdev); > - > - dsi_bus_lock(dsi); > - dsi->video_enabled = false; > - > - dsi_disable_video_output(dssdev, VC_VIDEO); > - > - dsi_display_disable(dssdev); > - > - dsi_bus_unlock(dsi); > -} > - > static void dsi_update_screen_dispc(struct dsi_data *dsi) > { > unsigned int bytespp; > @@ -3791,23 +3777,6 @@ static void dsi_display_enable(struct omap_dss_device *dssdev) > _dsi_display_enable(dsi); > } > > -static void dsi_enable_video_outputs(struct omap_dss_device *dssdev) > -{ > - struct dsi_data *dsi = to_dsi_data(dssdev); > - > - dsi_bus_lock(dsi); > - > - dsi_display_enable(dssdev); > - > - dsi_enable_video_output(dssdev, VC_VIDEO); > - > - dsi->video_enabled = true; > - > - dsi_set_ulps_auto(dsi, true); > - > - dsi_bus_unlock(dsi); > -} > - > static void _dsi_display_disable(struct dsi_data *dsi, > bool disconnect_lanes, bool enter_ulps) > { > @@ -4969,15 +4938,35 @@ static void dsi_bridge_mode_set(struct drm_bridge *bridge, > static void dsi_bridge_enable(struct drm_bridge *bridge) > { > struct dsi_data *dsi = drm_bridge_to_dsi(bridge); > + struct omap_dss_device *dssdev = &dsi->output; > > - dsi_enable_video_outputs(&dsi->output); > + dsi_bus_lock(dsi); > + > + dsi_display_enable(dssdev); > + > + dsi_enable_video_output(dssdev, VC_VIDEO); > + > + dsi->video_enabled = true; > + > + dsi_set_ulps_auto(dsi, true); > + > + dsi_bus_unlock(dsi); > } > > static void dsi_bridge_disable(struct drm_bridge *bridge) > { > struct dsi_data *dsi = drm_bridge_to_dsi(bridge); > + struct omap_dss_device *dssdev = &dsi->output; > + > + dsi_bus_lock(dsi); > + > + dsi->video_enabled = false; > + > + dsi_disable_video_output(dssdev, VC_VIDEO); > > - dsi_disable_video_outputs(&dsi->output); > + dsi_display_disable(dssdev); > + > + dsi_bus_unlock(dsi); > } > > static const struct drm_bridge_funcs dsi_bridge_funcs = {
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index a01e09c9b477..4f79d6c664ff 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -3336,20 +3336,6 @@ static void dsi_disable_video_output(struct omap_dss_device *dssdev, int vc) dsi_display_uninit_dispc(dsi); } -static void dsi_disable_video_outputs(struct omap_dss_device *dssdev) -{ - struct dsi_data *dsi = to_dsi_data(dssdev); - - dsi_bus_lock(dsi); - dsi->video_enabled = false; - - dsi_disable_video_output(dssdev, VC_VIDEO); - - dsi_display_disable(dssdev); - - dsi_bus_unlock(dsi); -} - static void dsi_update_screen_dispc(struct dsi_data *dsi) { unsigned int bytespp; @@ -3791,23 +3777,6 @@ static void dsi_display_enable(struct omap_dss_device *dssdev) _dsi_display_enable(dsi); } -static void dsi_enable_video_outputs(struct omap_dss_device *dssdev) -{ - struct dsi_data *dsi = to_dsi_data(dssdev); - - dsi_bus_lock(dsi); - - dsi_display_enable(dssdev); - - dsi_enable_video_output(dssdev, VC_VIDEO); - - dsi->video_enabled = true; - - dsi_set_ulps_auto(dsi, true); - - dsi_bus_unlock(dsi); -} - static void _dsi_display_disable(struct dsi_data *dsi, bool disconnect_lanes, bool enter_ulps) { @@ -4969,15 +4938,35 @@ static void dsi_bridge_mode_set(struct drm_bridge *bridge, static void dsi_bridge_enable(struct drm_bridge *bridge) { struct dsi_data *dsi = drm_bridge_to_dsi(bridge); + struct omap_dss_device *dssdev = &dsi->output; - dsi_enable_video_outputs(&dsi->output); + dsi_bus_lock(dsi); + + dsi_display_enable(dssdev); + + dsi_enable_video_output(dssdev, VC_VIDEO); + + dsi->video_enabled = true; + + dsi_set_ulps_auto(dsi, true); + + dsi_bus_unlock(dsi); } static void dsi_bridge_disable(struct drm_bridge *bridge) { struct dsi_data *dsi = drm_bridge_to_dsi(bridge); + struct omap_dss_device *dssdev = &dsi->output; + + dsi_bus_lock(dsi); + + dsi->video_enabled = false; + + dsi_disable_video_output(dssdev, VC_VIDEO); - dsi_disable_video_outputs(&dsi->output); + dsi_display_disable(dssdev); + + dsi_bus_unlock(dsi); } static const struct drm_bridge_funcs dsi_bridge_funcs = {
Clean up the code by inlining dsi_enable_video_outputs and dsi_disable_video_outputs functions. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> --- drivers/gpu/drm/omapdrm/dss/dsi.c | 55 +++++++++++++------------------ 1 file changed, 22 insertions(+), 33 deletions(-)