Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1243867
| From | Chris Zhong <zyw@rock-chips.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 03/10] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format |
| Date | 2015-10-10 12:00 +0200 |
| Message-ID | <qhZ6y-5FE-21@gated-at.bofh.it> (permalink) |
| References | <qhZ6x-5FE-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>
---
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.1
--
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 00/10] Add mipi dsi support for rk3288 Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
[PATCH 03/10] drm/dsi: Add a helper to get bits per pixel of MIPI DSI pixel format Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
[PATCH 01/10] clk: rockchip: Add sclk_mipidsi_24m for mipi dsi Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
Re: [PATCH 01/10] clk: rockchip: Add sclk_mipidsi_24m for mipi dsi Stephen Boyd <sboyd@codeaurora.org> - 2015-10-16 23:40 +0200
Re: [PATCH 01/10] clk: rockchip: Add sclk_mipidsi_24m for mipi dsi Chris Zhong <zyw@rock-chips.com> - 2015-10-17 03:00 +0200
[PATCH 06/10] drm: rockchip: Support Synopsys DesignWare MIPI DSI host controller Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
[PATCH 07/10] Documentation: dt-bindings: Add bindings for rk3288 DW MIPI DSI driver Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
[PATCH 10/10] ARM: dts: rockchip: add support mipi panel tv080wum-nl0 for rk3288-evb Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
[PATCH 04/10] Documentation: dt-bindings: Add bindings for Synopsys DW MIPI DSI DRM bridge driver Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
[PATCH 05/10] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver Chris Zhong <zyw@rock-chips.com> - 2015-10-10 12:00 +0200
Re: [PATCH 05/10] drm/bridge: Add Synopsys DesignWare MIPI DSI host controller driver kbuild test robot <lkp@intel.com> - 2015-10-11 09:30 +0200
csiph-web