v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
Subsystems (11)
PATCH v14 1/10 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.
---
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(+)
Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +39 -0
@@ -279,6 +279,45 @@ colorspace <constant>V4L2_COLORSPACE_SRGB</constant>.</para> <entry></entry> <entry></entry> </row> + <row id="V4L2-PIX-FMT-RGB666"> + <entry><constant>V4L2_PIX_FMT_RGB666</constant></entry> + <entry>'RGBH'</entry> + <entry></entry> + <entry>r<subscript>5</subscript></entry> + <entry>r<subscript>4</subscript></entry> + <entry>r<subscript>3</subscript></entry> + <entry>r<subscript>2</subscript></entry> + <entry>r<subscript>1</subscript></entry> + <entry>r<subscript>0</subscript></entry> + <entry>g<subscript>5</subscript></entry> + <entry>g<subscript>4</subscript></entry> + <entry></entry> + <entry>g<subscript>3</subscript></entry> + <entry>g<subscript>2</subscript></entry> + <entry>g<subscript>1</subscript></entry> + <entry>g<subscript>0</subscript></entry> + <entry>b<subscript>5</subscript></entry> + <entry>b<subscript>4</subscript></entry> + <entry>b<subscript>3</subscript></entry> + <entry>b<subscript>2</subscript></entry> + <entry></entry> + <entry>b<subscript>1</subscript></entry> + <entry>b<subscript>0</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"> <entry><constant>V4L2_PIX_FMT_BGR24</constant></entry> <entry>'BGR3'</entry>
include/uapi/linux/videodev2.h +1 -0
@@ -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 */
Signature · 1 line
1.7.9.5
PATCH v14 2/10 imx-drm: Add RGB666 support for parallel display.
---
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(-)
Documentation/devicetree/bindings/staging/imx-drm/fsl-imx-drm.txt +2 -2
@@ -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
drivers/gpu/ipu-v3/ipu-dc.c +9 -0
@@ -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 ; }
drivers/staging/imx-drm/parallel-display.c +2 -0
@@ -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' ); }
Signature · 1 line
1.7.9.5
Re: [PATCH v14 02/10] imx-drm: Add RGB666 support for parallel display.
Quoted 2 lines · Denis Carikli
Signed-off-by Denis Carikli <[email protected]>Acked-by Philipp Zabel <[email protected]>
As I said probably around v10 time, I already have this patch queued, and I was going to send it to Greg before the previous merge window, but due to the number of patches I was already carrying, it was lost amongst the trees.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
PATCH v14 3/10 imx-drm: Correct BGR666 and the board's dts that use them.
In reply to Denis CarikliThe current BGR666 is not consistent with the other color mapings like BGR24. BGR666 should be in the same byte order than BGR24.
---
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(-)
arch/arm/boot/dts/imx51-apf51dev.dts +1 -1
@@ -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>;
arch/arm/boot/dts/imx53-m53evk.dts +1 -1
@@ -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>;
drivers/gpu/ipu-v3/ipu-dc.c +2 -2
@@ -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 );
drivers/staging/imx-drm/imx-ldb.c +2 -2
@@ -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",
Signature · 6 lines
1.7.9.5 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v14 03/10] imx-drm: Correct BGR666 and the board's dts that use them.
Quoted 5 lines · Denis Carikli
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 <[email protected]>Acked-by Philipp Zabel <[email protected]>
As I said probably around v10 time, I already have this patch queued, and I was going to send it to Greg before the previous merge window, but due to the number of patches I was already carrying, it was lost amongst the trees.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
PATCH v14 4/10 imx-drm: use defines for clock polarity settings
In reply to Denis Carikli---
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(-)
drivers/gpu/ipu-v3/ipu-di.c +2 -2
@@ -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 ;
drivers/staging/imx-drm/ipuv3-crtc.c +2 -2
@@ -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;
include/video/imx-ipu-v3.h +7 -1
@@ -27,6 +27,12 @@ enum ipuv3_type {#define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define CLK_POL_NEGEDGE 0 +#define CLK_POL_POSEDGE 1 + +#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH 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;
Signature · 1 line
1.7.9.5
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
Quoted 1 line · Denis Carikli
Signed-off-by Denis Carikli <[email protected]>
It would be nice to have a little more explanation in the commit messages for these patches. 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
imx-drm: add RGB666 support for parallel display.
It may also be worth describing the RGB666 format in the commit message for:
v4l2: add new V4L2_PIX_FMT_RGB666 pixel format.
And... getting some more acks for these patches would be very useful, I think I'd like to see Sascha's ack for these... Sascha?
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
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:
[...]
Quoted 4 lines
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.
Quoted 1 line
imx-drm: add RGB666 support for parallel display.
This permits to drive parallel displays that expect the RGB666 color format.
Quoted 5 lines
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:
0 17
RRRRRRGGGGGGBBBBBB
Denis.
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
Quoted 9 lines · Denis Carikli
On 06/24/2014 05:13 PM, Russell King - ARM Linux wrote:
[...]Quoted 4 lines
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_polfield of theipu_di_signal_cfgstruct was inverted.
Instead of merely inverting the comment, the values ofclk_polwere defined.
s/inverting/fixing/
Quoted 3 lines
Quoted 2 lines
imx-drm: add RGB666 support for parallel display.
This permits to drive parallel displays that expect the RGB666 color format.
This allows imx-drm to drive ...
Quoted 10 lines
Quoted 5 lines
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:
0 17
RRRRRRGGGGGGBBBBBB
Thanks! I've tweaked them very slightly as detailed above so they read a bit better.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Sascha Hauer
maintainerRe: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
In reply to Denis CarikliQuoted 66 lines · Denis Carikli
Signed-off-by Denis Carikli <[email protected]>---
ChangeLogv13->v14:
- Rebased
ChangeLog 12->v13:
- No changes
ChangeLog 11->v12:
- Improved the define names to match the hardware:
ENABLE_POLis 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.
- TheSET_CLK_POLandSET_DE_POLmasks 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(-)drivers/gpu/ipu-v3/ipu-di.c +2
-2@@ -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 ;drivers/staging/imx-drm/ipuv3-crtc.c +2
-2@@ -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;include/video/imx-ipu-v3.h +0
-0
include/video/imx-ipu-v3.h enum ipuv3_type { · line 34
Quoted 8 lines
include/video/imx-ipu-v3.h +5
-0@@ -27,6 +27,12 @@ enum ipuv3_type {#define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define CLK_POL_NEGEDGE 0 +#define CLK_POL_POSEDGE 1 + +#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH 1
Adding defines without a proper namespace (IPU_) outside a driver private header file is not nice. Anyway, instead of adding the defines ...
include/video/imx-ipu-v3.h struct ipu_di_signal_cfg { · line 49
Quoted 13 lines
include/video/imx-ipu-v3.h +2
-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;
...can we rename the flags to more meaningful names instead?
unsigned clk_pol_rising_edge:1; unsigned enable_pol_high:1; unsigned hsync_active_high:1; unsigned vsync_active_high:1;
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
Quoted 17 lines · Sascha Hauer
include/video/imx-ipu-v3.h struct ipu_di_signal_cfg { · line 49
Quoted 13 lines · Denis Carikli
include/video/imx-ipu-v3.h +2
-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;...can we rename the flags to more meaningful names instead?
Quoted 4 lines
unsigned clk_pol_rising_edge:1; unsigned enable_pol_high:1; unsigned hsync_active_high:1; unsigned vsync_active_high:1;
Now look at patch 7, where these become tri-state:
- don't change
- rising edge/active high
- falling edge/active low
So your suggestion is not a good idea.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Sascha Hauer
maintainerRe: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
Quoted 23 lines · Russell King - ARM Linux
Quoted 17 lines · Sascha Hauer
include/video/imx-ipu-v3.h struct ipu_di_signal_cfg { · line 49
Quoted 13 lines · Denis Carikli
include/video/imx-ipu-v3.h +2
-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;...can we rename the flags to more meaningful names instead?
Quoted 4 lines
unsigned clk_pol_rising_edge:1; unsigned enable_pol_high:1; unsigned hsync_active_high:1; unsigned vsync_active_high:1;
Quoted 6 lines
Now look at patch 7, where these become tri-state:
- don't change
- rising edge/active high
- falling edge/active lowSo your suggestion is not a good idea.
Hm, you're right.
Still I think we should add a prefix to make the context of the flags clear.
Sascha
Signature · 4 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
In reply to Sascha HauerQuoted 6 lines · Sascha Hauer
include/video/imx-ipu-v3.h enum ipuv3_type { · line 34
Quoted 2 lines
include/video/imx-ipu-v3.h +2
-0+#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH 1Adding 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.
Re: [PATCH v14 04/10] imx-drm: use defines for clock polarity settings
Quoted 9 lines · Denis Carikli
Quoted 6 lines · Sascha Hauer
include/video/imx-ipu-v3.h enum ipuv3_type { · line 34
Quoted 2 lines
include/video/imx-ipu-v3.h +2
-0+#define ENABLE_POL_LOW 0 +#define ENABLE_POL_HIGH 1Adding 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_modetimings flags.".
Denis, can you send just this one updated patch, so I can update the one I have here with this change. Once you've done that, I'll send the first four off to Greg.
Thanks.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
PATCH v14 1/1 imx-drm: use defines for clock polarity settings
--- 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(-)
drivers/gpu/ipu-v3/ipu-di.c +2 -2
@@ -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 ==IPU_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 ==IPU_ENABLE_POL_HIGH ) reg |=DI_POL_DRDY_POLARITY_15 ;if (sig->data_pol) reg |=DI_POL_DRDY_DATA_POLARITY ;
drivers/staging/imx-drm/ipuv3-crtc.c +2 -2
@@ -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 =IPU_ENABLE_POL_HIGH ; + sig_cfg.clk_pol =IPU_CLK_POL_NEGEDGE ; sig_cfg.width = mode->hdisplay; sig_cfg.height = mode->vdisplay; sig_cfg.pixel_fmt = out_pixel_fmt;
include/video/imx-ipu-v3.h +7 -1
@@ -27,6 +27,12 @@ enum ipuv3_type {#define IPU_PIX_FMT_GBR24 v4l2_fourcc('G', 'B', 'R', '3') +#define IPU_CLK_POL_NEGEDGE 0 +#define IPU_CLK_POL_POSEDGE 1 + +#define IPU_ENABLE_POL_LOW 0 +#define IPU_ENABLE_POL_HIGH 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;
Signature · 1 line
1.7.9.5
PATCH v14 5/10 ARM: dts: imx5*, imx6*: correct display-timings nodes.
In reply to Denis CarikliThe 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.
---
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(+)
arch/arm/boot/dts/imx51-babbage.dts +2 -0
@@ -56,6 +56,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; };
arch/arm/boot/dts/imx53-m53evk.dts +2 -0
@@ -41,6 +41,8 @@ vfront-porch = <9>; vsync-len = <3>; vsync-active = <1>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
arch/arm/boot/dts/imx6qdl-gw53xx.dtsi +2 -0
@@ -512,6 +512,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
arch/arm/boot/dts/imx6qdl-gw54xx.dtsi +2 -0
@@ -534,6 +534,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi +2 -0
@@ -353,6 +353,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
arch/arm/boot/dts/imx6qdl-sabreauto.dtsi +2 -0
@@ -405,6 +405,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi +2 -0
@@ -353,6 +353,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
arch/arm/boot/dts/imx6qdl-sabresd.dtsi +2 -0
@@ -494,6 +494,8 @@ vfront-porch = <7>; hsync-len = <60>; vsync-len = <10>; + de-active = <1>; + pixelclk-active = <0>; }; }; };
Signature · 1 line
1.7.9.5
Re: [PATCH v14 05/10] ARM: dts: imx5*, imx6*: correct display-timings nodes.
Quoted 11 lines · Denis Carikli
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 <[email protected]>
This patch needs either an ack from the arm-soc/iMX maintainers, or they need to merge it. As there's little positive agreement on the series, I can understand why there's reluctance to merge it.
So, can we start having some acks from people please, or at least commitments to merge this patch when the others are deemed to be acceptable. If not, can we have explanations why this should not be merged.
Thanks.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Re: [PATCH v14 05/10] ARM: dts: imx5*, imx6*: correct display-timings nodes.
Quoted 13 lines · Russell King - ARM Linux
Quoted 11 lines · Denis Carikli
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 <[email protected]>
Quoted 8 lines
This patch needs either an ack from the arm-soc/iMX maintainers, or they need to merge it. As there's little positive agreement on the series, I can understand why there's reluctance to merge it.
So, can we start having some acks from people please, or at least commitments to merge this patch when the others are deemed to be acceptable. If not, can we have explanations why this should not be merged.
I will be happy to merge dts change through IMX tree once the binding/diver part gets accepted/applied.
Shawn
PATCH v14 6/10 drm: drm_display_mode: add signal polarity flags
In reply to Denis CarikliWe 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.
---
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(+)
Documentation/DocBook/drm.tmpl +30 -0
@@ -2292,6 +2292,36 @@ void intel_crt_init(struct drm_device *dev) and <structfield>height_mm</structfield> fields are only used internally during EDID parsing and should not be set when creating modes manually. </para> + <para> + The <structfield>pol_flags</structfield> value represents the display + signal polarity flags, it can be a combination of + <variablelist> + <varlistentry> + <term>DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE</term> + <listitem><para> + drive pixel data on falling edge, sample data on rising edge. + </para></listitem> + </varlistentry> + <varlistentry> + <term>DRM_MODE_FLAG_POL_PIXDATA_POSEDGE</term> + <listitem><para> + Drive pixel data on rising edge, sample data on falling edge. + </para></listitem> + </varlistentry> + <varlistentry> + <term>DRM_MODE_FLAG_POL_DE_LOW</term> + <listitem><para> + data-enable pulse is active low + </para></listitem> + </varlistentry> + <varlistentry> + <term>DRM_MODE_FLAG_POL_DE_HIGH</term> + <listitem><para> + data-enable pulse is active high + </para></listitem> + </varlistentry> + </variablelist> + </para> </listitem> <listitem> <synopsis>int (*mode_valid)(struct drm_connector *connector,
include/drm/drm_modes.h +6 -0
@@ -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 */
Signature · 1 line
1.7.9.5
Re: [PATCH v14 06/10] drm: drm_display_mode: add signal polarity flags
Quoted 6 lines · Denis Carikli
We need a way to pass signal polarity informations
between DRM panels, and the display drivers.To do that, a
pol_flagsfield was added todrm_display_mode.Signed-off-by Denis Carikli <[email protected]>
This patch needs an ack from the DRM people - can someone review it please? This series has now been round 14 revisions and it's about time it was properly reviewed - or a statement made if it's unacceptable.
Quoted 96 lines
---
ChangeLogv13->v14:
- Fixed DRM_MODE_FLAG_POL_DE_HIGH's description.
ChangeLogv12->v13:
- Added Docbook documentation forpol_flagsthe struct field.
- Removed the_PRESERVEdefines: it was used by patches
against theimx_drmdriver. Now theses patches have been adapted not to require that defines.
ChangeLogv11->v12:
- Rebased: This patch now applies againstdrm_modes.h
- Rebased: It now uses the newDRM_MODE_FLAG_POL_DEflags defines namesChangeLog
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(+)Documentation/DocBook/drm.tmpl +30
-0@@ -2292,6 +2292,36 @@ void intel_crt_init(struct drm_device *dev) and <structfield>height_mm</structfield> fields are only used internally during EDID parsing and should not be set when creating modes manually. </para> + <para> + The <structfield>pol_flags</structfield> value represents the display + signal polarity flags, it can be a combination of + <variablelist> + <varlistentry> + <term>DRM_MODE_FLAG_POL_PIXDATA_NEGEDGE</term> + <listitem><para> + drive pixel data on falling edge, sample data on rising edge. + </para></listitem> + </varlistentry> + <varlistentry> + <term>DRM_MODE_FLAG_POL_PIXDATA_POSEDGE</term> + <listitem><para> + Drive pixel data on rising edge, sample data on falling edge. + </para></listitem> + </varlistentry> + <varlistentry> + <term>DRM_MODE_FLAG_POL_DE_LOW</term> + <listitem><para> + data-enable pulse is active low + </para></listitem> + </varlistentry> + <varlistentry> + <term>DRM_MODE_FLAG_POL_DE_HIGH</term> + <listitem><para> + data-enable pulse is active high + </para></listitem> + </varlistentry> + </variablelist> + </para> </listitem> <listitem> <synopsis>int (*mode_valid)(struct drm_connector *connector,include/drm/drm_modes.h +6
-0@@ -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 */ Signature · 1 line
1.7.9.5
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Re: [PATCH v14 06/10] drm: drm_display_mode: add signal polarity flags
Quoted 4 lines · Russell King - ARM Linux
Quoted 3 lines · Denis Carikli
We need a way to pass signal polarity informations
between DRM panels, and the display drivers.
Quoted 8 lines
Quoted 3 lines
To do that, a
pol_flagsfield was added todrm_display_mode.Signed-off-by Denis Carikli <[email protected]>This patch needs an ack from the DRM people - can someone review it please? This series has now been round 14 revisions and it's about time it was properly reviewed - or a statement made if it's unacceptable.
I didn't follow all of the earlier discussions around this, but it seems to me like data-enable polarity and the pixel data edge flags are properties of the interface rather than the video mode.
struct drm_display_mode represents the video timings and I'm not sure if it's a good idea to extend it with this type of information.
Maybe we need to add a separate type of device to store these parameters (much like we've done for MIPI DSI devices).
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140625/400d1e9e/attachment.sig>
PATCH v14 7/10 imx-drm: Use drm_display_mode timings flags.
In reply to Denis CarikliThe previous hardware behaviour was kept if the
flags are not set.
---
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(-)
drivers/gpu/ipu-v3/ipu-di.c +2 -0
@@ -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 );
drivers/staging/imx-drm/ipuv3-crtc.c +16 -2
@@ -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;
include/video/imx-ipu-v3.h +2 -2
@@ -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;
Signature · 1 line
1.7.9.5
Re: [PATCH v14 07/10] imx-drm: Use drm_display_mode timings flags.
Quoted 2 lines · Denis Carikli
The previous hardware behaviour was kept if the
flags are not set.
I'd like to throw in a patch that I've been carrying for a bit now. It conflicts with your patches, but I'm happy to fix that conflict locally (and have been doing so for a while now.)
This is related to a slightly different issue - knowing which types of bridges are bound to a particualar DI. This matters in part for selecting the clock routing - as things currently stand, the last bridge to call imx_drm_panel_format*() gets its way with this. With this change, we can see which bridges are bound, and make the appropriate decision. At the moment, we are saved from things going awry as we don't support cloning outputs.
The relevence to your patch set is that some bridges require clk_pol to be configured appropriately - HDMI requires clk_pol = 0 in order to work correctly (with the opposite edge, the image is noisy.)
While this approach only allows us to identify the types of bridges connected to a DI rather than uniquely identifing the bridges themselves, I think this is not only an improvement, but also a simplification of the current code, and allows better decisions about things like clk_pol to be made.
I'm sending it here because it is relevent to Denis' patch set - I will also send it out separately if people want it separately, though that will go to a reduced Cc list.
From: Russell King <[email protected]>
Subject: [PATCH] imx-drm: core: handling of DI clock flags to
ipu_crtc_mode_set()
We do not need to track the state of the IPU DI's clock flags by having each display bridge calling back into imx-drm-core, and then back out into ipuv3-crtc.c.
ipuv3-crtc can instead just scan the list of encoders to retrieve their type, and build up a picture of which types of encoders are attached. We can then use this information to configure the IPU DI clocking mode without any uncertainty - if we have multiple bridges connected to the same DI, if one of them requires a synchronous DI clock, that's what we must use.
--- drivers/staging/imx-drm/imx-drm-core.c | 3 +-- drivers/staging/imx-drm/imx-drm.h | 2 +- drivers/staging/imx-drm/ipuv3-crtc.c | 40 +++++++++++++++++++--------------- 3 files changed, 25 insertions(+), 20 deletions(-)
drivers/staging/imx-drm/imx-drm-core.c +1 -2
@@ -115,8 +115,7 @@ int imx_drm_panel_format_pins(struct drm_encoder *encoder, helper = &imx_crtc->imx_drm_helper_funcs;if (helper->set_interface_pix_fmt)return helper->set_interface_pix_fmt (encoder->crtc, - encoder->encoder_type, interface_pix_fmt, - hsync_pin, vsync_pin); + interface_pix_fmt, hsync_pin, vsync_pin);return 0 ; }EXPORT_SYMBOL_GPL (imx_drm_panel_format_pins);
drivers/staging/imx-drm/imx-drm.h +1 -1
@@ -17,7 +17,7 @@ int imx_drm_crtc_id(struct imx_drm_crtc *crtc);struct imx_drm_crtc_helper_funcs {int (*enable_vblank)(struct drm_crtc *crtc);void (*disable_vblank)(struct drm_crtc *crtc); -int (*set_interface_pix_fmt)(struct drm_crtc *crtc,u32 encoder_type, +int (*set_interface_pix_fmt)(struct drm_crtc *crtc,u32 pix_fmt,int hsync_pin,int vsync_pin);const struct drm_crtc_helper_funcs *crtc_helper_funcs;const struct drm_crtc_funcs *crtc_funcs;
drivers/staging/imx-drm/ipuv3-crtc.c +23 -17
@@ -51,7 +51,6 @@ struct ipu_crtc {struct drm_framebuffer *newfb;int irq;u32 interface_pix_fmt; -unsigned long di_clkflags;int di_hsync_pin;int di_vsync_pin; };
@@ -146,10 +145,13 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, int x, int y, struct drm_framebuffer *old_fb) { + struct drm_device *dev = crtc->dev; +struct drm_encoder *encoder;struct ipu_crtc *ipu_crtc =to_ipu_crtc (crtc); -int ret;struct ipu_di_signal_cfg sig_cfg = {}; +unsigned long encoder_types =0 ;u32 out_pixel_fmt; +int ret;dev_dbg (ipu_crtc->dev,"%s: mode->hdisplay: %d\n" , __func__, mode->hdisplay);
@@ -165,6 +167,24 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc,if (mode->flags &DRM_MODE_FLAG_PVSYNC ) sig_cfg.Vsync_pol =1 ; +list_for_each_entry (encoder, &dev->mode_config.encoder_list, head) +if (encoder->crtc == crtc) + encoder_types |=BIT (encoder->encoder_type); + +dev_dbg (ipu_crtc->dev,"%s: attached to encoder types 0x%lx\n" , + __func__, encoder_types); + +/* +* If we have DAC, TVDAC or LDB, then we need the IPU DI clock +* to be the same as the LDB DI clock. +*/ +if (encoder_types & (BIT (DRM_MODE_ENCODER_DAC ) | +BIT (DRM_MODE_ENCODER_TVDAC ) | +BIT (DRM_MODE_ENCODER_LVDS ))) + sig_cfg.clkflags =IPU_DI_CLKMODE_SYNC |IPU_DI_CLKMODE_EXT ; +else + sig_cfg.clkflags =0 ; + sig_cfg.enable_pol =ENABLE_POL_HIGH ; sig_cfg.clk_pol =CLK_POL_NEGEDGE ; sig_cfg.width = mode->hdisplay;
@@ -178,7 +198,6 @@ static int ipu_crtc_mode_set(struct drm_crtc *crtc, sig_cfg.v_sync_width = mode->vsync_end - mode->vsync_start; sig_cfg.v_end_width = mode->vsync_start - mode->vdisplay; sig_cfg.pixelclock = mode->clock *1000 ; - sig_cfg.clkflags = ipu_crtc->di_clkflags; sig_cfg.v_to_h_sync =0 ;
@@ -277,7 +296,7 @@ static void ipu_disable_vblank(struct drm_crtc *crtc) ipu_crtc->newfb =NULL ; } -static int ipu_set_interface_pix_fmt (struct drm_crtc *crtc,u32 encoder_type, +static int ipu_set_interface_pix_fmt (struct drm_crtc *crtc,u32 pixfmt,int hsync_pin,int vsync_pin) {struct ipu_crtc *ipu_crtc =to_ipu_crtc (crtc);
@@ -286,19 +305,6 @@ static int ipu_set_interface_pix_fmt(struct drm_crtc *crtc, u32 encoder_type, ipu_crtc->di_hsync_pin = hsync_pin; ipu_crtc->di_vsync_pin = vsync_pin; -switch (encoder_type) { -case DRM_MODE_ENCODER_DAC : -case DRM_MODE_ENCODER_TVDAC : -case DRM_MODE_ENCODER_LVDS : - ipu_crtc->di_clkflags =IPU_DI_CLKMODE_SYNC | -IPU_DI_CLKMODE_EXT ; -break ; -case DRM_MODE_ENCODER_TMDS : -case DRM_MODE_ENCODER_NONE : - ipu_crtc->di_clkflags =0 ; -break ; - } -return 0 ; }
Signature · 5 lines
1.8.3.1 -- FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
PATCH v14 8/10 drm/panel: Add Eukrea mbimxsd51 displays.
In reply to Denis Carikli---
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
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt new file +7 -0
@@ -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.
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt new file +7 -0
@@ -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.
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file +7 -0
@@ -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.
drivers/gpu/drm/panel/panel-simple.c +83 -0
95 lines not on this page · raw message
Signature · 1 line
1.7.9.5
A message that is not in the archive (sent off-list or not yet received): 1402913484-25910-8-git-send-email-denis-fO0SIAKYzcbQT0dZR+AlfA@public.gmane.org
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Denis,
This patch creates binding documentation. Any patch which does so should be copied to the DT people so they can review the bindings and give appropriate acks. It would be better if you separate the binding documentation updates from the other functional changes too.
I've added them on this reply to see whether they'll feel friendly enough to comment on the patch as it stands to avoid having to go through two more rounds on this already-fourteen revision patch set.
Quoted 166 lines · Denis Carikli
Signed-off-by Denis Carikli <[email protected]>---
ChangeLogv13->v14:
- NoneChangeLog
v12->v13:
- Added a note explaining why the size is zero in
the eukrea_mbimxsd51_dvi(s)vga structs.
ChangeLogv11->v12:
- Rebased: It now uses the newDRM_MODE_FLAG_POL_DEflags defines namesChangeLog
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.txtDocumentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt new file +7
-0@@ -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.Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt new file +7
-0@@ -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.Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file +7
-0@@ -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.drivers/gpu/drm/panel/panel-simple.c +83
-0@@ -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 = { + .width =0 , + .height =0 , + }, +}; +static const struct drm_display_mode lg_lp129qe_mode = { .clock =285250 , .hdisplay =2560 ,@@ -458,6 +532,15 @@ static const struct of_device_id platform_of_match[] = { .compatible = "chunghwa,claa101wa01a", .data = &chunghwa_claa101wa01a }, { + .compatible = "eukrea,mbimxsd51-cmo-qvga", + .data = &eukrea_mbimxsd51_cmoqvga, + }, { + .compatible = "eukrea,mbimxsd51-dvi-svga", + .data = &eukrea_mbimxsd51_dvisvga, + }, { + .compatible = "eukrea,mbimxsd51-dvi-vga", + .data = &eukrea_mbimxsd51_dvivga, + }, { .compatible = "chunghwa,claa101wb01", .data = &chunghwa_claa101wb01 }, {Signature · 1 line
1.7.9.5
Signature · 6 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it. -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Quoted 66 lines · Russell King - ARM Linux
Denis,
This patch creates binding documentation. Any patch which does so should be copied to the DT people so they can review the bindings and give appropriate acks. It would be better if you separate the binding documentation updates from the other functional changes too.
I've added them on this reply to see whether they'll feel friendly enough to comment on the patch as it stands to avoid having to go through two more rounds on this already-fourteen revision patch set.
Quoted 54 lines · Denis Carikli
Signed-off-by Denis Carikli <[email protected]>---
ChangeLogv13->v14:
- NoneChangeLog
v12->v13:
- Added a note explaining why the size is zero in
the eukrea_mbimxsd51_dvi(s)vga structs.
ChangeLogv11->v12:
- Rebased: It now uses the newDRM_MODE_FLAG_POL_DEflags defines namesChangeLog
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.txtDocumentation/devicetree/bindings/panel/eukrea,mbimxsd51-cmo-qvga.txt new file +7
-0@@ -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.Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt new file +7
-0@@ -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.Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file +0
-0
Quoted 8 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt line 7
Quoted 8 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt new file +7
-0@@ -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.
Seems like we could just have a list of compatible strings rather than a mostly duplicated file.
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/panel/panel-simple.c +0
-0@@ -403,6 +403,80 @@ static const struct panel_desc edt_etm0700g0dh6 = { }, };
Quoted 13 lines
drivers/gpu/drm/panel/panel-simple.c static const struct panel_desc edt_etm0700g0dh6 = { · line 418
Quoted 13 lines
drivers/gpu/drm/panel/panel-simple.c +13
-0+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 ,
Why aren't you using:
Documentation/devicetree/bindings/video/display-timing.txt
Rob
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Quoted 1 line · Rob Herring
On Tue, Jun 24, 2014 at 10:06 AM, Russell King - ARM Linux <[email protected]> wrote:
[...]
Quoted 1 line
Quoted 1 line · Denis Carikli
[...]
Quoted 1 line
Quoted 1 line
Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +0
-0
[...]
Quoted 11 lines
Quoted 8 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt line 7
Quoted 8 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +7
-0@@ -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.Seems like we could just have a list of compatible strings rather than a mostly duplicated file.
We've been doing it this way for all other panels.
Quoted 24 lines
Quoted 8 lines
Quoted 8 lines
drivers/gpu/drm/panel/panel-simple.c +0
-0@@ -403,6 +403,80 @@ static const struct panel_desc edt_etm0700g0dh6 = { }, };Quoted 13 lines
drivers/gpu/drm/panel/panel-simple.c static const struct panel_desc edt_etm0700g0dh6 = { · line 418
Quoted 13 lines
drivers/gpu/drm/panel/panel-simple.c +13
-0+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 ,Why aren't you using:
Quoted 1 line
Documentation/devicetree/bindings/video/display-timing.txt
Because it's redundant information. We need to have a compatible for the panel in the device tree anyway and that already implicitly defines the display mode.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140624/15203d17/attachment.sig>
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
In reply to Russell King - ARM LinuxQuoted 2 lines · Russell King - ARM Linux
It would be better if you separate the
binding documentation updates from the other functional changes too.
Fixed.
Denis.
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
In reply to Denis CarikliOn Mon, Jun 16, 2014 at 12:11:22PM +0200, Denis Carikli wrote:
[...]
Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt +0
-0
[...]
Quoted 2 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt +1
-0@@ -0,0 +1,7 @@ +Eukrea DVI-SVGA (800x600 pixels) DVI output.
[...]
Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +0
-0
[...]
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt line 1
Quoted 2 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +1
-0@@ -0,0 +1,7 @@ +Eukrea DVI-VGA (640x480 pixels) DVI output.
DVI outputs shouldn't be using the panel framework and this binding at all. DVI usually has the means to determine all of this by itself. Why do you need to represent this as a panel in device tree?
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140624/6168382a/attachment-0001.sig>
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Hi Thierry,
Quoted 7 lines · Thierry Reding
On Mon, Jun 16, 2014 at 12:11:22PM +0200, Denis Carikli wrote:
[...]Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt +0
-0[...]
Quoted 2 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt +1
-0@@ -0,0 +1,7 @@ +Eukrea DVI-SVGA (800x600 pixels) DVI output.[...]
Quoted 9 lines
Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +0
-0[...]
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt line 1
Quoted 2 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +1
-0@@ -0,0 +1,7 @@ +Eukrea DVI-VGA (640x480 pixels) DVI output.DVI outputs shouldn't be using the panel framework and this binding at all. DVI usually has the means to determine all of this by itself. Why do you need to represent this as a panel in device tree?
because on this very simple display board, we only have DVI LVDS signals without the I2C to detect the display.
Best regards
Eric
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Quoted 21 lines · Eric B?nard
Hi Thierry,
Le Tue, 24 Jun 2014 23:49:37 +0200,
Thierry Reding <[email protected]> a ?crit :Quoted 7 lines · Denis Carikli
[...]
Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt +0
-0[...]
Quoted 2 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-svga.txt +1
-0@@ -0,0 +1,7 @@ +Eukrea DVI-SVGA (800x600 pixels) DVI output.[...]
Quoted 9 lines
Quoted 1 line
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +0
-0[...]
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt line 1
Quoted 2 lines
Documentation/devicetree/bindings/panel/eukrea,mbimxsd51-dvi-vga.txt +1
-0@@ -0,0 +1,7 @@ +Eukrea DVI-VGA (640x480 pixels) DVI output.DVI outputs shouldn't be using the panel framework and this binding at all. DVI usually has the means to determine all of this by itself. Why do you need to represent this as a panel in device tree?
Quoted 2 lines
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?
The panel bindings are really for internal panels and should define all of their properties. That's also why they need a specific compatible string.
What the above two bindings define are really "connectors" with a fixed resolution rather than panels.
Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140625/157429d0/attachment.sig>
Re: [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays.
Quoted 5 lines · Thierry Reding
Quoted 2 lines
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.
PATCH v14 9/10 ARM: dts: mbimx51sd: Add display support.
In reply to Denis CarikliThe CMO-QVGA, DVI-SVGA and DVI-VGA are added.
---
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
arch/arm/boot/dts/Makefile +3 -0
@@ -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 \
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts new file +40 -0
@@ -0,0 +1,40 @@ +/* + * Copyright 2013 Eukréa Electromatique <[email protected]> + * + * 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 = <®_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 = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio3 13 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + }; +}; + +&display { + status = "okay"; + fsl,panel = <&panel>; +};
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-svga.dts new file +28 -0
@@ -0,0 +1,28 @@ +/* + * Copyright 2013 Eukréa Electromatique <[email protected]> + * + * 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 DVI-SVGA Display"; + compatible = "eukrea,mbimxsd51-baseboard-dvi-svga", "eukrea,mbimxsd51-baseboard", "eukrea,cpuimx51", "fsl,imx51"; + + panel: panel { + compatible = "eukrea,mbimxsd51-dvi-svga", "simple-panel"; + }; +}; + +&display { + status = "okay"; + fsl,panel = <&panel>; +};
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-dvi-vga.dts new file +28 -0
@@ -0,0 +1,28 @@ +/* + * Copyright 2013 Eukréa Electromatique <[email protected]> + * + * 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 DVI-VGA Display"; + compatible = "eukrea,mbimxsd51-baseboard-dvi-vga", "eukrea,mbimxsd51-baseboard", "eukrea,cpuimx51", "fsl,imx51"; + + panel: panel { + compatible = "eukrea,mbimxsd51-dvi-vga", "simple-panel"; + }; +}; + +&display { + status = "okay"; + fsl,panel = <&panel>; +};
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard.dts +49 -0
67 lines not on this page · raw message
Signature · 6 lines
1.7.9.5 _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
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 {
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts line 35
Quoted 10 lines
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts new file +10
-0+ compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_reg_lcd_3v3>; + regulator-name = "lcd-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + 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:
Quoted 2 lines
- 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):
Quoted 1 line
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.
Re: [PATCH v14 09/10] ARM: dts: mbimx51sd: Add display support.
On 06/16/2014 02:29 PM, Denis Carikli wrote:
[...]
Quoted 2 lines
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.
PATCH v14 10/10 ARM: dts: mbimx51sd: Add CMO-QVGA backlight support.
In reply to Denis Carikli---
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(+)
arch/arm/boot/dts/imx51-eukrea-mbimxsd51-baseboard-cmo-qvga.dts +10 -0
@@ -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 = <®_lcd_3v3>; + backlight = <&backlight>; }; reg_lcd_3v3: lcd-en {
Signature · 1 line
1.7.9.5
Quoted 2 lines · Denis Carikli
That new macro is needed by the
imx_drmstaging driver
for supporting the QVGA display of the eukrea-cpuimx51 board.
As I said probably around v10 time, I already have this patch queued, and I was going to send it to Greg before the previous merge window, but due to the number of patches I was already carrying, it was lost amongst the trees.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.