linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking
@ 2013-04-09 14:07 Rogerio Pimentel
  2013-04-09 14:07 ` [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings Rogerio Pimentel
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Rogerio Pimentel @ 2013-04-09 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

It fixes the logic of valid_mode checking, it's now
in accordance with drm_mode_status enumeration.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
---
Changes since v1:
Removed the "if(np)" block and now using the existent functions to get
the modes by fixing the mode_valid logic test 
 drivers/staging/imx-drm/parallel-display.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index a8064fc..49c90c3 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -64,7 +64,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
 		num_modes = drm_add_edid_modes(connector, imxpd->edid);
 	}
 
-	if (imxpd->mode_valid) {
+	if (imxpd->mode_valid == MODE_OK) {
 		struct drm_display_mode *mode = drm_mode_create(connector->dev);
 		drm_mode_copy(mode, &imxpd->mode);
 		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
@@ -78,7 +78,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
 static int imx_pd_connector_mode_valid(struct drm_connector *connector,
 			  struct drm_display_mode *mode)
 {
-	return 0;
+	return MODE_OK;
 }
 
 static struct drm_encoder *imx_pd_connector_best_encoder(
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings
  2013-04-09 14:07 [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Rogerio Pimentel
@ 2013-04-09 14:07 ` Rogerio Pimentel
  2013-04-09 15:05   ` Philipp Zabel
  2013-04-09 14:07 ` [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Rogerio Pimentel @ 2013-04-09 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

This patch adds support for parsing of the DT display-timings prop
to IPU KMS driver.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
---
Changes since v1:
Moved the function of_get_drm_display_mode from 
imx_pd_connector_get_modes function to probe function
 drivers/staging/imx-drm/parallel-display.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index 49c90c3..adc011d 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -232,6 +232,8 @@ static int imx_pd_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, imxpd);
 
+	of_get_drm_display_mode(np, &imxpd->mode, 0);
+
 	return 0;
 }
 
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-09 14:07 [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Rogerio Pimentel
  2013-04-09 14:07 ` [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings Rogerio Pimentel
@ 2013-04-09 14:07 ` Rogerio Pimentel
  2013-04-09 15:17   ` Philipp Zabel
  2013-04-09 14:07 ` [PATCH v2 4/4] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
  2013-04-09 15:04 ` [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Philipp Zabel
  3 siblings, 1 reply; 13+ messages in thread
From: Rogerio Pimentel @ 2013-04-09 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

Add support for CLAA WVGA display for i.MX53 QSB.

Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
---
Changes since v1:
Changed the label disp1 to disp0 to correctly match the display pins
 arch/arm/boot/dts/imx53-qsb.dtsp |   26 ++++++++++++++++++++++++++
 arch/arm/boot/dts/imx53.dtsip    |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/arch/arm/boot/dts/imx53-qsb.dtsp b/arch/arm/boot/dts/imx53-qsb.dtsp
index dae8d9f..6086a3c 100644
--- a/arch/arm/boot/dts/imx53-qsb.dtsp
+++ b/arch/arm/boot/dts/imx53-qsb.dtsp
@@ -21,6 +21,32 @@
 		reg = <0x70000000 0x40000000>;
 	};
 
+	display at di0 {
+		compatible = "fsl,imx-parallel-display";
+		crtcs = <&ipu 0>;
+		interface-pix-fmt = "rgb565";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_ipu_disp0_1>;
+		display-timings {
+			claawvga {
+				native-mode;
+				clock-frequency = <27000000>;
+				hactive = <800>;
+				vactive = <480>;
+				hback-porch = <40>;
+				hfront-porch = <60>;
+				vback-porch = <10>;
+				vfront-porch = <10>;
+				hsync-len = <20>;
+				vsync-len = <10>;
+				hsync-active = <0>;
+				vsync-active = <0>;
+				de-active = <1>;
+				pixelclk-active = <0>;
+			};
+		};
+	};
+
 	gpio-keys {
 		compatible = "gpio-keys";
 
diff --git a/arch/arm/boot/dts/imx53.dtsip b/arch/arm/boot/dts/imx53.dtsip
index 845982e..a5f9d68 100644
--- a/arch/arm/boot/dts/imx53.dtsip
+++ b/arch/arm/boot/dts/imx53.dtsip
@@ -444,6 +444,41 @@
 					};
 				};
 
+				ipu_disp0 {
+					pinctrl_ipu_disp0_1: ipudisp0grp-1 {
+						fsl,pins = <
+						MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x5
+						MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x5
+						MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x5
+						MX53_PAD_DI0_PIN3__IPU_DI0_PIN3  0x5
+						MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x5
+						MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x5
+						MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x5
+						MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x5
+						MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x5
+						MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x5
+						MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x5
+						MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x5
+						MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x5
+						MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x5
+						MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x5
+						MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x5
+						MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x5
+						MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x5
+						MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x5
+						MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15 0x5
+						MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16 0x5
+						MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17 0x5
+						MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18 0x5
+						MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19 0x5
+						MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20 0x5
+						MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21 0x5
+						MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22 0x5
+						MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23 0x5
+						>;
+					};
+				};
+
 				owire {
 					pinctrl_owire_1: owiregrp-1 {
 						fsl,pins = <
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 4/4] ARM: imx_v6_v7_defconfig: enable parallel display
  2013-04-09 14:07 [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Rogerio Pimentel
  2013-04-09 14:07 ` [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings Rogerio Pimentel
  2013-04-09 14:07 ` [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
@ 2013-04-09 14:07 ` Rogerio Pimentel
  2013-04-09 15:04 ` [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Philipp Zabel
  3 siblings, 0 replies; 13+ messages in thread
From: Rogerio Pimentel @ 2013-04-09 14:07 UTC (permalink / raw)
  To: linux-arm-kernel

Allow parallel display to work by default

Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
---
Changes since v1:
No changes
 arch/arm/configs/imx_v6_v7_defconfig |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/configs/imx_v6_v7_defconfig b/arch/arm/configs/imx_v6_v7_defconfig
index e36b010..4942479 100644
--- a/arch/arm/configs/imx_v6_v7_defconfig
+++ b/arch/arm/configs/imx_v6_v7_defconfig
@@ -162,6 +162,7 @@ CONFIG_MEDIA_CAMERA_SUPPORT=y
 CONFIG_SOC_CAMERA=y
 CONFIG_SOC_CAMERA_OV2640=y
 CONFIG_DRM=y
+CONFIG_OF_VIDEOMODE=y
 CONFIG_VIDEO_MX3=y
 CONFIG_FB=y
 CONFIG_LCD_PLATFORM=y
@@ -206,6 +207,8 @@ CONFIG_IMX_SDMA=y
 CONFIG_MXS_DMA=y
 CONFIG_STAGING=y
 CONFIG_DRM_IMX=y
+CONFIG_DRM_IMX_FB_HELPER=y
+CONFIG_DRM_IMX_PARALLEL_DISPLAY=y
 CONFIG_DRM_IMX_IPUV3_CORE=y
 CONFIG_DRM_IMX_IPUV3=y
 CONFIG_COMMON_CLK_DEBUG=y
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking
  2013-04-09 14:07 [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Rogerio Pimentel
                   ` (2 preceding siblings ...)
  2013-04-09 14:07 ` [PATCH v2 4/4] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
@ 2013-04-09 15:04 ` Philipp Zabel
  3 siblings, 0 replies; 13+ messages in thread
From: Philipp Zabel @ 2013-04-09 15:04 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Rogerio,

Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> It fixes the logic of valid_mode checking, it's now
> in accordance with drm_mode_status enumeration.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
> Changes since v1:
> Removed the "if(np)" block and now using the existent functions to get
> the modes by fixing the mode_valid logic test 
>  drivers/staging/imx-drm/parallel-display.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> index a8064fc..49c90c3 100644
> --- a/drivers/staging/imx-drm/parallel-display.c
> +++ b/drivers/staging/imx-drm/parallel-display.c
> @@ -64,7 +64,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
>  		num_modes = drm_add_edid_modes(connector, imxpd->edid);
>  	}
>  
> -	if (imxpd->mode_valid) {
> +	if (imxpd->mode_valid == MODE_OK) {

It's a bit unfortunate that the imxpd->mode_valid variable is named the
same as the imx_pd_connector_helper_funcs.mode_valid callback, but it is
not the same. imxpd->mode_valid seems to be used as a bool here, and I
don't think that should stay the same.

>  		struct drm_display_mode *mode = drm_mode_create(connector->dev);
>  		drm_mode_copy(mode, &imxpd->mode);
>  		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
> @@ -78,7 +78,7 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
>  static int imx_pd_connector_mode_valid(struct drm_connector *connector,
>  			  struct drm_display_mode *mode)
>  {
> -	return 0;
> +	return MODE_OK;

This hunk is correct.

Eventually, we should check available display interface clock
frequencies here.

regards
Philipp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings
  2013-04-09 14:07 ` [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings Rogerio Pimentel
@ 2013-04-09 15:05   ` Philipp Zabel
  2013-04-09 15:19     ` Philipp Zabel
  0 siblings, 1 reply; 13+ messages in thread
From: Philipp Zabel @ 2013-04-09 15:05 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> This patch adds support for parsing of the DT display-timings prop
> to IPU KMS driver.
> 
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Marek Vasut <marex@denx.de>
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
> Changes since v1:
> Moved the function of_get_drm_display_mode from 
> imx_pd_connector_get_modes function to probe function
>  drivers/staging/imx-drm/parallel-display.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> index 49c90c3..adc011d 100644
> --- a/drivers/staging/imx-drm/parallel-display.c
> +++ b/drivers/staging/imx-drm/parallel-display.c
> @@ -232,6 +232,8 @@ static int imx_pd_probe(struct platform_device *pdev)
>  
>  	platform_set_drvdata(pdev, imxpd);
>  
> +	of_get_drm_display_mode(np, &imxpd->mode, 0);
> +

I'd prefer something like

	ret = of_get_drm_display_mode(np, &imxpd->mode, 0);
	if (!ret)
		imxpd->mode_valid = 1;

here.

regards
Philipp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-09 14:07 ` [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
@ 2013-04-09 15:17   ` Philipp Zabel
  2013-04-12 18:49     ` Rogerio Pimentel
  0 siblings, 1 reply; 13+ messages in thread
From: Philipp Zabel @ 2013-04-09 15:17 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> Add support for CLAA WVGA display for i.MX53 QSB.
> 
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
> Changes since v1:
> Changed the label disp1 to disp0 to correctly match the display pins
>  arch/arm/boot/dts/imx53-qsb.dtsp |   26 ++++++++++++++++++++++++++
>  arch/arm/boot/dts/imx53.dtsip    |   35 +++++++++++++++++++++++++++++++++++
>  2 files changed, 61 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/imx53-qsb.dtsp b/arch/arm/boot/dts/imx53-qsb.dtsp
> index dae8d9f..6086a3c 100644
> --- a/arch/arm/boot/dts/imx53-qsb.dtsp
> +++ b/arch/arm/boot/dts/imx53-qsb.dtsp
> @@ -21,6 +21,32 @@
>  		reg = <0x70000000 0x40000000>;
>  	};
>  
> +	display at di0 {
> +		compatible = "fsl,imx-parallel-display";
> +		crtcs = <&ipu 0>;
> +		interface-pix-fmt = "rgb565";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&pinctrl_ipu_disp0_1>;
> +		display-timings {
> +			claawvga {
> +				native-mode;
> +				clock-frequency = <27000000>;
> +				hactive = <800>;
> +				vactive = <480>;
> +				hback-porch = <40>;
> +				hfront-porch = <60>;
> +				vback-porch = <10>;
> +				vfront-porch = <10>;
> +				hsync-len = <20>;
> +				vsync-len = <10>;
> +				hsync-active = <0>;
> +				vsync-active = <0>;
> +				de-active = <1>;
> +				pixelclk-active = <0>;
> +			};
> +		};
> +	};
> +

This clashes with the MCIMXHDMICARD daughter module, which has a sii902x
HDMI encoder connected to DISP0 for i.MX53-QSB. Would it make sense to
add all possible options to the device tree but mark them with
status = "disabled" by default?

regards
Philipp

>  	gpio-keys {
>  		compatible = "gpio-keys";
>  
> diff --git a/arch/arm/boot/dts/imx53.dtsip b/arch/arm/boot/dts/imx53.dtsip
> index 845982e..a5f9d68 100644
> --- a/arch/arm/boot/dts/imx53.dtsip
> +++ b/arch/arm/boot/dts/imx53.dtsip
> @@ -444,6 +444,41 @@
>  					};
>  				};
>  
> +				ipu_disp0 {
> +					pinctrl_ipu_disp0_1: ipudisp0grp-1 {
> +						fsl,pins = <
> +						MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x5
> +						MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x5
> +						MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x5
> +						MX53_PAD_DI0_PIN3__IPU_DI0_PIN3  0x5
> +						MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x5
> +						MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x5
> +						MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x5
> +						MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x5
> +						MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x5
> +						MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x5
> +						MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x5
> +						MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x5
> +						MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x5
> +						MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x5
> +						MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x5
> +						MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x5
> +						MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x5
> +						MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x5
> +						MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x5
> +						MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15 0x5
> +						MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16 0x5
> +						MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17 0x5
> +						MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18 0x5
> +						MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19 0x5
> +						MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20 0x5
> +						MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21 0x5
> +						MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22 0x5
> +						MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23 0x5
> +						>;
> +					};
> +				};
> +
>  				owire {
>  					pinctrl_owire_1: owiregrp-1 {
>  						fsl,pins = <

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings
  2013-04-09 15:05   ` Philipp Zabel
@ 2013-04-09 15:19     ` Philipp Zabel
  0 siblings, 0 replies; 13+ messages in thread
From: Philipp Zabel @ 2013-04-09 15:19 UTC (permalink / raw)
  To: linux-arm-kernel

Am Dienstag, den 09.04.2013, 17:05 +0200 schrieb Philipp Zabel:
> Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> > This patch adds support for parsing of the DT display-timings prop
> > to IPU KMS driver.
> > 
> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Signed-off-by: Marek Vasut <marex@denx.de>
> > Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> > ---
> > Changes since v1:
> > Moved the function of_get_drm_display_mode from 
> > imx_pd_connector_get_modes function to probe function
> >  drivers/staging/imx-drm/parallel-display.c |    2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> > index 49c90c3..adc011d 100644
> > --- a/drivers/staging/imx-drm/parallel-display.c
> > +++ b/drivers/staging/imx-drm/parallel-display.c
> > @@ -232,6 +232,8 @@ static int imx_pd_probe(struct platform_device *pdev)
> >  
> >  	platform_set_drvdata(pdev, imxpd);
> >  
> > +	of_get_drm_display_mode(np, &imxpd->mode, 0);
> > +
> 
> I'd prefer something like
> 
> 	ret = of_get_drm_display_mode(np, &imxpd->mode, 0);

Also, DRM_IMX_PARALLEL_DISPLAY needs to select OF_VIDEOMODE in 
drivers/staging/imx-drm/Kconfig to use of_get_drm_display_mode.

> 	if (!ret)
> 		imxpd->mode_valid = 1;
> 
> here.

regards
Philipp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-09 15:17   ` Philipp Zabel
@ 2013-04-12 18:49     ` Rogerio Pimentel
  2013-04-13 17:09       ` Sascha Hauer
  2013-04-15  8:05       ` Philipp Zabel
  0 siblings, 2 replies; 13+ messages in thread
From: Rogerio Pimentel @ 2013-04-12 18:49 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Apr 9, 2013 at 12:17 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
>> Add support for CLAA WVGA display for i.MX53 QSB.
>>
>> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
>> ---
>> Changes since v1:
>> Changed the label disp1 to disp0 to correctly match the display pins
>>  arch/arm/boot/dts/imx53-qsb.dtsp |   26 ++++++++++++++++++++++++++
>>  arch/arm/boot/dts/imx53.dtsip    |   35 +++++++++++++++++++++++++++++++++++
>>  2 files changed, 61 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/imx53-qsb.dtsp b/arch/arm/boot/dts/imx53-qsb.dtsp
>> index dae8d9f..6086a3c 100644
>> --- a/arch/arm/boot/dts/imx53-qsb.dtsp
>> +++ b/arch/arm/boot/dts/imx53-qsb.dtsp
>> @@ -21,6 +21,32 @@
>>               reg = <0x70000000 0x40000000>;
>>       };
>>
>> +     display at di0 {
>> +             compatible = "fsl,imx-parallel-display";
>> +             crtcs = <&ipu 0>;
>> +             interface-pix-fmt = "rgb565";
>> +             pinctrl-names = "default";
>> +             pinctrl-0 = <&pinctrl_ipu_disp0_1>;
>> +             display-timings {
>> +                     claawvga {
>> +                             native-mode;
>> +                             clock-frequency = <27000000>;
>> +                             hactive = <800>;
>> +                             vactive = <480>;
>> +                             hback-porch = <40>;
>> +                             hfront-porch = <60>;
>> +                             vback-porch = <10>;
>> +                             vfront-porch = <10>;
>> +                             hsync-len = <20>;
>> +                             vsync-len = <10>;
>> +                             hsync-active = <0>;
>> +                             vsync-active = <0>;
>> +                             de-active = <1>;
>> +                             pixelclk-active = <0>;
>> +                     };
>> +             };
>> +     };
>> +
>
> This clashes with the MCIMXHDMICARD daughter module, which has a sii902x
> HDMI encoder connected to DISP0 for i.MX53-QSB. Would it make sense to
> add all possible options to the device tree but mark them with
> status = "disabled" by default?
>
> regards
> Philipp
>
I'm planning to add support for MCIMXHDMICARD later because it will also
require support for sii902x. I'd like to add the parallel display that
we have available
today and after that add the support for sii902x. What do you think?

Rgds
Rogerio
>>       gpio-keys {
>>               compatible = "gpio-keys";
>>
>> diff --git a/arch/arm/boot/dts/imx53.dtsip b/arch/arm/boot/dts/imx53.dtsip
>> index 845982e..a5f9d68 100644
>> --- a/arch/arm/boot/dts/imx53.dtsip
>> +++ b/arch/arm/boot/dts/imx53.dtsip
>> @@ -444,6 +444,41 @@
>>                                       };
>>                               };
>>
>> +                             ipu_disp0 {
>> +                                     pinctrl_ipu_disp0_1: ipudisp0grp-1 {
>> +                                             fsl,pins = <
>> +                                             MX53_PAD_DI0_DISP_CLK__IPU_DI0_DISP_CLK 0x5
>> +                                             MX53_PAD_DI0_PIN15__IPU_DI0_PIN15 0x5
>> +                                             MX53_PAD_DI0_PIN2__IPU_DI0_PIN2 0x5
>> +                                             MX53_PAD_DI0_PIN3__IPU_DI0_PIN3  0x5
>> +                                             MX53_PAD_DISP0_DAT0__IPU_DISP0_DAT_0 0x5
>> +                                             MX53_PAD_DISP0_DAT1__IPU_DISP0_DAT_1 0x5
>> +                                             MX53_PAD_DISP0_DAT2__IPU_DISP0_DAT_2 0x5
>> +                                             MX53_PAD_DISP0_DAT3__IPU_DISP0_DAT_3 0x5
>> +                                             MX53_PAD_DISP0_DAT4__IPU_DISP0_DAT_4 0x5
>> +                                             MX53_PAD_DISP0_DAT5__IPU_DISP0_DAT_5 0x5
>> +                                             MX53_PAD_DISP0_DAT6__IPU_DISP0_DAT_6 0x5
>> +                                             MX53_PAD_DISP0_DAT7__IPU_DISP0_DAT_7 0x5
>> +                                             MX53_PAD_DISP0_DAT8__IPU_DISP0_DAT_8 0x5
>> +                                             MX53_PAD_DISP0_DAT9__IPU_DISP0_DAT_9 0x5
>> +                                             MX53_PAD_DISP0_DAT10__IPU_DISP0_DAT_10 0x5
>> +                                             MX53_PAD_DISP0_DAT11__IPU_DISP0_DAT_11 0x5
>> +                                             MX53_PAD_DISP0_DAT12__IPU_DISP0_DAT_12 0x5
>> +                                             MX53_PAD_DISP0_DAT13__IPU_DISP0_DAT_13 0x5
>> +                                             MX53_PAD_DISP0_DAT14__IPU_DISP0_DAT_14 0x5
>> +                                             MX53_PAD_DISP0_DAT15__IPU_DISP0_DAT_15 0x5
>> +                                             MX53_PAD_DISP0_DAT16__IPU_DISP0_DAT_16 0x5
>> +                                             MX53_PAD_DISP0_DAT17__IPU_DISP0_DAT_17 0x5
>> +                                             MX53_PAD_DISP0_DAT18__IPU_DISP0_DAT_18 0x5
>> +                                             MX53_PAD_DISP0_DAT19__IPU_DISP0_DAT_19 0x5
>> +                                             MX53_PAD_DISP0_DAT20__IPU_DISP0_DAT_20 0x5
>> +                                             MX53_PAD_DISP0_DAT21__IPU_DISP0_DAT_21 0x5
>> +                                             MX53_PAD_DISP0_DAT22__IPU_DISP0_DAT_22 0x5
>> +                                             MX53_PAD_DISP0_DAT23__IPU_DISP0_DAT_23 0x5
>> +                                             >;
>> +                                     };
>> +                             };
>> +
>>                               owire {
>>                                       pinctrl_owire_1: owiregrp-1 {
>>                                               fsl,pins = <
>
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-12 18:49     ` Rogerio Pimentel
@ 2013-04-13 17:09       ` Sascha Hauer
  2013-04-16  0:18         ` Fabio Estevam
  2013-04-15  8:05       ` Philipp Zabel
  1 sibling, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2013-04-13 17:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Apr 12, 2013 at 03:49:09PM -0300, Rogerio Pimentel wrote:
> On Tue, Apr 9, 2013 at 12:17 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> >> Add support for CLAA WVGA display for i.MX53 QSB.
> >>
> >> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> >> ---
> >> Changes since v1:
> >> Changed the label disp1 to disp0 to correctly match the display pins
> >>  arch/arm/boot/dts/imx53-qsb.dtsp |   26 ++++++++++++++++++++++++++
> >>  arch/arm/boot/dts/imx53.dtsip    |   35 +++++++++++++++++++++++++++++++++++
> >>  2 files changed, 61 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/imx53-qsb.dtsp b/arch/arm/boot/dts/imx53-qsb.dtsp
> >> index dae8d9f..6086a3c 100644
> >> --- a/arch/arm/boot/dts/imx53-qsb.dtsp
> >> +++ b/arch/arm/boot/dts/imx53-qsb.dtsp
> >> @@ -21,6 +21,32 @@
> >>               reg = <0x70000000 0x40000000>;
> >>       };
> >>
> >> +     display at di0 {
> >> +             compatible = "fsl,imx-parallel-display";
> >> +             crtcs = <&ipu 0>;
> >> +             interface-pix-fmt = "rgb565";
> >> +             pinctrl-names = "default";
> >> +             pinctrl-0 = <&pinctrl_ipu_disp0_1>;
> >> +             display-timings {
> >> +                     claawvga {
> >> +                             native-mode;
> >> +                             clock-frequency = <27000000>;
> >> +                             hactive = <800>;
> >> +                             vactive = <480>;
> >> +                             hback-porch = <40>;
> >> +                             hfront-porch = <60>;
> >> +                             vback-porch = <10>;
> >> +                             vfront-porch = <10>;
> >> +                             hsync-len = <20>;
> >> +                             vsync-len = <10>;
> >> +                             hsync-active = <0>;
> >> +                             vsync-active = <0>;
> >> +                             de-active = <1>;
> >> +                             pixelclk-active = <0>;
> >> +                     };
> >> +             };
> >> +     };
> >> +
> >
> > This clashes with the MCIMXHDMICARD daughter module, which has a sii902x
> > HDMI encoder connected to DISP0 for i.MX53-QSB. Would it make sense to
> > add all possible options to the device tree but mark them with
> > status = "disabled" by default?
> >
> > regards
> > Philipp
> >
> I'm planning to add support for MCIMXHDMICARD later because it will also
> require support for sii902x. I'd like to add the parallel display that
> we have available
> today and after that add the support for sii902x. What do you think?

Having the parallel display support is fine. Philipp just suggested to
add status = "disabled" for both the parallel display and the lvds
encoder so that for example the bootloader can decide which one to enable
during runtime. Otherwise we have two display options on the same pins and
the first one wins.

Sascha

-- 
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 |

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-12 18:49     ` Rogerio Pimentel
  2013-04-13 17:09       ` Sascha Hauer
@ 2013-04-15  8:05       ` Philipp Zabel
  1 sibling, 0 replies; 13+ messages in thread
From: Philipp Zabel @ 2013-04-15  8:05 UTC (permalink / raw)
  To: linux-arm-kernel

Am Freitag, den 12.04.2013, 15:49 -0300 schrieb Rogerio Pimentel:
> On Tue, Apr 9, 2013 at 12:17 PM, Philipp Zabel <p.zabel@pengutronix.de> wrote:
> > Am Dienstag, den 09.04.2013, 11:07 -0300 schrieb Rogerio Pimentel:
> >> Add support for CLAA WVGA display for i.MX53 QSB.
> >>
> >> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> >> ---
> >> Changes since v1:
> >> Changed the label disp1 to disp0 to correctly match the display pins
> >>  arch/arm/boot/dts/imx53-qsb.dtsp |   26 ++++++++++++++++++++++++++
> >>  arch/arm/boot/dts/imx53.dtsip    |   35 +++++++++++++++++++++++++++++++++++
> >>  2 files changed, 61 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/imx53-qsb.dtsp b/arch/arm/boot/dts/imx53-qsb.dtsp
> >> index dae8d9f..6086a3c 100644
> >> --- a/arch/arm/boot/dts/imx53-qsb.dtsp
> >> +++ b/arch/arm/boot/dts/imx53-qsb.dtsp
> >> @@ -21,6 +21,32 @@
> >>               reg = <0x70000000 0x40000000>;
> >>       };
> >>
> >> +     display at di0 {
> >> +             compatible = "fsl,imx-parallel-display";
> >> +             crtcs = <&ipu 0>;
> >> +             interface-pix-fmt = "rgb565";
> >> +             pinctrl-names = "default";
> >> +             pinctrl-0 = <&pinctrl_ipu_disp0_1>;
> >> +             display-timings {
> >> +                     claawvga {
> >> +                             native-mode;
> >> +                             clock-frequency = <27000000>;
> >> +                             hactive = <800>;
> >> +                             vactive = <480>;
> >> +                             hback-porch = <40>;
> >> +                             hfront-porch = <60>;
> >> +                             vback-porch = <10>;
> >> +                             vfront-porch = <10>;
> >> +                             hsync-len = <20>;
> >> +                             vsync-len = <10>;
> >> +                             hsync-active = <0>;
> >> +                             vsync-active = <0>;
> >> +                             de-active = <1>;
> >> +                             pixelclk-active = <0>;
> >> +                     };
> >> +             };
> >> +     };
> >> +
> >
> > This clashes with the MCIMXHDMICARD daughter module, which has a sii902x
> > HDMI encoder connected to DISP0 for i.MX53-QSB. Would it make sense to
> > add all possible options to the device tree but mark them with
> > status = "disabled" by default?
> >
> > regards
> > Philipp
> >
> I'm planning to add support for MCIMXHDMICARD later because it will also
> require support for sii902x.

That's good to hear. We have some (very) work-in-progress sii902x driver
patches floating around, if you are interested.

>  I'd like to add the parallel display that
> we have available
> today and after that add the support for sii902x. What do you think?

As Sascha said, I'm in favor of adding the parallel display support now,
but with the status = "disabled" property in there.
Then anybody who has the CLAAWVGA display can just set status = "okay"
manually at build time or from the bootloader.

regards
Philipp

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-13 17:09       ` Sascha Hauer
@ 2013-04-16  0:18         ` Fabio Estevam
  2013-04-16  6:32           ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Fabio Estevam @ 2013-04-16  0:18 UTC (permalink / raw)
  To: linux-arm-kernel

Sascha/Phillip,

On Sat, Apr 13, 2013 at 2:09 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:

> Having the parallel display support is fine. Philipp just suggested to
> add status = "disabled" for both the parallel display and the lvds
> encoder so that for example the bootloader can decide which one to enable
> during runtime. Otherwise we have two display options on the same pins and
> the first one wins.

Ok, understood.

It is not clear how we can tell the bootloader that we want the CLAA
WVGA panel or the HDMI daughter card, for example?

What would be the kernel command line in each case?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-16  0:18         ` Fabio Estevam
@ 2013-04-16  6:32           ` Sascha Hauer
  0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2013-04-16  6:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Apr 15, 2013 at 09:18:35PM -0300, Fabio Estevam wrote:
> Sascha/Phillip,
> 
> On Sat, Apr 13, 2013 at 2:09 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> 
> > Having the parallel display support is fine. Philipp just suggested to
> > add status = "disabled" for both the parallel display and the lvds
> > encoder so that for example the bootloader can decide which one to enable
> > during runtime. Otherwise we have two display options on the same pins and
> > the first one wins.
> 
> Ok, understood.
> 
> It is not clear how we can tell the bootloader that we want the CLAA
> WVGA panel or the HDMI daughter card, for example?

In barebox we would do a 'of_property -s /soc/display at di0 status okay'.
I don't know the corresponding U-Boot command.

> 
> What would be the kernel command line in each case?

Ther kernel command line is not involved here.

Sascha

-- 
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 |

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-04-16  6:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09 14:07 [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Rogerio Pimentel
2013-04-09 14:07 ` [PATCH v2 2/4] imx-drm: parallel-display: Make IPU KMS parse display-timings Rogerio Pimentel
2013-04-09 15:05   ` Philipp Zabel
2013-04-09 15:19     ` Philipp Zabel
2013-04-09 14:07 ` [PATCH v2 3/4] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
2013-04-09 15:17   ` Philipp Zabel
2013-04-12 18:49     ` Rogerio Pimentel
2013-04-13 17:09       ` Sascha Hauer
2013-04-16  0:18         ` Fabio Estevam
2013-04-16  6:32           ` Sascha Hauer
2013-04-15  8:05       ` Philipp Zabel
2013-04-09 14:07 ` [PATCH v2 4/4] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
2013-04-09 15:04 ` [PATCH v2 1/4] imx-drm: parallel-display: Fix valid_mode checking Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).