aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_mipi_dsi.h (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-11-13drm/dsi: Do not require .owner field to be setThierry Reding1-1/+5
Drivers now no longer need to set the .owner field. It will be automatically set at registration time. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Resolve MIPI DSI device from phandleThierry Reding1-0/+1
Add a function, of_find_mipi_dsi_device_by_node(), that can be used to resolve a phandle to a MIPI DSI device. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement DCS set_{column,page}_address commandsThierry Reding1-0/+4
Provide small convenience wrappers to set the column and page extents of the frame memory accessed by the host processors. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement DCS {get,set}_pixel_format commandsThierry Reding1-0/+2
Provide small convenience wrappers to query or set the pixel format used by the interface. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement DCS get_power_mode commandThierry Reding1-0/+7
Provide a small convenience wrapper that transmits a DCS get_power_mode command. A set of bitmasks for the mode bits is also provided. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement DCS soft_reset commandThierry Reding1-0/+1
Provide a small convenience wrapper that transmits a DCS soft_reset command. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement DCS nop commandThierry Reding1-0/+1
Provide a small convenience wrapper that transmits a DCS nop command. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Add to DocBook documentationThierry Reding1-2/+14
Integrate the MIPI DSI helpers into DocBook and clean up various kerneldoc warnings. Also add a brief DOC section and clarify some aspects of the mipi_dsi_host struct's .transfer() operation. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement some standard DCS commandsYoungJun Cho1-0/+19
Add helpers for the {enter,exit}_sleep_mode, set_display_{on,off} and set_tear_{on,off} DCS commands. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> [treding: kerneldoc and other minor cleanup] Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Implement generic read and write commandsThierry Reding1-0/+6
Implement generic read and write commands. Selection of the proper data type for packets is done automatically based on the number of parameters or payload length. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Add mipi_dsi_set_maximum_return_packet_size() helperYoungJun Cho1-0/+2
This function can be used to set the maximum return packet size for a MIPI DSI peripheral. Signed-off-by: YoungJun Cho <yj44.cho@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> [treding: endianess, kerneldoc, return value] Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Constify mipi_dsi_msgThierry Reding1-1/+1
struct mipi_dsi_msg is a read-only structure, drivers should never need to modify it. Make this explicit by making all references to the struct const. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Make mipi_dsi_dcs_{read,write}() symmetricalThierry Reding1-2/+4
Currently the mipi_dsi_dcs_write() function requires the DCS command byte to be embedded within the write buffer whereas mipi_dsi_dcs_read() has a separate parameter. Make them more symmetrical by adding an extra command parameter to mipi_dsi_dcs_write(). The S6E8AA0 driver relies on the old asymmetric API and there's concern that moving to the new API may be less efficient. Provide a new function with the old semantics for those cases and make the S6E8AA0 driver use it instead. Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Add message to packet translatorThierry Reding1-0/+18
This commit introduces a new function, mipi_dsi_create_packet(), which converts from a MIPI DSI message to a MIPI DSI packet. The MIPI DSI packet is as close to the protocol described in the DSI specification as possible and useful in drivers that need to write a DSI packet into a FIFO to send a message off to the peripheral. Suggested-by: Andrzej Hajda <a.hajda@samsung.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-11-13drm/dsi: Introduce packet format helpersThierry Reding1-0/+3
Add two helpers, mipi_dsi_packet_format_is_{short,long}(), that help in determining the format of a packet. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-09-20drm/mipi-dsi: consider low power transmissionInki Dae1-0/+2
This patch adds a new flag, MIPI_DSI-MODE_LPM, to transmit data in low power. With this flag, msg.flags has MIPI_DSI_MSG_USE_LPM so that host driver of each SoC can clear or set relevant register bit for low power transmission. All host drivers shall support continuous clock behavior on the Clock Lane, and optionally may support non-continuous clock behavior. Both of them can transmit data in high speed of low power. With each clock behavior, non-continuous or continuous clock mode, host controller will transmit data in high speed by default so if peripheral wants to receive data in low power, the peripheral driver should set MIPI_DSI_MODE_LPM flag. Signed-off-by: Inki Dae <inki.dae@samsung.com>
2014-08-06drm/dsi: Replace upcasting macro by functionThierry Reding1-2/+9
Using a function instead of a macro provides proper type checking. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-22drm/dsi: Use peripheral's channel for DCS commandsThierry Reding1-4/+4
When executing DCS commands, use the channel associated with the DSI peripheral rather than one explicitly specified in the function call. Devices shouldn't be able to step on each others' toes like this. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-22drm/dsi: Make mipi_dsi_dcs_write() return ssize_tThierry Reding1-2/+2
This function returns the value of the struct mipi_dsi_host_ops' .transfer() so make sure the return types are consistent. Acked-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-07-14drm/dsi: Flag for non-continuous clock behaviorAlexandre Courbot1-0/+2
As per section 5.6.1 of the DSI specification, all DSI transmitters must support continuous clock behavior on the clock lane, while non-continuous mode support is only optional. Add a flag that allows devices to indicate that they support non-continuous clock mode so host drivers can adapt their behavior accordingly. Signed-off-by: Alexandre Courbot <acourbot@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-06-05drm/dsi: Support device shutdownThierry Reding1-0/+2
Hook up the MIPI DSI bus's .shutdown() function to allow drivers to implement code that should be run when a device is shut down. Signed-off-by: Thierry Reding <treding@nvidia.com>
2014-04-04drm/mipi_dsi: add flags to DSI messagesAndrzej Hajda1-0/+6
This patch adds flags field to mipi_dsi_msg structure and two flags: - MIPI_DSI_MSG_REQ_ACK - request ACK from peripheral for given message, - MIPI_DSI_MSG_USE_LPM - use Low Power Mode to transmit message. The first flag is usually helpful during DSI diagnostic, the second flag is required by some peripherals during configuration phase. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Inki Dae <inki.dae@samsung.com>
2013-12-17drm: Add MIPI DSI bus supportAndrzej Hajda1-0/+158
MIPI DSI bus allows to model DSI hosts and DSI peripherals using the Linux driver model. DSI hosts are registered by the DSI host drivers. During registration DSI peripherals will be created from the children of the DSI host's device tree node. Support for registration from board-setup code will be added later when needed. DSI hosts expose operations which can be used by DSI peripheral drivers to access associated devices. Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Thierry Reding <treding@nvidia.com>