diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2018-02-28 15:58:13 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2018-09-03 16:13:26 +0300 |
commit | b93109d7dc9e15649e1cf18281f02d8b4a102584 (patch) | |
tree | 5250492e53cb03bd2b780489f97982bbfbae7f73 /drivers/gpu/drm/omapdrm/dss/dsi.c | |
parent | e10bd354ad79d2772842300c85ffd1a49722cfae (diff) |
drm/omap: dss: Move common device operations to common structure
The various types of omapdss_*_ops structures define multiple operations
that are not specific to a bus type. To simplify the code and remove
dependencies on specific bus types move those operations to a common
structure. Operations that are specific to a bus type are kept in the
specialized ops structures.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dsi.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/dss/dsi.c | 50 |
1 files changed, 26 insertions, 24 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c index 74467b308721..3cc91e973f01 100644 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c @@ -5000,43 +5000,45 @@ static void dsi_disconnect(struct omap_dss_device *dssdev, dss_mgr_disconnect(&dsi->output, dssdev); } -static const struct omapdss_dsi_ops dsi_ops = { +static const struct omap_dss_device_ops dsi_ops = { .connect = dsi_connect, .disconnect = dsi_disconnect, + .enable = dsi_display_enable, - .bus_lock = dsi_bus_lock, - .bus_unlock = dsi_bus_unlock, + .dsi = { + .bus_lock = dsi_bus_lock, + .bus_unlock = dsi_bus_unlock, - .enable = dsi_display_enable, - .disable = dsi_display_disable, + .disable = dsi_display_disable, - .enable_hs = dsi_vc_enable_hs, + .enable_hs = dsi_vc_enable_hs, - .configure_pins = dsi_configure_pins, - .set_config = dsi_set_config, + .configure_pins = dsi_configure_pins, + .set_config = dsi_set_config, - .enable_video_output = dsi_enable_video_output, - .disable_video_output = dsi_disable_video_output, + .enable_video_output = dsi_enable_video_output, + .disable_video_output = dsi_disable_video_output, - .update = dsi_update, + .update = dsi_update, - .enable_te = dsi_enable_te, + .enable_te = dsi_enable_te, - .request_vc = dsi_request_vc, - .set_vc_id = dsi_set_vc_id, - .release_vc = dsi_release_vc, + .request_vc = dsi_request_vc, + .set_vc_id = dsi_set_vc_id, + .release_vc = dsi_release_vc, - .dcs_write = dsi_vc_dcs_write, - .dcs_write_nosync = dsi_vc_dcs_write_nosync, - .dcs_read = dsi_vc_dcs_read, + .dcs_write = dsi_vc_dcs_write, + .dcs_write_nosync = dsi_vc_dcs_write_nosync, + .dcs_read = dsi_vc_dcs_read, - .gen_write = dsi_vc_generic_write, - .gen_write_nosync = dsi_vc_generic_write_nosync, - .gen_read = dsi_vc_generic_read, + .gen_write = dsi_vc_generic_write, + .gen_write_nosync = dsi_vc_generic_write_nosync, + .gen_read = dsi_vc_generic_read, - .bta_sync = dsi_vc_send_bta_sync, + .bta_sync = dsi_vc_send_bta_sync, - .set_max_rx_packet_size = dsi_vc_set_max_rx_packet_size, + .set_max_rx_packet_size = dsi_vc_set_max_rx_packet_size, + }, }; static void dsi_init_output(struct dsi_data *dsi) @@ -5050,7 +5052,7 @@ static void dsi_init_output(struct dsi_data *dsi) out->output_type = OMAP_DISPLAY_TYPE_DSI; out->name = dsi->module_id == 0 ? "dsi.0" : "dsi.1"; out->dispc_channel = dsi_get_channel(dsi); - out->ops.dsi = &dsi_ops; + out->ops = &dsi_ops; out->owner = THIS_MODULE; omapdss_register_output(out); |