Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259994
| From | Chris Zhong <zyw@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 04/13] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format |
| Date | 2015-10-31 14:00 +0100 |
| Message-ID | <qpDVh-2Vz-47@gated-at.bofh.it> (permalink) |
| References | <qpDVg-2Vz-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Liu Ying <Ying.liu@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Chris Zhong <zyw@rock-chips.com>
---
Changes in v2: None
include/drm/drm_mipi_dsi.h | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
index f1d8d0d..3662021 100644
--- a/include/drm/drm_mipi_dsi.h
+++ b/include/drm/drm_mipi_dsi.h
@@ -163,6 +163,20 @@ static inline struct mipi_dsi_device *to_mipi_dsi_device(struct device *dev)
return container_of(dev, struct mipi_dsi_device, dev);
}
+static inline int mipi_dsi_pixel_format_to_bpp(enum mipi_dsi_pixel_format fmt)
+{
+ switch (fmt) {
+ case MIPI_DSI_FMT_RGB888:
+ case MIPI_DSI_FMT_RGB666:
+ return 24;
+ case MIPI_DSI_FMT_RGB666_PACKED:
+ return 18;
+ case MIPI_DSI_FMT_RGB565:
+ return 16;
+ }
+ return -EINVAL;
+}
+
struct mipi_dsi_device *of_find_mipi_dsi_device_by_node(struct device_node *np);
int mipi_dsi_attach(struct mipi_dsi_device *dsi);
int mipi_dsi_detach(struct mipi_dsi_device *dsi);
--
2.6.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v2 00/13] Add mipi dsi support for rk3288 Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
[PATCH v2 12/13] drm/panel: simple: Add simple panel device tree binding Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
Re: [PATCH v2 12/13] drm/panel: simple: Add simple panel device tree binding Rob Herring <robh+dt@kernel.org> - 2015-11-02 16:10 +0100
Re: [PATCH v2 12/13] drm/panel: simple: Add simple panel device tree binding Chris Zhong <zyw@rock-chips.com> - 2015-11-03 01:30 +0100
[PATCH v2 02/13] clk: rockchip: add mipidsi clocks on rk3288 Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
[PATCH v2 05/13] Documentation: dt-bindings: Add bindings for Synopsys DW MIPI DSI DRM bridge driver Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
Re: [PATCH v2 05/13] Documentation: dt-bindings: Add bindings for Synopsys DW MIPI DSI DRM bridge driver Rob Herring <robh@kernel.org> - 2015-11-06 03:30 +0100
[PATCH v2 07/13] drm: rockchip: Support Synopsys DesignWare MIPI DSI host controller Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
[PATCH v2 10/13] of: add vendor prefix for boe Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
Re: [PATCH v2 10/13] of: add vendor prefix for boe Rob Herring <robh+dt@kernel.org> - 2015-11-03 03:30 +0100
[PATCH v2 01/13] clk: rockchip: add id for mipidsi sclk on rk3288 Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
[PATCH v2 08/13] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
Re: [PATCH v2 08/13] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Rob Herring <robh@kernel.org> - 2015-11-06 03:20 +0100
[PATCH v2 04/13] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
[PATCH v2 06/13] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver Chris Zhong <zyw@rock-chips.com> - 2015-10-31 14:00 +0100
csiph-web