Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
On 06/25/2014 12:04 AM, Thierry Reding wrote: because on this very simple display board, we only have DVI LVDS signals without the I2C to detect the display. That's unfortunate. In that case perhaps a better approach would be to add a video timings node to the device that provides the DVI output? I've just done that. Should I resend now? The goal is to avoid as much as possible extra versions. Also, as I said before in a response to [PATCH v14 09/10] ARM: dts: mbimx51sd: Add display support., the LCD regulator was inverted, it worked while inverted because of a bug which is now fixed by: imx-drm: parallel-display: Fix DPMS default state. Right now, I don't have any other changes for this serie beside a simple rebase of dts: imx5*, imx6*: correct display-timings rebased. Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
On 06/24/2014 05:06 PM, Russell King - ARM Linux wrote: It would be better if you separate the binding documentation updates from the other functional changes too. Fixed. Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
On 06/25/2014 06:48 AM, Sascha Hauer wrote: +#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH1 Adding defines without a proper namespace (IPU_) outside a driver private header file is not nice. Anyway, instead of adding the defines ... Fixed in imx-drm: use defines for clock polarity settings and in imx-drm: Use drm_display_mode timings flags.. Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
On 06/24/2014 05:13 PM, Russell King - ARM Linux wrote: [...] If you'd like to send me better commit messages for these patches, I'll add them to what I already have: imx-drm: use defines for clock polarity settings The comment of the clk_pol field of the ipu_di_signal_cfg struct was inverted. Instead of merely inverting the comment, the values of clk_pol were defined. imx-drm: add RGB666 support for parallel display. This permits to drive parallel displays that expect the RGB666 color format. It may also be worth describing the RGB666 format in the commit message for: v4l2: add new V4L2_PIX_FMT_RGB666 pixel format. The RGB666 color format encodes 6 bits for each color(red, green and blue), linearly. It looks like this in memory: 017 RRGGBB Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v14 09/10] ARM: dts: mbimx51sd: Add display support.
On 06/16/2014 02:29 PM, Denis Carikli wrote: [...] Which result at the lcd regulator being physically powered on at boot. I didn't see that because powering it on at boot is what I want. I fixed that in imx-drm's parallel-display with another patch I just sent separately. Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 02/10] imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v13-v14: - Rebased ChangeLog v9-v13: - Rebased ChangeLog v8-v9: - Rebased. - Added Philipp Zabel's ack. - Shortened the patch title. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |4 ++-- drivers/gpu/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index e75f0e5..c0eb95a 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -60,8 +60,8 @@ Required properties: - compatible: Should be fsl,imx-parallel-display Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: rgb24, rgb565, bgr666 - and lvds666. + display interface. Currently supported types: rgb24, rgb565, bgr666, + rgb666 and lvds666. - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 2326c75..100d410 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -93,6 +93,7 @@ enum ipu_dc_map { IPU_DC_MAP_BGR666, IPU_DC_MAP_LVDS666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -161,6 +162,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_LVDS666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -452,6 +455,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index b567832..64b34336 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -218,6 +218,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; else if (!strcmp(fmt, lvds666)) imxpd-interface_pix_fmt = v4l2_fourcc('L', 'V', 'D', '6'); } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 01/10] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v13-v14: - None ChangeLog v10-v13: - No changes ChangeLog v9-v10: - Rebased on top of: 211e7f2 [media] DocBook media: drop the old incorrect packed RGB table - Added Philipp Zabel's Ack. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 39 include/uapi/linux/videodev2.h |1 + 2 files changed, 40 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index e1c4f8b..88a7fe1 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 168ff50..08cac01 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -299,6 +299,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 03/10] imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v13-v14: - Rebased ChangeLog v10-v13: - Rebased ChangeLog v9-v10: - Rebased. - Added Philipp Zabel's Ack. - Included Lothar Waßmann's suggestion about imx-ldb.c. - Shortened the patch title ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts |2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/gpu/ipu-v3/ipu-dc.c |4 ++-- drivers/staging/imx-drm/imx-ldb.c|4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c5a9a24..7b3851d 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -18,7 +18,7 @@ display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index d5d146a..4b036b4 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -24,7 +24,7 @@ soc { display1: display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c index 100d410..9974d41 100644 --- a/drivers/gpu/ipu-v3/ipu-dc.c +++ b/drivers/gpu/ipu-v3/ipu-dc.c @@ -439,9 +439,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* lvds666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_LVDS666); diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 7e3f019..5d22e40 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -188,11 +188,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 06/10] drm: drm_display_mode: add signal polarity flags
We need a way to pass signal polarity informations between DRM panels, and the display drivers. To do that, a pol_flags field was added to drm_display_mode. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - Fixed DRM_MODE_FLAG_POL_DE_HIGH's description. ChangeLog v12-v13: - Added Docbook documentation for pol_flags the struct field. - Removed the _PRESERVE defines: it was used by patches against the imx_drm driver. Now theses patches have been adapted not to require that defines. ChangeLog v11-v12: - Rebased: This patch now applies against drm_modes.h - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names ChangeLog v10-v11: - Since the imx-drm won't be able to retrive its regulators from the device tree when using display-timings nodes, and that I was told that the drm simple-panel driver already supported that, I then, instead, added what was lacking to make the eukrea displays work with the drm-simple-panel driver. That required a way to get back the display polarity informations from the imx-drm driver without affecting userspace. --- Documentation/DocBook/drm.tmpl | 30 ++ include/drm/drm_modes.h|6 ++ 2 files changed, 36 insertions(+) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index 7df3134..22d435f 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl @@ -2292,6 +2292,36 @@ void intel_crt_init(struct drm_device *dev) and structfieldheight_mm/structfield fields are only used internally during EDID parsing and should not be set when creating modes manually. /para + para +The structfieldpol_flags/structfield value represents the display +signal polarity flags, it can be a combination of +variablelist + varlistentry +termDRM_MODE_FLAG_POL_PIXDATA_NEGEDGE/term + listitempara + drive pixel data on falling edge, sample data on rising edge. + /para/listitem + /varlistentry + varlistentry +termDRM_MODE_FLAG_POL_PIXDATA_POSEDGE/term +listitempara + Drive pixel data on rising edge, sample data on falling edge. +/para/listitem + /varlistentry + varlistentry +termDRM_MODE_FLAG_POL_DE_LOW/term +listitempara + data-enable pulse is active low +/para/listitem + /varlistentry + varlistentry +termDRM_MODE_FLAG_POL_DE_HIGH/term +listitempara + data-enable pulse is active high +/para/listitem + /varlistentry +/variablelist + /para /listitem listitem synopsisint (*mode_valid)(struct drm_connector *connector, diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index 91d0582..c5cbe31 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -93,6 +93,11 @@ enum drm_mode_status { #define DRM_MODE_FLAG_3D_MAX DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF +#define DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE BIT(1) +#define DRM_MODE_FLAG_POL_PIXDATA_POSEDGE BIT(2) +#define DRM_MODE_FLAG_POL_DE_LOW BIT(3) +#define DRM_MODE_FLAG_POL_DE_HIGH BIT(4) + struct drm_display_mode { /* Header */ struct list_head head; @@ -144,6 +149,7 @@ struct drm_display_mode { int vrefresh; /* in Hz */ int hsync; /* in kHz */ enum hdmi_picture_aspect picture_aspect_ratio; + unsigned int pol_flags; }; /* mode specified on the command line */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 07/10] imx-drm: Use drm_display_mode timings flags.
The previous hardware behaviour was kept if the flags are not set. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - Rebased ChangeLog v12-v13: - This patch doesn't need the DRM_MODE_FLAG_POL_*_PRESERVE flags anymore. - code cleanup to improve readability: - ENABLE_POL_PRESERVE is now gone - Less modifications in ipu_di_init_sync_panel - more readable modifications in int ipu_crtc_mode_set ChangeLog v11-v12: - Rebased: It now uses the following new flags defines names: CLK_POL, ENABLE_POL - The inversions in ipuv3-crtc.c are now fixed. - ipuv3-crtc.c was still using mode-private_flags from the previous versions of this patchset, that's now fixed. ChangeLog v10-v11: - This patch was splitted-out and adapted from: Prepare imx-drm for extra display-timings retrival. - The display-timings dt specific part was removed. - The flags names were changed to use the DRM ones from: drm: drm_display_mode: add signal polarity flags --- drivers/gpu/ipu-v3/ipu-di.c |2 ++ drivers/staging/imx-drm/ipuv3-crtc.c | 18 -- include/video/imx-ipu-v3.h |4 ++-- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-di.c b/drivers/gpu/ipu-v3/ipu-di.c index d00f357..1a1e116 100644 --- a/drivers/gpu/ipu-v3/ipu-di.c +++ b/drivers/gpu/ipu-v3/ipu-di.c @@ -597,6 +597,8 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) if (sig-clk_pol == CLK_POL_POSEDGE) di_gen |= DI_GEN_POLARITY_DISP_CLK; + else if (sig-clk_pol == CLK_POL_NEGEDGE) + di_gen = ~DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index 7fec438..7fdf575 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -165,8 +165,22 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = ENABLE_POL_HIGH; - sig_cfg.clk_pol = CLK_POL_NEGEDGE; + if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_POSEDGE) + sig_cfg.clk_pol = CLK_POL_POSEDGE; + else if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE) + sig_cfg.clk_pol = CLK_POL_NEGEDGE; + else + /* If no PIXDATA flags were set, keep the old behaviour */ + sig_cfg.clk_pol = CLK_POL_NEGEDGE; + + if (mode-pol_flags DRM_MODE_FLAG_POL_DE_HIGH) + sig_cfg.enable_pol = ENABLE_POL_HIGH; + else if (mode-pol_flags DRM_MODE_FLAG_POL_DE_LOW) + sig_cfg.enable_pol = ENABLE_POL_LOW; + else + /* If no DE flags were set, keep the old behaviour */ + sig_cfg.enable_pol = ENABLE_POL_HIGH; + sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 305..e660522 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -43,10 +43,10 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; - unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; + u8 clk_pol; + u8 enable_pol; u16 width; u16 height; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 04/10] imx-drm: use defines for clock polarity settings
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - Rebased ChangeLog 12-v13: - No changes ChangeLog 11-v12: - Improved the define names to match the hardware: ENABLE_POL is not a clock signal but instead an enable signal. ChangeLog v9-v10: - New patch which was splitted out from: staging: imx-drm: Use de-active and pixelclk-active display-timings.. - Fixes many issues in staging: imx-drm: Use de-active and pixelclk-active display-timings.: - More clear meaning of the polarity settings. - The SET_CLK_POL and SET_DE_POL masks are not needed anymore. --- drivers/gpu/ipu-v3/ipu-di.c |4 ++-- drivers/staging/imx-drm/ipuv3-crtc.c |4 ++-- include/video/imx-ipu-v3.h |8 +++- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/ipu-v3/ipu-di.c b/drivers/gpu/ipu-v3/ipu-di.c index c490ba4..d00f357 100644 --- a/drivers/gpu/ipu-v3/ipu-di.c +++ b/drivers/gpu/ipu-v3/ipu-di.c @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } } - if (sig-clk_pol) + if (sig-clk_pol == CLK_POL_POSEDGE) di_gen |= DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); @@ -606,7 +606,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) reg = ipu_di_read(di, DI_POL); reg = ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15); - if (sig-enable_pol) + if (sig-enable_pol == ENABLE_POL_HIGH) reg |= DI_POL_DRDY_POLARITY_15; if (sig-data_pol) reg |= DI_POL_DRDY_DATA_POLARITY; diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index 720868b..7fec438 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -165,8 +165,8 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = 1; - sig_cfg.clk_pol = 0; + sig_cfg.enable_pol = ENABLE_POL_HIGH; + sig_cfg.clk_pol = CLK_POL_NEGEDGE; sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; diff --git a/include/video/imx-ipu-v3.h b/include/video/imx-ipu-v3.h index 3e43e22..305 100644 --- a/include/video/imx-ipu-v3.h +++ b/include/video/imx-ipu-v3.h @@ -27,6 +27,12 @@ enum ipuv3_type { #define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define CLK_POL_NEGEDGE0 +#define CLK_POL_POSEDGE1 + +#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH1 + /* * Bitfield of Display Interface signal polarities. */ @@ -37,7 +43,7 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; /* true = rising edge */ + unsigned clk_pol:1; unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 10/10] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - None ChangeLog v11-v13: - No changes ChangeLog v9-v11: - Now uses the drm-panel instead of the display-timings. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - The backlight is now on at boot. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to the new GPIO defines. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds backlight support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. --- .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts index d273d09..6e36dae 100644 --- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -17,9 +17,19 @@ model = Eukrea MBIMXSD51 with the CMO-QVGA Display; compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + backlight: backlight { + compatible = gpio-backlight; + pinctrl-names = default; + pinctrl-0 = pinctrl_backlight_1; + gpios = gpio3 4 GPIO_ACTIVE_HIGH; + default-brightness-level = 1; + default-on; + }; + panel: panel { compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; power-supply = reg_lcd_3v3; + backlight = backlight; }; reg_lcd_3v3: lcd-en { -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v14 05/10] ARM: dts: imx5*, imx6*: correct display-timings nodes.
The imx-drm driver can't use the de-active and pixelclk-active display-timings properties yet. Instead the data-enable and the pixel data clock polarity are hardcoded in the imx-drm driver. So theses properties are now set to keep the same behaviour when imx-drm will start using them. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - None ChangeLog v10-v11: - imx53-tx53-x03x.dts change was removed because it already had the correct setting. ChangeLog v9-v10: - New patch that was splitted out of: staging imx-drm: Use de-active and pixelclk-active display-timings. --- arch/arm/boot/dts/imx51-babbage.dts |2 ++ arch/arm/boot/dts/imx53-m53evk.dts|2 ++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi|2 ++ 8 files changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index ee51a10..b64a9e3 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts @@ -56,6 +56,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index 4b036b4..d03ced7 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -41,6 +41,8 @@ vfront-porch = 9; vsync-len = 3; vsync-active = 1; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi index d3125f0..7f993d6 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi @@ -512,6 +512,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi index 532347f..e06cf9e 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -534,6 +534,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index 4c4b175..bcf5178 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -353,6 +353,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 009abd6..230bbc6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -405,6 +405,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index 6df6127..9f6b406 100644 --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi @@ -353,6 +353,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index e446192..3297779 100644
[PATCH v14 09/10] ARM: dts: mbimx51sd: Add display support.
The CMO-QVGA, DVI-SVGA and DVI-VGA are added. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - None ChangeLog v10-v13: - Rebased - Removed enable-active-high in reg_lcd_3v3: its GPIO already has the GPIO_ACTIVE_HIGH flag. Without this removal, the display was off at boot and powering it off and on was necessary to get an image on it after the boot. ChangeLog v10-v11: - Now uses the drm-panel instead of the display-timings. This is to get regulator support, which is lacking in the imx-drm driver when using the display-timings. ChangeLog v9-v10: - Rebased - Now enables the cmo-qvga regulator at boot. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - updated pixelclk-active after the following patch: imx-drm: Match ipu_di_signal_cfg's clk_pol with its description. ChangeLog v7-v8: - Rebased the patch: added the now required imx-drm node. - Adapted the svga clock-frequency value in order to still be able to display an image after the following commit: imx-drm: ipu-v3: more inteligent DI clock selection ChangeLog v6-v7: - Shrinked even more the Cc list. - Since the pingrp headers were removed, the references to it where replaced by the actual pins. - Added the targets to arch/arm/boot/dts/Makefile ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to new GPIO defines. - Updated to new licenses checkpatch requirements. - one whitespace cleanup. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds display support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. - rebased and reworked the dts displays addition. - Also rebased and reworked the fsl,pins usage. --- arch/arm/boot/dts/Makefile |3 ++ .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 40 .../imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts | 28 +++ .../imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts | 28 +++ .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 49 5 files changed, 148 insertions(+) create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 0f1e8be..f0ec7b7 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -177,6 +177,9 @@ dtb-$(CONFIG_ARCH_MXC) += \ imx51-babbage.dtb \ imx51-digi-connectcore-jsk.dtb \ imx51-eukrea-mbimxsd51-baseboard.dtb \ + imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dtb \ + imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dtb \ + imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dtb \ imx53-ard.dtb \ imx53-m53evk.dtb \ imx53-mba53.dtb \ diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts new file mode 100644 index 000..d273d09 --- /dev/null +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -0,0 +1,40 @@ +/* + * Copyright 2013 Eukréa Electromatique de...@eukrea.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include imx51-eukrea-mbimxsd51-baseboard.dts + +/ { + model = Eukrea MBIMXSD51 with the CMO-QVGA Display; + compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + + panel: panel { + compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; + power-supply = reg_lcd_3v3; + }; + + reg_lcd_3v3: lcd-en { + compatible = regulator-fixed; + pinctrl-names = default; + pinctrl-0 = pinctrl_reg_lcd_3v3; + regulator-name = lcd-3v3; + regulator-min-microvolt = 330; + regulator-max-microvolt = 330; + gpio = gpio3 13 GPIO_ACTIVE_HIGH; + regulator-boot-on; + }; +}; + +display { + status = okay; + fsl,panel = panel; +}; diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts new file mode 100644
[PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v13-v14: - None ChangeLog v12-v13: - Added a note explaining why the size is zero in the eukrea_mbimxsd51_dvi(s)vga structs. ChangeLog v11-v12: - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names ChangeLog v10-v11: - New patch. --- .../bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt |7 ++ .../bindings/panel/eukrea,mbimxsd51-dvi-svga.txt |7 ++ .../bindings/panel/eukrea,mbimxsd51-dvi-vga.txt|7 ++ drivers/gpu/drm/panel/panel-simple.c | 83 4 files changed, 104 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt new file mode 100644 index 000..03679d0 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt @@ -0,0 +1,7 @@ +Eukrea CMO-QVGA (320x240 pixels) TFT LCD panel + +Required properties: +- compatible: should be eukrea,mbimxsd51-cmo-qvga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt new file mode 100644 index 000..f408c9a --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt @@ -0,0 +1,7 @@ +Eukrea DVI-SVGA (800x600 pixels) DVI output. + +Required properties: +- compatible: should be eukrea,mbimxsd51-dvi-svga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file mode 100644 index 000..8ea90da --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt @@ -0,0 +1,7 @@ +Eukrea DVI-VGA (640x480 pixels) DVI output. + +Required properties: +- compatible: should be eukrea,mbimxsd51-dvi-vga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a251361..adc40a7 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -403,6 +403,80 @@ static const struct panel_desc edt_etm0700g0dh6 = { }, }; +static const struct drm_display_mode eukrea_mbimxsd51_cmoqvga_mode = { + .clock = 6500, + .hdisplay = 320, + .hsync_start = 320 + 38, + .hsync_end = 320 + 38 + 20, + .htotal = 320 + 38 + 20 + 30, + .vdisplay = 240, + .vsync_start = 240 + 15, + .vsync_end = 240 + 15 + 4, + .vtotal = 240 + 15 + 4 + 3, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE | +DRM_MODE_FLAG_POL_DE_LOW, +}; + +static const struct panel_desc eukrea_mbimxsd51_cmoqvga = { + .modes = eukrea_mbimxsd51_cmoqvga_mode, + .num_modes = 1, + .size = { + .width = 73, + .height = 56, + }, +}; + +static const struct drm_display_mode eukrea_mbimxsd51_dvisvga_mode = { + .clock = 44333, + .hdisplay = 800, + .hsync_start = 800 + 112, + .hsync_end = 800 + 112 + 32, + .htotal = 800 + 112 + 32 + 80, + .vdisplay = 600, + .vsync_start = 600 + 3, + .vsync_end = 600 + 3 + 17, + .vtotal = 600 + 3 + 17 + 4, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_POSEDGE | +DRM_MODE_FLAG_POL_DE_HIGH, +}; + +static const struct panel_desc eukrea_mbimxsd51_dvisvga = { + .modes = eukrea_mbimxsd51_dvisvga_mode, + .num_modes = 1, + /* This is a DVI adapter for external displays */ + .size = { + .width = 0, + .height = 0, + }, +}; + +static const struct drm_display_mode eukrea_mbimxsd51_dvivga_mode = { + .clock = 23750, + .hdisplay = 640, + .hsync_start = 640 + 80, + .hsync_end = 640 + 80 + 16, + .htotal = 640 + 80 + 16 + 64, + .vdisplay = 480, + .vsync_start = 480 + 3, + .vsync_end = 480 + 3 + 13, + .vtotal = 480 + 3 + 13 + 4, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_POSEDGE | +DRM_MODE_FLAG_POL_DE_HIGH, +}; + +static const struct panel_desc eukrea_mbimxsd51_dvivga = { + .modes = eukrea_mbimxsd51_dvivga_mode, + .num_modes = 1, + /* This is a DVI adapter for external displays
Re: [PATCH v14 09/10] ARM: dts: mbimx51sd: Add display support.
On 06/16/2014 12:11 PM, Denis Carikli wrote: + reg_lcd_3v3: lcd-en { + compatible = regulator-fixed; + pinctrl-names = default; + pinctrl-0 = pinctrl_reg_lcd_3v3; + regulator-name = lcd-3v3; + regulator-min-microvolt = 330; + regulator-max-microvolt = 330; + gpio = gpio3 13 GPIO_ACTIVE_HIGH; + regulator-boot-on; + }; +}; This is wrong, I'll fix it in the next serie. What it really does is to make regulator-fixed think that the gpio is active low, the bindings documentation(fixed-regulator.txt) says: - enable-active-high: Polarity of GPIO is Active high If this property is missing, the default assumed is Active low. Then regulator-boot-on will make it think that the regulator is already on and so the regulator will be disabled. From the bindings documentation (regulator.txt): regulator-boot-on: bootloader/firmware enabled regulator Which result at the lcd regulator being physically powered on at boot. I didn't see that because powering it on at boot is what I want. How can I do that beside doing it in userspace by issuing the following commands: echo 4 /sys/devices/display-subsystem/graphics/fb0/blank echo 0 /sys/devices/display-subsystem/graphics/fb0/blank Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 01/10] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v10-v13: - No changes ChangeLog v9-v10: - Rebased on top of: 211e7f2 [media] DocBook media: drop the old incorrect packed RGB table - Added Philipp Zabel's Ack. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 39 include/uapi/linux/videodev2.h |1 + 2 files changed, 40 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index e1c4f8b..88a7fe1 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 168ff50..08cac01 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -299,6 +299,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 02/10] imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v13: - Rebased ChangeLog v8-v9: - Rebased. - Added Philipp Zabel's ack. - Shortened the patch title. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index e75f0e5..c0eb95a 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -60,8 +60,8 @@ Required properties: - compatible: Should be fsl,imx-parallel-display Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: rgb24, rgb565, bgr666 - and lvds666. + display interface. Currently supported types: rgb24, rgb565, bgr666, + rgb666 and lvds666. - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 784a4a1..9d0324d 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -94,6 +94,7 @@ enum ipu_dc_map { IPU_DC_MAP_BGR666, IPU_DC_MAP_LVDS666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -162,6 +163,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_LVDS666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -453,6 +456,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index b567832..64b34336 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -218,6 +218,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; else if (!strcmp(fmt, lvds666)) imxpd-interface_pix_fmt = v4l2_fourcc('L', 'V', 'D', '6'); } -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 05/10] ARM: dts: imx5*, imx6*: correct display-timings nodes.
The imx-drm driver can't use the de-active and pixelclk-active display-timings properties yet. Instead the data-enable and the pixel data clock polarity are hardcoded in the imx-drm driver. So theses properties are now set to keep the same behaviour when imx-drm will start using them. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v10-v11: - imx53-tx53-x03x.dts change was removed because it already had the correct setting. ChangeLog v9-v10: - New patch that was splitted out of: staging imx-drm: Use de-active and pixelclk-active display-timings. --- arch/arm/boot/dts/imx51-babbage.dts |2 ++ arch/arm/boot/dts/imx53-m53evk.dts|2 ++ arch/arm/boot/dts/imx6qdl-gw53xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi|2 ++ 8 files changed, 16 insertions(+) diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index ee51a10..b64a9e3 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts @@ -56,6 +56,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index 4b036b4..d03ced7 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -41,6 +41,8 @@ vfront-porch = 9; vsync-len = 3; vsync-active = 1; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi index d3125f0..7f993d6 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi @@ -512,6 +512,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi index 532347f..e06cf9e 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -534,6 +534,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index 4c4b175..bcf5178 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -353,6 +353,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 009abd6..230bbc6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -405,6 +405,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index 6df6127..9f6b406 100644 --- a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi @@ -353,6 +353,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi index e446192..3297779 100644 --- a/arch/arm/boot/dts/imx6qdl
[PATCH v13 03/10] imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v10-v13: - Rebased ChangeLog v9-v10: - Rebased. - Added Philipp Zabel's Ack. - Included Lothar Waßmann's suggestion about imx-ldb.c. - Shortened the patch title ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/imx-ldb.c |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c5a9a24..7b3851d 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -18,7 +18,7 @@ display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index d5d146a..4b036b4 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -24,7 +24,7 @@ soc { display1: display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 7e3f019..5d22e40 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -188,11 +188,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 9d0324d..cd250d5 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -440,9 +440,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* lvds666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_LVDS666); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 04/10] imx-drm: use defines for clock polarity settings
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog 12-v13: - No changes ChangeLog 11-v12: - Improved the define names to match the hardware: ENABLE_POL is not a clock signal but instead an enable signal. ChangeLog v9-v10: - New patch which was splitted out from: staging: imx-drm: Use de-active and pixelclk-active display-timings.. - Fixes many issues in staging: imx-drm: Use de-active and pixelclk-active display-timings.: - More clear meaning of the polarity settings. - The SET_CLK_POL and SET_DE_POL masks are not needed anymore. --- drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |8 +++- drivers/staging/imx-drm/ipu-v3/ipu-di.c |4 ++-- drivers/staging/imx-drm/ipuv3-crtc.c|4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index c2c6fab..015e3bf 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -27,6 +27,12 @@ enum ipuv3_type { #define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define CLK_POL_NEGEDGE0 +#define CLK_POL_POSEDGE1 + +#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH1 + /* * Bitfield of Display Interface signal polarities. */ @@ -37,7 +43,7 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; /* true = rising edge */ + unsigned clk_pol:1; unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 849b3e1..0ce3f52 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } } - if (sig-clk_pol) + if (sig-clk_pol == CLK_POL_POSEDGE) di_gen |= DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); @@ -606,7 +606,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) reg = ipu_di_read(di, DI_POL); reg = ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15); - if (sig-enable_pol) + if (sig-enable_pol == ENABLE_POL_HIGH) reg |= DI_POL_DRDY_POLARITY_15; if (sig-data_pol) reg |= DI_POL_DRDY_DATA_POLARITY; diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index 47bec5e..ba9eea3 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -165,8 +165,8 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = 1; - sig_cfg.clk_pol = 0; + sig_cfg.enable_pol = ENABLE_POL_HIGH; + sig_cfg.clk_pol = CLK_POL_NEGEDGE; sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v12-v13: - Added a note explaining why the size is zero in the eukrea_mbimxsd51_dvi(s)vga structs. ChangeLog v11-v12: - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names ChangeLog v10-v11: - New patch. --- .../bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt |7 ++ .../bindings/panel/eukrea,mbimxsd51-dvi-svga.txt |7 ++ .../bindings/panel/eukrea,mbimxsd51-dvi-vga.txt|7 ++ drivers/gpu/drm/panel/panel-simple.c | 83 4 files changed, 104 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt new file mode 100644 index 000..03679d0 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt @@ -0,0 +1,7 @@ +Eukrea CMO-QVGA (320x240 pixels) TFT LCD panel + +Required properties: +- compatible: should be eukrea,mbimxsd51-cmo-qvga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt new file mode 100644 index 000..f408c9a --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt @@ -0,0 +1,7 @@ +Eukrea DVI-SVGA (800x600 pixels) DVI output. + +Required properties: +- compatible: should be eukrea,mbimxsd51-dvi-svga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file mode 100644 index 000..8ea90da --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt @@ -0,0 +1,7 @@ +Eukrea DVI-VGA (640x480 pixels) DVI output. + +Required properties: +- compatible: should be eukrea,mbimxsd51-dvi-vga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index a251361..adc40a7 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -403,6 +403,80 @@ static const struct panel_desc edt_etm0700g0dh6 = { }, }; +static const struct drm_display_mode eukrea_mbimxsd51_cmoqvga_mode = { + .clock = 6500, + .hdisplay = 320, + .hsync_start = 320 + 38, + .hsync_end = 320 + 38 + 20, + .htotal = 320 + 38 + 20 + 30, + .vdisplay = 240, + .vsync_start = 240 + 15, + .vsync_end = 240 + 15 + 4, + .vtotal = 240 + 15 + 4 + 3, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE | +DRM_MODE_FLAG_POL_DE_LOW, +}; + +static const struct panel_desc eukrea_mbimxsd51_cmoqvga = { + .modes = eukrea_mbimxsd51_cmoqvga_mode, + .num_modes = 1, + .size = { + .width = 73, + .height = 56, + }, +}; + +static const struct drm_display_mode eukrea_mbimxsd51_dvisvga_mode = { + .clock = 44333, + .hdisplay = 800, + .hsync_start = 800 + 112, + .hsync_end = 800 + 112 + 32, + .htotal = 800 + 112 + 32 + 80, + .vdisplay = 600, + .vsync_start = 600 + 3, + .vsync_end = 600 + 3 + 17, + .vtotal = 600 + 3 + 17 + 4, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_POSEDGE | +DRM_MODE_FLAG_POL_DE_HIGH, +}; + +static const struct panel_desc eukrea_mbimxsd51_dvisvga = { + .modes = eukrea_mbimxsd51_dvisvga_mode, + .num_modes = 1, + /* This is a DVI adapter for external displays */ + .size = { + .width = 0, + .height = 0, + }, +}; + +static const struct drm_display_mode eukrea_mbimxsd51_dvivga_mode = { + .clock = 23750, + .hdisplay = 640, + .hsync_start = 640 + 80, + .hsync_end = 640 + 80 + 16, + .htotal = 640 + 80 + 16 + 64, + .vdisplay = 480, + .vsync_start = 480 + 3, + .vsync_end = 480 + 3 + 13, + .vtotal = 480 + 3 + 13 + 4, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_POSEDGE | +DRM_MODE_FLAG_POL_DE_HIGH, +}; + +static const struct panel_desc eukrea_mbimxsd51_dvivga = { + .modes = eukrea_mbimxsd51_dvivga_mode, + .num_modes = 1, + /* This is a DVI adapter for external displays */ + .size
[PATCH v13 07/10] imx-drm: Use drm_display_mode timings flags.
The previous hardware behaviour was kept if the flags are not set. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v12-v13: - This patch doesn't need the DRM_MODE_FLAG_POL_*_PRESERVE flags anymore. - code cleanup to improve readability: - ENABLE_POL_PRESERVE is now gone - Less modifications in ipu_di_init_sync_panel - more readable modifications in int ipu_crtc_mode_set ChangeLog v11-v12: - Rebased: It now uses the following new flags defines names: CLK_POL, ENABLE_POL - The inversions in ipuv3-crtc.c are now fixed. - ipuv3-crtc.c was still using mode-private_flags from the previous versions of this patchset, that's now fixed. ChangeLog v10-v11: - This patch was splitted-out and adapted from: Prepare imx-drm for extra display-timings retrival. - The display-timings dt specific part was removed. - The flags names were changed to use the DRM ones from: drm: drm_display_mode: add signal polarity flags --- drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-di.c |2 ++ drivers/staging/imx-drm/ipuv3-crtc.c| 18 -- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index 015e3bf..94b0d8e 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -43,10 +43,10 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; - unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; + u8 clk_pol; + u8 enable_pol; u16 width; u16 height; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 0ce3f52..faf08e2 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -597,6 +597,8 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) if (sig-clk_pol == CLK_POL_POSEDGE) di_gen |= DI_GEN_POLARITY_DISP_CLK; + else if (sig-clk_pol == CLK_POL_NEGEDGE) + di_gen = ~DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index ba9eea3..10b46b5 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -165,8 +165,22 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = ENABLE_POL_HIGH; - sig_cfg.clk_pol = CLK_POL_NEGEDGE; + if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_POSEDGE) + sig_cfg.clk_pol = CLK_POL_POSEDGE; + else if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE) + sig_cfg.clk_pol = CLK_POL_NEGEDGE; + else + /* If no PIXDATA flags were set, keep the old behaviour */ + sig_cfg.clk_pol = CLK_POL_NEGEDGE; + + if (mode-pol_flags DRM_MODE_FLAG_POL_DE_HIGH) + sig_cfg.enable_pol = ENABLE_POL_HIGH; + else if (mode-pol_flags DRM_MODE_FLAG_POL_DE_LOW) + sig_cfg.enable_pol = ENABLE_POL_LOW; + else + /* If no DE flags were set, keep the old behaviour */ + sig_cfg.enable_pol = ENABLE_POL_HIGH; + sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 10/10] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v11-v13: - No changes ChangeLog v9-v11: - Now uses the drm-panel instead of the display-timings. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - The backlight is now on at boot. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to the new GPIO defines. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds backlight support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. --- .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts index d273d09..6e36dae 100644 --- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -17,9 +17,19 @@ model = Eukrea MBIMXSD51 with the CMO-QVGA Display; compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + backlight: backlight { + compatible = gpio-backlight; + pinctrl-names = default; + pinctrl-0 = pinctrl_backlight_1; + gpios = gpio3 4 GPIO_ACTIVE_HIGH; + default-brightness-level = 1; + default-on; + }; + panel: panel { compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; power-supply = reg_lcd_3v3; + backlight = backlight; }; reg_lcd_3v3: lcd-en { -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v13 09/10] ARM: dts: mbimx51sd: Add display support.
The CMO-QVGA, DVI-SVGA and DVI-VGA are added. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v10-v13: - Rebased - Removed enable-active-high in reg_lcd_3v3: its GPIO already has the GPIO_ACTIVE_HIGH flag. Without this removal, the display was off at boot and powering it off and on was necessary to get an image on it after the boot. ChangeLog v10-v11: - Now uses the drm-panel instead of the display-timings. This is to get regulator support, which is lacking in the imx-drm driver when using the display-timings. ChangeLog v9-v10: - Rebased - Now enables the cmo-qvga regulator at boot. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - updated pixelclk-active after the following patch: imx-drm: Match ipu_di_signal_cfg's clk_pol with its description. ChangeLog v7-v8: - Rebased the patch: added the now required imx-drm node. - Adapted the svga clock-frequency value in order to still be able to display an image after the following commit: imx-drm: ipu-v3: more inteligent DI clock selection ChangeLog v6-v7: - Shrinked even more the Cc list. - Since the pingrp headers were removed, the references to it where replaced by the actual pins. - Added the targets to arch/arm/boot/dts/Makefile ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to new GPIO defines. - Updated to new licenses checkpatch requirements. - one whitespace cleanup. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds display support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. - rebased and reworked the dts displays addition. - Also rebased and reworked the fsl,pins usage. --- arch/arm/boot/dts/Makefile |3 ++ .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 40 .../imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts | 28 +++ .../imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts | 28 +++ .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 49 5 files changed, 148 insertions(+) create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 0f1e8be..f0ec7b7 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -177,6 +177,9 @@ dtb-$(CONFIG_ARCH_MXC) += \ imx51-babbage.dtb \ imx51-digi-connectcore-jsk.dtb \ imx51-eukrea-mbimxsd51-baseboard.dtb \ + imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dtb \ + imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dtb \ + imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dtb \ imx53-ard.dtb \ imx53-m53evk.dtb \ imx53-mba53.dtb \ diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts new file mode 100644 index 000..d273d09 --- /dev/null +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -0,0 +1,40 @@ +/* + * Copyright 2013 Eukréa Electromatique de...@eukrea.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include imx51-eukrea-mbimxsd51-baseboard.dts + +/ { + model = Eukrea MBIMXSD51 with the CMO-QVGA Display; + compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + + panel: panel { + compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; + power-supply = reg_lcd_3v3; + }; + + reg_lcd_3v3: lcd-en { + compatible = regulator-fixed; + pinctrl-names = default; + pinctrl-0 = pinctrl_reg_lcd_3v3; + regulator-name = lcd-3v3; + regulator-min-microvolt = 330; + regulator-max-microvolt = 330; + gpio = gpio3 13 GPIO_ACTIVE_HIGH; + regulator-boot-on; + }; +}; + +display { + status = okay; + fsl,panel = panel; +}; diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts new file mode 100644 index 000..323ebf4
[PATCH v13 06/10] drm: drm_display_mode: add signal polarity flags
We need a way to pass signal polarity informations between DRM panels, and the display drivers. To do that, a pol_flags field was added to drm_display_mode. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v12-v13: - Added Docbook documentation for pol_flags the struct field. - Removed the _PRESERVE defines: it was used by patches against the imx_drm driver. Now theses patches have been adapted not to require that defines. ChangeLog v11-v12: - Rebased: This patch now applies against drm_modes.h - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names ChangeLog v10-v11: - Since the imx-drm won't be able to retrive its regulators from the device tree when using display-timings nodes, and that I was told that the drm simple-panel driver already supported that, I then, instead, added what was lacking to make the eukrea displays work with the drm-simple-panel driver. That required a way to get back the display polarity informations from the imx-drm driver without affecting userspace. --- Documentation/DocBook/drm.tmpl | 30 ++ include/drm/drm_modes.h|6 ++ 2 files changed, 36 insertions(+) diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl index c526d81..29c0e5a 100644 --- a/Documentation/DocBook/drm.tmpl +++ b/Documentation/DocBook/drm.tmpl @@ -2292,6 +2292,36 @@ void intel_crt_init(struct drm_device *dev) and structfieldheight_mm/structfield fields are only used internally during EDID parsing and should not be set when creating modes manually. /para + para +The structfieldpol_flags/structfield value represents the display +signal polarity flags, it can be a combination of +variablelist + varlistentry +termDRM_MODE_FLAG_POL_PIXDATA_NEGEDGE/term + listitempara + drive pixel data on falling edge, sample data on rising edge. + /para/listitem + /varlistentry + varlistentry +termDRM_MODE_FLAG_POL_PIXDATA_POSEDGE/term +listitempara + Drive pixel data on rising edge, sample data on falling edge. +/para/listitem + /varlistentry + varlistentry +termDRM_MODE_FLAG_POL_DE_LOW/term +listitempara + data-enable pulse is active low +/para/listitem + /varlistentry + varlistentry +termDRM_MODE_FLAG_POL_DE_HIGH/term +listitempara + data-enable pulse is active low +/para/listitem + /varlistentry +/variablelist + /para /listitem listitem synopsisint (*mode_valid)(struct drm_connector *connector, diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index 91d0582..c5cbe31 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -93,6 +93,11 @@ enum drm_mode_status { #define DRM_MODE_FLAG_3D_MAX DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF +#define DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE BIT(1) +#define DRM_MODE_FLAG_POL_PIXDATA_POSEDGE BIT(2) +#define DRM_MODE_FLAG_POL_DE_LOW BIT(3) +#define DRM_MODE_FLAG_POL_DE_HIGH BIT(4) + struct drm_display_mode { /* Header */ struct list_head head; @@ -144,6 +149,7 @@ struct drm_display_mode { int vrefresh; /* in Hz */ int hsync; /* in kHz */ enum hdmi_picture_aspect picture_aspect_ratio; + unsigned int pol_flags; }; /* mode specified on the command line */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v12][ 07/12] drm: drm_display_mode: add signal polarity flags
On 04/08/2014 08:36 AM, Andrzej Hajda wrote: Hi Denis, Hi, +#define DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE BIT(1) +#define DRM_MODE_FLAG_POL_PIXDATA_POSEDGE BIT(2) +#define DRM_MODE_FLAG_POL_PIXDATA_PRESERVE BIT(3) What is the purpose of DRM_MODE_FLAG_POL_PIXDATA_PRESERVE? If 'preserve' means 'ignore' we can set to zero negedge and posedge bits instead of adding new bit. If it is something different please describe it. Yes, it meant 'ignore'. The goal was to be able to have a way to keep the old behavior while still being able to set the flags. So, with the imx-drm driver, if none of the DRM_MODE_FLAG_POL_PIXDATA were set(that is POSEDGE, NEGEDGE, PRESERVE), then in ipuv3-crtc.c, it went using the old flags settings that were previously hardcoded. The same applied for DRM_MODE_FLAG_POL_DE. The patch using theses flags is the 08/12 of this same serie. struct drm_display_mode { [..] + unsigned int pol_flags; Adding field and macros description to the DocBook would be nice. So I will have to describe it in the Connector Helper Operations section of drm.tmpl, right before the mode_valid synopsis ? Denis. -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 01/12] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased on top of: 211e7f2 [media] DocBook media: drop the old incorrect packed RGB table - Added Philipp Zabel's Ack. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 39 include/uapi/linux/videodev2.h |1 + 2 files changed, 40 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index e1c4f8b..88a7fe1 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index ea468ee..d5d818a 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -299,6 +299,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 02/12] imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v8-v9: - Rebased. - Added Philipp Zabel's ack. - Shortened the patch title. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |3 ++- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index 3be5ce7..83137ef 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -60,7 +60,8 @@ Required properties: - compatible: Should be fsl,imx-parallel-display Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: rgb24, rgb565, bgr666 + display interface. Currently supported types: rgb24, rgb565, bgr666, + rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..6f9abe8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index c60b6c6..01b7ce5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } panel_node = of_parse_phandle(np, fsl,panel, 0); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 03/12] imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased. - Added Philipp Zabel's Ack. - Included Lothar Waßmann's suggestion about imx-ldb.c. - Shortened the patch title ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/imx-ldb.c |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c5a9a24..7b3851d 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -18,7 +18,7 @@ display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index d5d146a..4b036b4 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -24,7 +24,7 @@ soc { display1: display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index fe4c1ef..9141293 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -188,11 +188,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 6f9abe8..154d293 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 05/12] imx-drm: use defines for clock polarity settings
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog 11-v12: - Improved the define names to match the hardware: ENABLE_POL is not a clock signal but instead an enable signal. ChangeLog v9-v10: - New patch which was splitted out from: staging: imx-drm: Use de-active and pixelclk-active display-timings.. - Fixes many issues in staging: imx-drm: Use de-active and pixelclk-active display-timings.: - More clear meaning of the polarity settings. - The SET_CLK_POL and SET_DE_POL masks are not needed anymore. --- drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |8 +++- drivers/staging/imx-drm/ipu-v3/ipu-di.c |4 ++-- drivers/staging/imx-drm/ipuv3-crtc.c|4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index c4d14ea..eba8893 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -27,6 +27,12 @@ enum ipuv3_type { #define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define CLK_POL_NEGEDGE0 +#define CLK_POL_POSEDGE1 + +#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH1 + /* * Bitfield of Display Interface signal polarities. */ @@ -37,7 +43,7 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; /* true = rising edge */ + unsigned clk_pol:1; unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 849b3e1..0ce3f52 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } } - if (sig-clk_pol) + if (sig-clk_pol == CLK_POL_POSEDGE) di_gen |= DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); @@ -606,7 +606,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) reg = ipu_di_read(di, DI_POL); reg = ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15); - if (sig-enable_pol) + if (sig-enable_pol == ENABLE_POL_HIGH) reg |= DI_POL_DRDY_POLARITY_15; if (sig-data_pol) reg |= DI_POL_DRDY_DATA_POLARITY; diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index f2c9cd0..9ba089c 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -157,8 +157,8 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = 1; - sig_cfg.clk_pol = 0; + sig_cfg.enable_pol = ENABLE_POL_HIGH; + sig_cfg.clk_pol = CLK_POL_NEGEDGE; sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 07/12] drm: drm_display_mode: add signal polarity flags
We need a way to pass signal polarity informations between DRM panels, and the display drivers. To do that, a pol_flags field was added to drm_display_mode. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v11-v12: - Rebased: This patch now applies against drm_modes.h - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names ChangeLog v10-v11: - Since the imx-drm won't be able to retrive its regulators from the device tree when using display-timings nodes, and that I was told that the drm simple-panel driver already supported that, I then, instead, added what was lacking to make the eukrea displays work with the drm-simple-panel driver. That required a way to get back the display polarity informations from the imx-drm driver without affecting userspace. --- include/drm/drm_modes.h |8 1 file changed, 8 insertions(+) diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h index 2dbbf99..b3789e2 100644 --- a/include/drm/drm_modes.h +++ b/include/drm/drm_modes.h @@ -93,6 +93,13 @@ enum drm_mode_status { #define DRM_MODE_FLAG_3D_MAX DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF +#define DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE BIT(1) +#define DRM_MODE_FLAG_POL_PIXDATA_POSEDGE BIT(2) +#define DRM_MODE_FLAG_POL_PIXDATA_PRESERVE BIT(3) +#define DRM_MODE_FLAG_POL_DE_LOW BIT(4) +#define DRM_MODE_FLAG_POL_DE_HIGH BIT(5) +#define DRM_MODE_FLAG_POL_DE_PRESERVE BIT(6) + struct drm_display_mode { /* Header */ struct list_head head; @@ -144,6 +151,7 @@ struct drm_display_mode { int vrefresh; /* in Hz */ int hsync; /* in kHz */ enum hdmi_picture_aspect picture_aspect_ratio; + unsigned int pol_flags; }; /* mode specified on the command line */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 04/12] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description.
According to the datasheet, setting the di0_polarity_disp_clk field in the GENERAL di register sets the output clock polarity to active high. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that is now needed by the staging: imx-drm: Use de-active and pixelclk-active patch. --- drivers/staging/imx-drm/ipu-v3/ipu-di.c |2 +- drivers/staging/imx-drm/ipuv3-crtc.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 82a9eba..849b3e1 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } } - if (!sig-clk_pol) + if (sig-clk_pol) di_gen |= DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index c48f640..f2c9cd0 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -158,7 +158,7 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, sig_cfg.Vsync_pol = 1; sig_cfg.enable_pol = 1; - sig_cfg.clk_pol = 1; + sig_cfg.clk_pol = 0; sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 08/12] imx-drm: Use drm_display_mode timings flags.
The previous hardware behaviour was kept if the flags are not set. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v11-v12: - Rebased: It now uses the following new flags defines names: CLK_POL, ENABLE_POL - The inversions in ipuv3-crtc.c are now fixed. - ipuv3-crtc.c was still using mode-private_flags from the previous versions of this patchset, that's now fixed. ChangeLog v10-v11: - This patch was splitted-out and adapted from: Prepare imx-drm for extra display-timings retrival. - The display-timings dt specific part was removed. - The flags names were changed to use the DRM ones from: drm: drm_display_mode: add signal polarity flags --- drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |6 -- drivers/staging/imx-drm/ipu-v3/ipu-di.c |7 ++- drivers/staging/imx-drm/ipuv3-crtc.c| 20 ++-- 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index eba8893..c934394 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -29,9 +29,11 @@ enum ipuv3_type { #define CLK_POL_NEGEDGE0 #define CLK_POL_POSEDGE1 +#define CLK_POL_PRESERVE 2 #define ENABLE_POL_LOW 0 #define ENABLE_POL_HIGH1 +#define ENABLE_POL_PRESERVE2 /* * Bitfield of Display Interface signal polarities. @@ -43,10 +45,10 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; - unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; + u8 clk_pol; + u8 enable_pol; u16 width; u16 height; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 0ce3f52..c00b0ba 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -597,6 +597,8 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) if (sig-clk_pol == CLK_POL_POSEDGE) di_gen |= DI_GEN_POLARITY_DISP_CLK; + else if (sig-clk_pol == CLK_POL_NEGEDGE) + di_gen = ~DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); @@ -604,10 +606,13 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) DI_SYNC_AS_GEN); reg = ipu_di_read(di, DI_POL); - reg = ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15); + reg = ~(DI_POL_DRDY_DATA_POLARITY); if (sig-enable_pol == ENABLE_POL_HIGH) reg |= DI_POL_DRDY_POLARITY_15; + else if (sig-enable_pol == ENABLE_POL_LOW) + reg = ~DI_POL_DRDY_POLARITY_15; + if (sig-data_pol) reg |= DI_POL_DRDY_DATA_POLARITY; diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index 9ba089c..b59b745 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -157,8 +157,24 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = ENABLE_POL_HIGH; - sig_cfg.clk_pol = CLK_POL_NEGEDGE; + if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_POSEDGE) + sig_cfg.clk_pol = CLK_POL_POSEDGE; + else if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE) + sig_cfg.clk_pol = CLK_POL_NEGEDGE; + else if (mode-pol_flags DRM_MODE_FLAG_POL_PIXDATA_PRESERVE) + sig_cfg.clk_pol = CLK_POL_PRESERVE; + else + sig_cfg.clk_pol = CLK_POL_NEGEDGE; + + if (mode-pol_flags DRM_MODE_FLAG_POL_DE_HIGH) + sig_cfg.enable_pol = ENABLE_POL_HIGH; + else if (mode-pol_flags DRM_MODE_FLAG_POL_DE_LOW) + sig_cfg.enable_pol = ENABLE_POL_LOW; + else if (mode-pol_flags DRM_MODE_FLAG_POL_DE_PRESERVE) + sig_cfg.enable_pol = ENABLE_POL_PRESERVE; + else + sig_cfg.enable_pol = ENABLE_POL_HIGH; + sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 06/12] ARM: dts: imx5*, imx6*: correct display-timings nodes.
The imx-drm driver can't use the de-active and pixelclk-active display-timings properties yet. Instead the data-enable and the pixel data clock polarity are hardcoded in the imx-drm driver. So theses properties are now set to keep the same behaviour when imx-drm will start using them. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of: staging imx-drm: Use de-active and pixelclk-active display-timings. --- arch/arm/boot/dts/imx51-babbage.dts |2 ++ arch/arm/boot/dts/imx53-m53evk.dts|2 ++ arch/arm/boot/dts/imx53-tx53-x03x.dts |2 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi|2 ++ 9 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index 2dda06b..91ef454 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts @@ -38,6 +38,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index 4b036b4..d03ced7 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -41,6 +41,8 @@ vfront-porch = 9; vsync-len = 3; vsync-active = 1; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts index 0217dde3..4092a81 100644 --- a/arch/arm/boot/dts/imx53-tx53-x03x.dts +++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts @@ -93,7 +93,7 @@ hsync-active = 0; vsync-active = 0; de-active = 1; - pixelclk-active = 1; + pixelclk-active = 0; }; ET0500 { diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi index c8e5ae0..43f48f2 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi @@ -494,6 +494,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi index 2795dfc..59ecfd1 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -516,6 +516,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index 99be301..e9419a2 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -349,6 +349,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 009abd6..230bbc6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -405,6 +405,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index 3bec128..ed4c72f 100644 --- a/arch
[PATCH v12][ 09/12] drm/panel: Add Eukrea mbimxsd51 displays.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v11-v12: - Rebased: It now uses the new DRM_MODE_FLAG_POL_DE flags defines names ChangeLog v10-v11: - New patch. --- .../bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt |7 ++ .../bindings/panel/eukrea,mbimxsd51-dvi-svga.txt |7 ++ .../bindings/panel/eukrea,mbimxsd51-dvi-vga.txt|7 ++ drivers/gpu/drm/panel/panel-simple.c | 81 4 files changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt create mode 100644 Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt new file mode 100644 index 000..03679d0 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt @@ -0,0 +1,7 @@ +Eukrea CMO-QVGA (320x240 pixels) TFT LCD panel + +Required properties: +- compatible: should be eukrea,mbimxsd51-cmo-qvga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt new file mode 100644 index 000..f408c9a --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt @@ -0,0 +1,7 @@ +Eukrea DVI-SVGA (800x600 pixels) DVI output. + +Required properties: +- compatible: should be eukrea,mbimxsd51-dvi-svga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file mode 100644 index 000..8ea90da --- /dev/null +++ b/Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt @@ -0,0 +1,7 @@ +Eukrea DVI-VGA (640x480 pixels) DVI output. + +Required properties: +- compatible: should be eukrea,mbimxsd51-dvi-vga + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 309f29e..45797d8 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -328,6 +328,78 @@ static const struct panel_desc chunghwa_claa101wb01 = { }, }; +static const struct drm_display_mode eukrea_mbimxsd51_cmoqvga_mode = { + .clock = 6500, + .hdisplay = 320, + .hsync_start = 320 + 38, + .hsync_end = 320 + 38 + 20, + .htotal = 320 + 38 + 20 + 30, + .vdisplay = 240, + .vsync_start = 240 + 15, + .vsync_end = 240 + 15 + 4, + .vtotal = 240 + 15 + 4 + 3, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE | +DRM_MODE_FLAG_POL_DE_LOW, +}; + +static const struct panel_desc eukrea_mbimxsd51_cmoqvga = { + .modes = eukrea_mbimxsd51_cmoqvga_mode, + .num_modes = 1, + .size = { + .width = 73, + .height = 56, + }, +}; + +static const struct drm_display_mode eukrea_mbimxsd51_dvisvga_mode = { + .clock = 44333, + .hdisplay = 800, + .hsync_start = 800 + 112, + .hsync_end = 800 + 112 + 32, + .htotal = 800 + 112 + 32 + 80, + .vdisplay = 600, + .vsync_start = 600 + 3, + .vsync_end = 600 + 3 + 17, + .vtotal = 600 + 3 + 17 + 4, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_POSEDGE | +DRM_MODE_FLAG_POL_DE_HIGH, +}; + +static const struct panel_desc eukrea_mbimxsd51_dvisvga = { + .modes = eukrea_mbimxsd51_dvisvga_mode, + .num_modes = 1, + .size = { + .width = 0, + .height = 0, + }, +}; + +static const struct drm_display_mode eukrea_mbimxsd51_dvivga_mode = { + .clock = 23750, + .hdisplay = 640, + .hsync_start = 640 + 80, + .hsync_end = 640 + 80 + 16, + .htotal = 640 + 80 + 16 + 64, + .vdisplay = 480, + .vsync_start = 480 + 3, + .vsync_end = 480 + 3 + 13, + .vtotal = 480 + 3 + 13 + 4, + .vrefresh = 60, + .pol_flags = DRM_MODE_FLAG_POL_PIXDATA_POSEDGE | +DRM_MODE_FLAG_POL_DE_HIGH, +}; + +static const struct panel_desc eukrea_mbimxsd51_dvivga = { + .modes = eukrea_mbimxsd51_dvivga_mode, + .num_modes = 1, + .size = { + .width = 0, + .height = 0, + }, +}; + static const struct drm_display_mode lg_lp129qe_mode = { .clock = 285250, .hdisplay = 2560, @@ -380,6 +452,15 @@ static const struct
[PATCH v12][ 10/12] ARM: dts: mbimx51sd: Add display support.
The CMO-QVGA, DVI-SVGA and DVI-VGA are added. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v10-v11: - Now uses the drm-panel instead of the display-timings. This is to get regulator support, which is lacking in the imx-drm driver when using the display-timings. ChangeLog v9-v10: - Rebased - Now enables the cmo-qvga regulator at boot. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - updated pixelclk-active after the following patch: imx-drm: Match ipu_di_signal_cfg's clk_pol with its description. ChangeLog v7-v8: - Rebased the patch: added the now required imx-drm node. - Adapted the svga clock-frequency value in order to still be able to display an image after the following commit: imx-drm: ipu-v3: more inteligent DI clock selection ChangeLog v6-v7: - Shrinked even more the Cc list. - Since the pingrp headers were removed, the references to it where replaced by the actual pins. - Added the targets to arch/arm/boot/dts/Makefile ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to new GPIO defines. - Updated to new licenses checkpatch requirements. - one whitespace cleanup. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds display support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. - rebased and reworked the dts displays addition. - Also rebased and reworked the fsl,pins usage. --- arch/arm/boot/dts/Makefile |3 ++ .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 41 .../imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts | 28 +++ .../imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts | 28 +++ .../boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts | 49 5 files changed, 149 insertions(+) create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts create mode 100644 arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index 2145af6..4ac8aeb 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -166,6 +166,9 @@ dtb-$(CONFIG_ARCH_MXC) += \ imx51-apf51dev.dtb \ imx51-babbage.dtb \ imx51-eukrea-mbimxsd51-baseboard.dtb \ + imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dtb \ + imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dtb \ + imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dtb \ imx53-ard.dtb \ imx53-m53evk.dtb \ imx53-mba53.dtb \ diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts new file mode 100644 index 000..7c280f8 --- /dev/null +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -0,0 +1,41 @@ +/* + * Copyright 2013 Eukréa Electromatique de...@eukrea.com + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include imx51-eukrea-mbimxsd51-baseboard.dts + +/ { + model = Eukrea MBIMXSD51 with the CMO-QVGA Display; + compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + + panel: panel { + compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; + power-supply = reg_lcd_3v3; + }; + + reg_lcd_3v3: lcd-en { + compatible = regulator-fixed; + pinctrl-names = default; + pinctrl-0 = pinctrl_reg_lcd_3v3; + regulator-name = lcd-3v3; + regulator-min-microvolt = 330; + regulator-max-microvolt = 330; + gpio = gpio3 13 GPIO_ACTIVE_HIGH; + enable-active-high; + regulator-boot-on; + }; +}; + +display { + status = okay; + fsl,panel = panel; +}; diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts new file mode 100644 index 000..323ebf4 --- /dev/null +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts @@ -0,0 +1,28 @@ +/* + * Copyright 2013 Eukréa Electromatique de...@eukrea.com + * + * This program is free software; you can redistribute it and/or + * modify
[PATCH v12][ 11/12] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v11: - Now uses the drm-panel instead of the display-timings. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - The backlight is now on at boot. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to the new GPIO defines. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds backlight support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. --- .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts index 7c280f8..4a3f805 100644 --- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -17,9 +17,19 @@ model = Eukrea MBIMXSD51 with the CMO-QVGA Display; compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + backlight: backlight { + compatible = gpio-backlight; + pinctrl-names = default; + pinctrl-0 = pinctrl_backlight_1; + gpios = gpio3 4 GPIO_ACTIVE_HIGH; + default-brightness-level = 1; + default-on; + }; + panel: panel { compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; power-supply = reg_lcd_3v3; + backlight = backlight; }; reg_lcd_3v3: lcd-en { -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v12][ 12/12] ARM: imx_v6_v7_defconfig: Add more drm drivers.
The DRM_PANEL_SIMPLE is needed by the eukrea mbimxsd51's displays. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v10-v11: - New patch, splitting it would be overkill. --- arch/arm/configs/imx_v6_v7_defconfig |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 09e9743..0316926 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -183,6 +183,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_CODA=y CONFIG_SOC_CAMERA_OV2640=y CONFIG_DRM=y +CONFIG_DRM_PANEL_SIMPLE=y CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_L4F00242T03=y @@ -245,6 +246,7 @@ CONFIG_DRM_IMX_TVE=y CONFIG_DRM_IMX_LDB=y CONFIG_DRM_IMX_IPUV3_CORE=y CONFIG_DRM_IMX_IPUV3=y +CONFIG_DRM_IMX_HDMI=y CONFIG_COMMON_CLK_DEBUG=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_PWM=y -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11][ 01/12] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased on top of: 211e7f2 [media] DocBook media: drop the old incorrect packed RGB table - Added Philipp Zabel's Ack. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 39 include/uapi/linux/videodev2.h |1 + 2 files changed, 40 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index e1c4f8b..88a7fe1 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 4dc7052..efcbc15 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -299,6 +299,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11][ 02/12] imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v8-v9: - Rebased. - Added Philipp Zabel's ack. - Shortened the patch title. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |3 ++- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index 3be5ce7..83137ef 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -60,7 +60,8 @@ Required properties: - compatible: Should be fsl,imx-parallel-display Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: rgb24, rgb565, bgr666 + display interface. Currently supported types: rgb24, rgb565, bgr666, + rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..6f9abe8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index c60b6c6..01b7ce5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } panel_node = of_parse_phandle(np, fsl,panel, 0); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11][ 03/12] imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased. - Added Philipp Zabel's Ack. - Included Lothar Waßmann's suggestion about imx-ldb.c. - Shortened the patch title ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/imx-ldb.c |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c5a9a24..7b3851d 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -18,7 +18,7 @@ display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index f6d3ac3..4646ea9 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -23,7 +23,7 @@ soc { display1: display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 33d2b883..e6d7bc7 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -185,11 +185,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 6f9abe8..154d293 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11][ 05/12] imx-drm: use defines for clock polarity settings
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch which was splitted out from: staging: imx-drm: Use de-active and pixelclk-active display-timings.. - Fixes many issues in staging: imx-drm: Use de-active and pixelclk-active display-timings.: - More clear meaning of the polarity settings. - The SET_CLK_POL and SET_DE_POL masks are not needed anymore. --- drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |8 +++- drivers/staging/imx-drm/ipu-v3/ipu-di.c |4 ++-- drivers/staging/imx-drm/ipuv3-crtc.c|4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index c4d14ea..b95cba1 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -27,6 +27,12 @@ enum ipuv3_type { #define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define CLK_POL_ACTIVE_LOW 0 +#define CLK_POL_ACTIVE_HIGH1 + +#define ENABLE_POL_NEGEDGE 0 +#define ENABLE_POL_POSEDGE 1 + /* * Bitfield of Display Interface signal polarities. */ @@ -37,7 +43,7 @@ struct ipu_di_signal_cfg { unsigned clksel_en:1; unsigned clkidle_en:1; unsigned data_pol:1;/* true = inverted */ - unsigned clk_pol:1; /* true = rising edge */ + unsigned clk_pol:1; unsigned enable_pol:1; unsigned Hsync_pol:1; /* true = active high */ unsigned Vsync_pol:1; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 849b3e1..53646aa 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } } - if (sig-clk_pol) + if (sig-clk_pol == CLK_POL_ACTIVE_HIGH) di_gen |= DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); @@ -606,7 +606,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) reg = ipu_di_read(di, DI_POL); reg = ~(DI_POL_DRDY_DATA_POLARITY | DI_POL_DRDY_POLARITY_15); - if (sig-enable_pol) + if (sig-enable_pol == ENABLE_POL_POSEDGE) reg |= DI_POL_DRDY_POLARITY_15; if (sig-data_pol) reg |= DI_POL_DRDY_DATA_POLARITY; diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index db6bd64..8cfeb47 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -157,8 +157,8 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, if (mode-flags DRM_MODE_FLAG_PVSYNC) sig_cfg.Vsync_pol = 1; - sig_cfg.enable_pol = 1; - sig_cfg.clk_pol = 0; + sig_cfg.enable_pol = ENABLE_POL_POSEDGE; + sig_cfg.clk_pol = CLK_POL_ACTIVE_LOW; sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v11][ 04/12] imx-drm: Match ipu_di_signal_cfg's clk_pol with its description.
According to the datasheet, setting the di0_polarity_disp_clk field in the GENERAL di register sets the output clock polarity to active high. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that is now needed by the staging: imx-drm: Use de-active and pixelclk-active patch. --- drivers/staging/imx-drm/ipu-v3/ipu-di.c |2 +- drivers/staging/imx-drm/ipuv3-crtc.c|2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-di.c b/drivers/staging/imx-drm/ipu-v3/ipu-di.c index 82a9eba..849b3e1 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-di.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-di.c @@ -595,7 +595,7 @@ int ipu_di_init_sync_panel(struct ipu_di *di, struct ipu_di_signal_cfg *sig) } } - if (!sig-clk_pol) + if (sig-clk_pol) di_gen |= DI_GEN_POLARITY_DISP_CLK; ipu_di_write(di, di_gen, DI_GENERAL); diff --git a/drivers/staging/imx-drm/ipuv3-crtc.c b/drivers/staging/imx-drm/ipuv3-crtc.c index a8d0178..db6bd64 100644 --- a/drivers/staging/imx-drm/ipuv3-crtc.c +++ b/drivers/staging/imx-drm/ipuv3-crtc.c @@ -158,7 +158,7 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, sig_cfg.Vsync_pol = 1; sig_cfg.enable_pol = 1; - sig_cfg.clk_pol = 1; + sig_cfg.clk_pol = 0; sig_cfg.width = mode-hdisplay; sig_cfg.height = mode-vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 12/12] ARM: imx_v6_v7_defconfig: Add more drm drivers.
The DRM_PANEL_SIMPLE is needed by the eukrea mbimxsd51's displays. Signed-off-by: Denis Carikli de...@eukrea.com --- - New patch, splitting it would be overkill. --- arch/arm/configs/imx_v6_v7_defconfig |2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig index 09e9743..0316926 100644 --- a/arch/arm/configs/imx_v6_v7_defconfig +++ b/arch/arm/configs/imx_v6_v7_defconfig @@ -183,6 +183,7 @@ CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_CODA=y CONFIG_SOC_CAMERA_OV2640=y CONFIG_DRM=y +CONFIG_DRM_PANEL_SIMPLE=y CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_L4F00242T03=y @@ -245,6 +246,7 @@ CONFIG_DRM_IMX_TVE=y CONFIG_DRM_IMX_LDB=y CONFIG_DRM_IMX_IPUV3_CORE=y CONFIG_DRM_IMX_IPUV3=y +CONFIG_DRM_IMX_HDMI=y CONFIG_COMMON_CLK_DEBUG=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_PWM=y -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 11/12] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v11: - Now uses the drm-panel instead of the display-timings. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - The backlight is now on at boot. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Reordered the Cc list. ChangeLog v3-v5: - Updated to the new GPIO defines. ChangeLog v2-v3: - Splitted out from the patch that added support for the cpuimx51/mbimxsd51 boards. - This patch now only adds backlight support. - Added some interested people in the Cc list, and removed some people that might be annoyed by the receiving of that patch which is unrelated to their subsystem. --- .../imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts index 7c280f8..4a3f805 100644 --- a/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts +++ b/arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts @@ -17,9 +17,19 @@ model = Eukrea MBIMXSD51 with the CMO-QVGA Display; compatible = eukrea,mbimxsd51-baseboard-cmo-qvga, eukrea,mbimxsd51-baseboard, eukrea,cpuimx51, fsl,imx51; + backlight: backlight { + compatible = gpio-backlight; + pinctrl-names = default; + pinctrl-0 = pinctrl_backlight_1; + gpios = gpio3 4 GPIO_ACTIVE_HIGH; + default-brightness-level = 1; + default-on; + }; + panel: panel { compatible = eukrea,mbimxsd51-cmo-qvga, simple-panel; power-supply = reg_lcd_3v3; + backlight = backlight; }; reg_lcd_3v3: lcd-en { -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10][ 03/10] imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased. - Added Philipp Zabel's Ack. - Included Lothar Waßmann's suggestion about imx-ldb.c. - Shortened the patch title ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/imx-ldb.c |4 ++-- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c5a9a24..7b3851d 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -18,7 +18,7 @@ display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index f6d3ac3..4646ea9 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -23,7 +23,7 @@ soc { display1: display@di1 { compatible = fsl,imx-parallel-display; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index 33d2b883..e6d7bc7 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -185,11 +185,11 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder) switch (imx_ldb_ch-chno) { case 0: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH0_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; case 1: pixel_fmt = (ldb-ldb_ctrl LDB_DATA_WIDTH_CH1_24) ? - V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666; + V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_RGB666; break; default: dev_err(ldb-dev, unable to config di%d panel format\n, diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 6f9abe8..154d293 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10][ 02/10] imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v8-v9: - Rebased. - Added Philipp Zabel's ack. - Shortened the patch title. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |3 ++- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index 3be5ce7..83137ef 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -60,7 +60,8 @@ Required properties: - compatible: Should be fsl,imx-parallel-display Optional properties: - interface_pix_fmt: How this display is connected to the - display interface. Currently supported types: rgb24, rgb565, bgr666 + display interface. Currently supported types: rgb24, rgb565, bgr666, + rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..6f9abe8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index c60b6c6..01b7ce5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } panel_node = of_parse_phandle(np, fsl,panel, 0); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10][ 09/10] imx-drm: parallel-display: retrive extra display-timings.
If de-active and/or pixelclk-active properties were set in the display-timings DT node, they were not used. Instead the data-enable and the pixel data clock polarity were hardcoded. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch from what's left of: staging: imx-drm: Use de-active and pixelclk-active - New patch title. --- drivers/staging/imx-drm/parallel-display.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index 871a737..09b07d5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -85,7 +85,8 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector) return -EINVAL; of_get_drm_display_mode(np, imxpd-mode, OF_USE_NATIVE_MODE); drm_mode_copy(mode, imxpd-mode); - imx_drm_set_default_timing_flags(mode); + imx_drm_of_get_extra_timing_flags(imxpd-connector, mode, + imxpd-dev-of_node); mode-type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED, drm_mode_probed_add(connector, mode); num_modes++; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10][ 01/10] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com Acked-by: Philipp Zabel p.za...@pengutronix.de --- ChangeLog v9-v10: - Rebased on top of: 211e7f2 [media] DocBook media: drop the old incorrect packed RGB table - Added Philipp Zabel's Ack. ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 39 include/uapi/linux/videodev2.h |1 + 2 files changed, 40 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index e1c4f8b..88a7fe1 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 28abdf7..5293b81 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -299,6 +299,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10][ 06/10] ARM: dts: imx5*, imx6*: correct display-timings nodes.
The imx-drm driver can't use the de-active and pixelclk-active display-timings properties yet. Instead the data-enable and the pixel data clock polarity are hardcoded in the imx-drm driver. So theses properties are now set to keep the same behaviour when imx-drm will start using them. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of: staging imx-drm: Use de-active and pixelclk-active display-timings. --- arch/arm/boot/dts/imx51-babbage.dts |2 ++ arch/arm/boot/dts/imx53-m53evk.dts|2 ++ arch/arm/boot/dts/imx53-tx53-x03x.dts |2 +- arch/arm/boot/dts/imx6qdl-gw53xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-gw54xx.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabreauto.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabrelite.dtsi |2 ++ arch/arm/boot/dts/imx6qdl-sabresd.dtsi|2 ++ 9 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx51-babbage.dts b/arch/arm/boot/dts/imx51-babbage.dts index 9e9deb2..4732a00 100644 --- a/arch/arm/boot/dts/imx51-babbage.dts +++ b/arch/arm/boot/dts/imx51-babbage.dts @@ -38,6 +38,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index 4646ea9..d6e1046 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -40,6 +40,8 @@ vfront-porch = 9; vsync-len = 3; vsync-active = 1; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx53-tx53-x03x.dts b/arch/arm/boot/dts/imx53-tx53-x03x.dts index 0217dde3..4092a81 100644 --- a/arch/arm/boot/dts/imx53-tx53-x03x.dts +++ b/arch/arm/boot/dts/imx53-tx53-x03x.dts @@ -93,7 +93,7 @@ hsync-active = 0; vsync-active = 0; de-active = 1; - pixelclk-active = 1; + pixelclk-active = 0; }; ET0500 { diff --git a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi index c8e5ae0..43f48f2 100644 --- a/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi @@ -494,6 +494,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi index 2795dfc..59ecfd1 100644 --- a/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +++ b/arch/arm/boot/dts/imx6qdl-gw54xx.dtsi @@ -516,6 +516,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi index 99be301..e9419a2 100644 --- a/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +++ b/arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi @@ -349,6 +349,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi index 009abd6..230bbc6 100644 --- a/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +++ b/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi @@ -405,6 +405,8 @@ vfront-porch = 7; hsync-len = 60; vsync-len = 10; + de-active = 1; + pixelclk-active = 0; }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi b/arch/arm/boot/dts/imx6qdl-sabrelite.dtsi index 3bec128..ed4c72f 100644 --- a/arch
[PATCH v10][ 08/10] imx-drm: imx-drm-core: provide a common display timings retrival function.
imx_drm_of_get_extra_timing_flags will be used to retrive the native-mode and de-active display-timings node properties in the device tree. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of staging: imx-drm: Use de-active and pixelclk-active - When a IMXDRM_MODE_FLAG_ flag is set, its opposite flag is also unset. --- drivers/staging/imx-drm/imx-drm-core.c | 57 drivers/staging/imx-drm/imx-drm.h |2 ++ 2 files changed, 59 insertions(+) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 6a71cd9..d877b77 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -24,6 +24,7 @@ #include drm/drm_crtc_helper.h #include drm/drm_gem_cma_helper.h #include drm/drm_fb_cma_helper.h +#include video/of_display_timing.h #include imx-drm.h @@ -492,6 +493,62 @@ int imx_drm_encoder_parse_of(struct drm_device *drm, } EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of); +int imx_drm_of_get_extra_timing_flags(struct drm_connector *connector, +struct drm_display_mode *mode, +struct device_node *display_np) +{ + struct drm_display_mode *new_mode = drm_mode_create(connector-dev); + struct device_node *timings_np; + struct device_node *mode_np; + u32 val; + + if (!new_mode) + return -EINVAL; + + of_get_drm_display_mode(display_np, mode, OF_USE_NATIVE_MODE); + + timings_np = of_get_child_by_name(display_np, display-timings); + if (timings_np) { + /* get the display mode node */ + mode_np = of_parse_phandle(timings_np, + native-mode, 0); + if (!mode_np) + mode_np = of_get_next_child(timings_np, NULL); + + if (!of_property_read_u32(mode_np, de-active, val)) { + if (val) { + mode-private_flags |= + IMXDRM_MODE_FLAG_DE_HIGH; + mode-private_flags = + ~IMXDRM_MODE_FLAG_DE_LOW; + } else { + mode-private_flags = + ~IMXDRM_MODE_FLAG_DE_HIGH; + mode-private_flags |= + IMXDRM_MODE_FLAG_DE_LOW; + } + } + + if (!of_property_read_u32(mode_np, pixelclk-active, + val)) { + if (val) { + mode-private_flags |= + IMXDRM_MODE_FLAG_PIXDATA_POSEDGE; + mode-private_flags = + ~IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE; + } else { + mode-private_flags = + ~IMXDRM_MODE_FLAG_PIXDATA_POSEDGE; + mode-private_flags |= + IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE; + } + } + } + + return 0; +} +EXPORT_SYMBOL_GPL(imx_drm_of_get_extra_timing_flags); + void imx_drm_set_default_timing_flags(struct drm_display_mode *mode) { mode-private_flags = ~IMXDRM_MODE_FLAG_DE_LOW; diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h index ae07d9d..ae01f4d 100644 --- a/drivers/staging/imx-drm/imx-drm.h +++ b/drivers/staging/imx-drm/imx-drm.h @@ -54,6 +54,8 @@ int imx_drm_encoder_get_mux_id(struct device_node *node, struct drm_encoder *encoder); int imx_drm_encoder_parse_of(struct drm_device *drm, struct drm_encoder *encoder, struct device_node *np); +int imx_drm_of_get_extra_timing_flags(struct drm_connector *connector, + struct drm_display_mode *mode, struct device_node *display_np); void imx_drm_set_default_timing_flags(struct drm_display_mode *mode); int imx_drm_connector_mode_valid(struct drm_connector *connector, -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v10][ 07/10] imx-drm: Prepare imx-drm for extra display-timings retrival.
The hardware behaviour was kept. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v9-v10: - New patch that was splitted out of staging: imx-drm: Use de-active and pixelclk-active display-timings. - The IMXDRM_MODE_FLAG_ are now using the BIT macros. - The SET_CLK_POL and SET_DE_POL masks were removed. The code was updated accordingly. --- drivers/staging/imx-drm/imx-drm-core.c | 10 ++ drivers/staging/imx-drm/imx-drm.h |6 ++ drivers/staging/imx-drm/imx-hdmi.c |3 +++ drivers/staging/imx-drm/imx-ldb.c |3 +++ drivers/staging/imx-drm/imx-tve.c |3 +++ drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h |6 -- drivers/staging/imx-drm/ipu-v3/ipu-di.c |7 ++- drivers/staging/imx-drm/ipuv3-crtc.c| 12 ++-- drivers/staging/imx-drm/parallel-display.c |2 ++ 9 files changed, 47 insertions(+), 5 deletions(-) diff --git a/drivers/staging/imx-drm/imx-drm-core.c b/drivers/staging/imx-drm/imx-drm-core.c index 4144a75..6a71cd9 100644 --- a/drivers/staging/imx-drm/imx-drm-core.c +++ b/drivers/staging/imx-drm/imx-drm-core.c @@ -492,6 +492,16 @@ int imx_drm_encoder_parse_of(struct drm_device *drm, } EXPORT_SYMBOL_GPL(imx_drm_encoder_parse_of); +void imx_drm_set_default_timing_flags(struct drm_display_mode *mode) +{ + mode-private_flags = ~IMXDRM_MODE_FLAG_DE_LOW; + mode-private_flags = ~IMXDRM_MODE_FLAG_PIXDATA_POSEDGE; + + mode-private_flags |= IMXDRM_MODE_FLAG_DE_HIGH; + mode-private_flags |= IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE; +} +EXPORT_SYMBOL_GPL(imx_drm_set_default_timing_flags); + /* * @node: device tree node containing encoder input ports * @encoder: drm_encoder diff --git a/drivers/staging/imx-drm/imx-drm.h b/drivers/staging/imx-drm/imx-drm.h index a322bac..ae07d9d 100644 --- a/drivers/staging/imx-drm/imx-drm.h +++ b/drivers/staging/imx-drm/imx-drm.h @@ -1,6 +1,11 @@ #ifndef _IMX_DRM_H_ #define _IMX_DRM_H_ +#define IMXDRM_MODE_FLAG_DE_HIGH BIT(0) +#define IMXDRM_MODE_FLAG_DE_LOWBIT(1) +#define IMXDRM_MODE_FLAG_PIXDATA_POSEDGE BIT(2) +#define IMXDRM_MODE_FLAG_PIXDATA_NEGEDGE BIT(3) + struct device_node; struct drm_crtc; struct drm_connector; @@ -49,6 +54,7 @@ int imx_drm_encoder_get_mux_id(struct device_node *node, struct drm_encoder *encoder); int imx_drm_encoder_parse_of(struct drm_device *drm, struct drm_encoder *encoder, struct device_node *np); +void imx_drm_set_default_timing_flags(struct drm_display_mode *mode); int imx_drm_connector_mode_valid(struct drm_connector *connector, struct drm_display_mode *mode); diff --git a/drivers/staging/imx-drm/imx-hdmi.c b/drivers/staging/imx-drm/imx-hdmi.c index 4540a9aa..0b215cc 100644 --- a/drivers/staging/imx-drm/imx-hdmi.c +++ b/drivers/staging/imx-drm/imx-hdmi.c @@ -1431,6 +1431,9 @@ static bool imx_hdmi_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { + drm_mode_copy(adjusted_mode, mode); + imx_drm_set_default_timing_flags(ajusted_mode); + return true; } diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c index e6d7bc7..9845a6b 100644 --- a/drivers/staging/imx-drm/imx-ldb.c +++ b/drivers/staging/imx-drm/imx-ldb.c @@ -108,6 +108,9 @@ static int imx_ldb_connector_get_modes(struct drm_connector *connector) mode = drm_mode_create(connector-dev); if (!mode) return -EINVAL; + + imx_drm_set_default_timing_flags(imx_ldb_ch-mode); + drm_mode_copy(mode, imx_ldb_ch-mode); mode-type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED; drm_mode_probed_add(connector, mode); diff --git a/drivers/staging/imx-drm/imx-tve.c b/drivers/staging/imx-drm/imx-tve.c index 575533f..605013c 100644 --- a/drivers/staging/imx-drm/imx-tve.c +++ b/drivers/staging/imx-drm/imx-tve.c @@ -294,6 +294,9 @@ static bool imx_tve_encoder_mode_fixup(struct drm_encoder *encoder, const struct drm_display_mode *mode, struct drm_display_mode *adjusted_mode) { + drm_mode_copy(adjusted_mode, mode); + imx_drm_set_default_timing_flags(adjusted_mode); + return true; } diff --git a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h index b95cba1..3abeea3 100644 --- a/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h +++ b/drivers/staging/imx-drm/ipu-v3/imx-ipu-v3.h @@ -29,9 +29,11 @@ enum ipuv3_type { #define CLK_POL_ACTIVE_LOW 0 #define CLK_POL_ACTIVE_HIGH1 +#define CLK_POL_PRESERVE 2 #define ENABLE_POL_NEGEDGE 0 #define ENABLE_POL_POSEDGE 1 +#define ENABLE_POL_PRESERVE2 /* * Bitfield of Display
[PATCH v9][ 1/8] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 6ae7bbe..3051d67 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,6 +294,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B
[PATCH v9][ 3/8] staging: imx-drm: Correct BGR666 and the board's dts that use them.
The current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24. Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. - Added a better explanation of the change. ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index c29cfa9..bff3201 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -19,7 +19,7 @@ display@di1 { compatible = fsl,imx-parallel-display; crtcs = ipu 0; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index d939ba8..4250e74 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -24,7 +24,7 @@ display1: display@di1 { compatible = fsl,imx-parallel-display; crtcs = ipu 1; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 6f9abe8..154d293 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH v9][ 2/8] staging: imx-drm: Add RGB666 support for parallel display.
Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v8-v9: - Removed the Cc. They are now set in git-send-email directly. - Rebased. ChangeLog v7-v8: - Shrinked even more the Cc list. ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index b876d49..2d24425 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -29,7 +29,7 @@ Required properties: - crtc: the crtc this display is connected to, see below Optional properties: - interface_pix_fmt: How this display is connected to the - crtc. Currently supported types: rgb24, rgb565, bgr666 + crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..6f9abe8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index c60b6c6..01b7ce5 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -219,6 +219,8 @@ static int imx_pd_bind(struct device *dev, struct device *master, void *data) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } panel_node = of_parse_phandle(np, fsl,panel, 0); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv8][ 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Eric Bénard e...@eukrea.com Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: linux-media@vger.kernel.org Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- ChangeLog v7-v8: - Added Mauro Carvalho Chehab back to the list of Cc ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 6ae7bbe..3051d67 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,6 +294,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define
[PATCHv7][ 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Eric Bénard e...@eukrea.com CC: Troy Kisky troy.ki...@boundarydevices.com Cc: linux-media@vger.kernel.org Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- ChangeLog v6-v7: - Shrinked even more the Cc list. ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 6ae7bbe..3051d67 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,6 +294,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define
[PATCHv6 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Eric Bénard e...@eukrea.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: Mauro Carvalho Chehab m.che...@samsung.com CC: Troy Kisky troy.ki...@boundarydevices.com Cc: linux-media@vger.kernel.org Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- ChangeLog v5-v6: - Remove people not concerned by this patch from the Cc list. ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 437f1b0..e8ff410 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,6 +294,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R
[PATCHv5][ 2/8] staging: imx-drm: Add RGB666 support for parallel display.
Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v3-v5: - Use the correct RGB order. ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index b876d49..2d24425 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -29,7 +29,7 @@ Required properties: - crtc: the crtc this display is connected to, see below Optional properties: - interface_pix_fmt: How this display is connected to the - crtc. Currently supported types: rgb24, rgb565, bgr666 + crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d0e3bc3..617e65b 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index 24aa9be..bb71d6d 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -222,6 +222,8 @@ static int imx_pd_probe(struct platform_device *pdev) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } imxpd-dev = pdev-dev; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv5][ 1/8] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 437f1b0..e8ff410 100644 --- a/include/uapi/linux/videodev2.h
[PATCHv5][ 3/8] staging: imx-drm: Correct BGR666 and the board's dts that use them.
Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v5: - New patch. --- arch/arm/boot/dts/imx51-apf51dev.dts|2 +- arch/arm/boot/dts/imx53-m53evk.dts |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c |4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx51-apf51dev.dts b/arch/arm/boot/dts/imx51-apf51dev.dts index f36a3aa..3b6de6a 100644 --- a/arch/arm/boot/dts/imx51-apf51dev.dts +++ b/arch/arm/boot/dts/imx51-apf51dev.dts @@ -19,7 +19,7 @@ display@di1 { compatible = fsl,imx-parallel-display; crtcs = ipu 0; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/arch/arm/boot/dts/imx53-m53evk.dts b/arch/arm/boot/dts/imx53-m53evk.dts index c623774..b98c897 100644 --- a/arch/arm/boot/dts/imx53-m53evk.dts +++ b/arch/arm/boot/dts/imx53-m53evk.dts @@ -24,7 +24,7 @@ display@di1 { compatible = fsl,imx-parallel-display; crtcs = ipu 1; - interface-pix-fmt = bgr666; + interface-pix-fmt = rgb666; pinctrl-names = default; pinctrl-0 = pinctrl_ipu_disp1; diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 617e65b..b11a2aa 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -397,9 +397,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, /* bgr666 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 5, 0xfc); /* blue */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 0, 17, 0xfc); /* blue */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ - ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 5, 0xfc); /* red */ /* bgr24 */ ipu_dc_map_clear(priv, IPU_DC_MAP_BGR24); -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv4][ 1/7] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- ChangeLog v3-v4: - Added Laurent Pinchart's Ack. ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 437f1b0..e8ff410 100644 --- a/include/uapi/linux/videodev2.h
[PATCHv4][ 3/7] staging: imx-drm: Add RGB666 support for parallel display.
Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index b876d49..2d24425 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -29,7 +29,7 @@ Required properties: - crtc: the crtc this display is connected to, see below Optional properties: - interface_pix_fmt: How this display is connected to the - crtc. Currently supported types: rgb24, rgb565, bgr666 + crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d0e3bc3..bcc7680 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index b34f3a3..46b6fce 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -248,6 +248,8 @@ static int imx_pd_probe(struct platform_device *pdev) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } imxpd-dev = pdev-dev; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCHv3 2/8] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com Acked-by: Mauro Carvalho Chehab m.che...@samsung.com --- ChangeLog v2-v3: - Added some interested people in the Cc list. - Added Mauro Carvalho Chehab's Ack. - Added documentation. --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 78 include/uapi/linux/videodev2.h |1 + 2 files changed, 79 insertions(+) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 166c8d6..f6a3e84 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -279,6 +279,45 @@ colorspace constantV4L2_COLORSPACE_SRGB/constant./para entry/entry entry/entry /row + row id=V4L2-PIX-FMT-RGB666 + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row id=V4L2-PIX-FMT-BGR24 entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry @@ -781,6 +820,45 @@ defined in error. Drivers may interpret them as in xref entry/entry entry/entry /row + row!-- id=V4L2-PIX-FMT-RGB666 -- + entryconstantV4L2_PIX_FMT_RGB666/constant/entry + entry'RGBH'/entry + entry/entry + entryrsubscript5/subscript/entry + entryrsubscript4/subscript/entry + entryrsubscript3/subscript/entry + entryrsubscript2/subscript/entry + entryrsubscript1/subscript/entry + entryrsubscript0/subscript/entry + entrygsubscript5/subscript/entry + entrygsubscript4/subscript/entry + entry/entry + entrygsubscript3/subscript/entry + entrygsubscript2/subscript/entry + entrygsubscript1/subscript/entry + entrygsubscript0/subscript/entry + entrybsubscript5/subscript/entry + entrybsubscript4/subscript/entry + entrybsubscript3/subscript/entry + entrybsubscript2/subscript/entry + entry/entry + entrybsubscript1/subscript/entry + entrybsubscript0/subscript/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + entry/entry + /row row!-- id=V4L2-PIX-FMT-BGR24 -- entryconstantV4L2_PIX_FMT_BGR24/constant/entry entry'BGR3'/entry diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 437f1b0..e8ff410 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,6 +294,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X
[PATCHv3 4/8] staging: imx-drm: Add RGB666 support for parallel display.
Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: Shawn Guo shawn@linaro.org Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com --- ChangeLog v2-v3: - Added some interested people in the Cc list. - Removed the commit message long desciption that was just a copy of the short description. - Rebased the patch. - Fixed a copy-paste error in the ipu_dc_map_clear parameter. --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index b876d49..2d24425 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -29,7 +29,7 @@ Required properties: - crtc: the crtc this display is connected to, see below Optional properties: - interface_pix_fmt: How this display is connected to the - crtc. Currently supported types: rgb24, rgb565, bgr666 + crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d0e3bc3..bcc7680 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -92,6 +92,7 @@ enum ipu_dc_map { IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, IPU_DC_MAP_BGR24, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -155,6 +156,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_BGR666; case V4L2_PIX_FMT_BGR24: return IPU_DC_MAP_BGR24; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -404,6 +407,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 1, 15, 0xff); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR24, 0, 23, 0xff); /* blue */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_RGB666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index 24aa9be..bb71d6d 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -222,6 +222,8 @@ static int imx_pd_probe(struct platform_device *pdev) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } imxpd-dev = pdev-dev; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[Patch v2][ 04/37] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
That new macro is needed by the imx_drm staging driver for supporting the QVGA display of the eukrea-cpuimx51 board. Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com --- include/uapi/linux/videodev2.h |1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 437f1b0..e8ff410 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,6 +294,7 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ #define V4L2_PIX_FMT_BGR666 v4l2_fourcc('B', 'G', 'R', 'H') /* 18 BGR-6-6-6 */ +#define V4L2_PIX_FMT_RGB666 v4l2_fourcc('R', 'G', 'B', 'H') /* 18 RGB-6-6-6 */ #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[Patch v2][ 13/37] staging: imx-drm: Add RGB666 support for parallel display
Support the RGB666 format on the IPUv3 parallel display. Cc: Rob Herring rob.herr...@calxeda.com Cc: Pawel Moll pawel.m...@arm.com Cc: Mark Rutland mark.rutl...@arm.com Cc: Stephen Warren swar...@wwwdotorg.org Cc: Ian Campbell ijc+devicet...@hellion.org.uk Cc: devicet...@vger.kernel.org Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: driverdev-de...@linuxdriverproject.org Cc: David Airlie airl...@linux.ie Cc: dri-de...@lists.freedesktop.org Cc: Mauro Carvalho Chehab m.che...@samsung.com Cc: Laurent Pinchart laurent.pinch...@ideasonboard.com Cc: linux-media@vger.kernel.org Cc: Sascha Hauer ker...@pengutronix.de Cc: linux-arm-ker...@lists.infradead.org Cc: Eric Bénard e...@eukrea.com Signed-off-by: Denis Carikli de...@eukrea.com --- .../bindings/staging/imx-drm/fsl-imx-drm.txt |2 +- drivers/staging/imx-drm/ipu-v3/ipu-dc.c|9 + drivers/staging/imx-drm/parallel-display.c |2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt index b876d49..2d24425 100644 --- a/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +++ b/Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt @@ -29,7 +29,7 @@ Required properties: - crtc: the crtc this display is connected to, see below Optional properties: - interface_pix_fmt: How this display is connected to the - crtc. Currently supported types: rgb24, rgb565, bgr666 + crtc. Currently supported types: rgb24, rgb565, bgr666, rgb666 - edid: verbatim EDID data block describing attached display. - ddc: phandle describing the i2c bus handling the display data channel diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index 21bf1c8..c84ad22 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -91,6 +91,7 @@ enum ipu_dc_map { IPU_DC_MAP_RGB565, IPU_DC_MAP_GBR24, /* TVEv2 */ IPU_DC_MAP_BGR666, + IPU_DC_MAP_RGB666, }; struct ipu_dc { @@ -152,6 +153,8 @@ static int ipu_pixfmt_to_map(u32 fmt) return IPU_DC_MAP_GBR24; case V4L2_PIX_FMT_BGR666: return IPU_DC_MAP_BGR666; + case V4L2_PIX_FMT_RGB666: + return IPU_DC_MAP_RGB666; default: return -EINVAL; } @@ -395,6 +398,12 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 1, 11, 0xfc); /* green */ ipu_dc_map_config(priv, IPU_DC_MAP_BGR666, 2, 17, 0xfc); /* red */ + /* rgb666 */ + ipu_dc_map_clear(priv, IPU_DC_MAP_BGR666); + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 2, 17, 0xfc); /* red */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 1, 11, 0xfc); /* green */ + ipu_dc_map_config(priv, IPU_DC_MAP_RGB666, 0, 5, 0xfc); /* blue */ + return 0; } diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c index c04b017..1c8f63f 100644 --- a/drivers/staging/imx-drm/parallel-display.c +++ b/drivers/staging/imx-drm/parallel-display.c @@ -238,6 +238,8 @@ static int imx_pd_probe(struct platform_device *pdev) imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB565; else if (!strcmp(fmt, bgr666)) imxpd-interface_pix_fmt = V4L2_PIX_FMT_BGR666; + else if (!strcmp(fmt, rgb666)) + imxpd-interface_pix_fmt = V4L2_PIX_FMT_RGB666; } imxpd-dev = pdev-dev; -- 1.7.9.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html