diff options
author | Dave Airlie <airlied@redhat.com> | 2015-12-16 17:37:52 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-12-16 17:37:52 -0500 |
commit | 07ade8446192296fa7149a035c1d2e14341fbc22 (patch) | |
tree | efaa14f48cfc0b4da214db8df89392478e4642bb /include/drm | |
parent | 51bce5bc38bdb79c0f7ab33f1fe91a68ef1afa77 (diff) | |
parent | d2a6f0f5597696ebf5bb34089be3b88ba2455b7a (diff) |
Merge tag 'drm/panel/for-4.5-rc1' of git://anongit.freedesktop.org/tegra/linux into drm-next
drm/panel: Changes for v4.5-rc1
This set of changes brings in a few more helpers for DSI support as well
as a couple of new drivers and support for some more simple panels.
* tag 'drm/panel/for-4.5-rc1' of git://anongit.freedesktop.org/tegra/linux:
drm/panel: simple: Add QiaoDian qd43003c0-40
of: Add vendor prefix for QiaoDian Xianshi
drm/panel: add kernel doc for size attributes in panel_desc
drm/panel: simple: Add support for Kyocera TCG121XGLP panel
devicetree: add vendor prefix for Kyocera Corporation
drm/bridge: Remove gratuitous blank line
drm/bridge: dw-hdmi: Use dashes in filenames
drm/panel: Add Sharp LS043T1LE01 MIPI DSI panel
dt-bindings: Add Sharp LS043T1LE01 panel binding
drm/dsi: Add Turn On/Shutdown Peripheral command helpers
drm/panel: Add Panasonic VVX10F034N00 MIPI DSI panel
dt-bindings: Add Panasonic VVX10F034N00 panel binding
drm/panel: simple: Add support for Innolux G121X1-L03
drm/panel: simple: Add support for BOE TV080WUM-NL0
dt-bindings: Add BOE TV080WUM-NL0 panel binding
of: Add vendor prefix for BOE Technology Group
drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_mipi_dsi.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index f1d8d0dbb4f1..1b3b1f8c8cdf 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h | |||
@@ -163,9 +163,36 @@ static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev) | |||
163 | return container_of(dev, struct mipi_dsi_device, dev); | 163 | return container_of(dev, struct mipi_dsi_device, dev); |
164 | } | 164 | } |
165 | 165 | ||
166 | /** | ||
167 | * mipi_dsi_pixel_format_to_bpp - obtain the number of bits per pixel for any | ||
168 | * given pixel format defined by the MIPI DSI | ||
169 | * specification | ||
170 | * @fmt: MIPI DSI pixel format | ||
171 | * | ||
172 | * Returns: The number of bits per pixel of the given pixel format. | ||
173 | */ | ||
174 | static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt) | ||
175 | { | ||
176 | switch (fmt) { | ||
177 | case MIPI_DSI_FMT_RGB888: | ||
178 | case MIPI_DSI_FMT_RGB666: | ||
179 | return 24; | ||
180 | |||
181 | case MIPI_DSI_FMT_RGB666_PACKED: | ||
182 | return 18; | ||
183 | |||
184 | case MIPI_DSI_FMT_RGB565: | ||
185 | return 16; | ||
186 | } | ||
187 | |||
188 | return -EINVAL; | ||
189 | } | ||
190 | |||
166 | struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); | 191 | struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np); |
167 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); | 192 | int mipi_dsi_attach(struct mipi_dsi_device *dsi); |
168 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); | 193 | int mipi_dsi_detach(struct mipi_dsi_device *dsi); |
194 | int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi); | ||
195 | int mipi_dsi_turn_on_peripheral(struct mipi_dsi_device *dsi); | ||
169 | int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, | 196 | int mipi_dsi_set_maximum_return_packet_size(struct mipi_dsi_device *dsi, |
170 | u16 value); | 197 | u16 value); |
171 | 198 | ||