linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] video: Make IPU KMS parse display-timings
@ 2013-04-03 15:36 Rogerio Pimentel
  2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Rogerio Pimentel @ 2013-04-03 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

From: Marek Vasut <marex@denx.de>

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>
---
 drivers/staging/imx-drm/parallel-display.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
index a8064fc..2a25202 100644
--- a/drivers/staging/imx-drm/parallel-display.c
+++ b/drivers/staging/imx-drm/parallel-display.c
@@ -57,6 +57,7 @@ static void imx_pd_connector_destroy(struct drm_connector *connector)
 static int imx_pd_connector_get_modes(struct drm_connector *connector)
 {
 	struct imx_parallel_display *imxpd = con_to_imxpd(connector);
+	struct device_node *np = imxpd->dev->of_node;
 	int num_modes = 0;
 
 	if (imxpd->edid) {
@@ -72,6 +73,15 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
 		num_modes++;
 	}
 
+	if (np) {
+		struct drm_display_mode *mode = drm_mode_create(connector->dev);
+		of_get_drm_display_mode(np, &imxpd->mode, 0);
+		drm_mode_copy(mode, &imxpd->mode);
+		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
+		drm_mode_probed_add(connector, mode);
+		num_modes++;
+	}
+
 	return num_modes;
 }
 
-- 
1.7.10.4

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

* [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-03 15:36 [PATCH 1/3] video: Make IPU KMS parse display-timings Rogerio Pimentel
@ 2013-04-03 15:36 ` Rogerio Pimentel
  2013-04-04  3:42   ` Marek Vasut
  2013-04-04  7:40   ` Philipp Zabel
  2013-04-03 15:36 ` [PATCH 3/3] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
  2013-04-04  7:37 ` [PATCH 1/3] video: Make IPU KMS parse display-timings Philipp Zabel
  2 siblings, 2 replies; 6+ messages in thread
From: Rogerio Pimentel @ 2013-04-03 15:36 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>
---
 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..f9449b0 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_disp1_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 6c73bee..d2cd67e 100644
--- a/arch/arm/boot/dts/imx53.dtsip
+++ b/arch/arm/boot/dts/imx53.dtsip
@@ -441,6 +441,41 @@
 					};
 				};
 
+				ipu_disp1 {
+					pinctrl_ipu_disp1_1: ipudisp1grp-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] 6+ messages in thread

* [PATCH 3/3] ARM: imx_v6_v7_defconfig: enable parallel display
  2013-04-03 15:36 [PATCH 1/3] video: Make IPU KMS parse display-timings Rogerio Pimentel
  2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
@ 2013-04-03 15:36 ` Rogerio Pimentel
  2013-04-04  7:37 ` [PATCH 1/3] video: Make IPU KMS parse display-timings Philipp Zabel
  2 siblings, 0 replies; 6+ messages in thread
From: Rogerio Pimentel @ 2013-04-03 15:36 UTC (permalink / raw)
  To: linux-arm-kernel

Allow parallel display to work by default

Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
---
 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] 6+ messages in thread

* [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
@ 2013-04-04  3:42   ` Marek Vasut
  2013-04-04  7:40   ` Philipp Zabel
  1 sibling, 0 replies; 6+ messages in thread
From: Marek Vasut @ 2013-04-04  3:42 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Rogerio Pimentel,

> Add support for CLAA WVGA display for i.MX53 QSB.
> 
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
>  arch/arm/boot/dts/imx53-qsb.dtsp |   26 ++++++++++++++++++++++++++
>  arch/arm/boot/dts/imx53.dtsip    |   35
> +++++++++++++++++++++++++++++++++++ 2 files changed, 61 insertions(+)

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut

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

* [PATCH 1/3] video: Make IPU KMS parse display-timings
  2013-04-03 15:36 [PATCH 1/3] video: Make IPU KMS parse display-timings Rogerio Pimentel
  2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
  2013-04-03 15:36 ` [PATCH 3/3] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
@ 2013-04-04  7:37 ` Philipp Zabel
  2 siblings, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2013-04-04  7:37 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 03.04.2013, 12:36 -0300 schrieb Rogerio Pimentel:
> From: Marek Vasut <marex@denx.de>
> 
> 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>
> ---
>  drivers/staging/imx-drm/parallel-display.c |   10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/drivers/staging/imx-drm/parallel-display.c b/drivers/staging/imx-drm/parallel-display.c
> index a8064fc..2a25202 100644
> --- a/drivers/staging/imx-drm/parallel-display.c
> +++ b/drivers/staging/imx-drm/parallel-display.c
> @@ -57,6 +57,7 @@ static void imx_pd_connector_destroy(struct drm_connector *connector)
>  static int imx_pd_connector_get_modes(struct drm_connector *connector)
>  {
>  	struct imx_parallel_display *imxpd = con_to_imxpd(connector);
> +	struct device_node *np = imxpd->dev->of_node;
>  	int num_modes = 0;
>  
>  	if (imxpd->edid) {
> @@ -72,6 +73,15 @@ static int imx_pd_connector_get_modes(struct drm_connector *connector)
>  		num_modes++;
>  	}
>  
> +	if (np) {
> +		struct drm_display_mode *mode = drm_mode_create(connector->dev);
> +		of_get_drm_display_mode(np, &imxpd->mode, 0);

Since the mode is stored in imxpd->mode anyway, of_get_drm_display_mode
could be called once in the probe function instead of every time
get_modes is called.

> +		drm_mode_copy(mode, &imxpd->mode);
> +		mode->type |= DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
> +		drm_mode_probed_add(connector, mode);
> +		num_modes++;
> +	}
> +
>  	return num_modes;
>  }

regards
Philipp

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

* [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display
  2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
  2013-04-04  3:42   ` Marek Vasut
@ 2013-04-04  7:40   ` Philipp Zabel
  1 sibling, 0 replies; 6+ messages in thread
From: Philipp Zabel @ 2013-04-04  7:40 UTC (permalink / raw)
  To: linux-arm-kernel

Am Mittwoch, den 03.04.2013, 12:36 -0300 schrieb Rogerio Pimentel:
> Add support for CLAA WVGA display for i.MX53 QSB.
>
> Signed-off-by: Rogerio Pimentel <rogerio.pimentel@freescale.com>
> ---
>  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..f9449b0 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_disp1_1>;

pinctrl_ipu_disp0_1, see below.

> +		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 6c73bee..d2cd67e 100644
> --- a/arch/arm/boot/dts/imx53.dtsip
> +++ b/arch/arm/boot/dts/imx53.dtsip
> @@ -441,6 +441,41 @@
>  					};
>  				};
>  
> +				ipu_disp1 {
> +					pinctrl_ipu_disp1_1: ipudisp1grp-1 {

This should be pinctrl_ipu_disp0_1: ipudisp0grp-1, since this is
configuring the DISP0 pads. pinctrl_ipu_disp1_1 should be used to
configure DISP1 pads instead.

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

regards
Philipp

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

end of thread, other threads:[~2013-04-04  7:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-03 15:36 [PATCH 1/3] video: Make IPU KMS parse display-timings Rogerio Pimentel
2013-04-03 15:36 ` [PATCH 2/3] ARM: dts: mx53qsb: Add support for parallel display Rogerio Pimentel
2013-04-04  3:42   ` Marek Vasut
2013-04-04  7:40   ` Philipp Zabel
2013-04-03 15:36 ` [PATCH 3/3] ARM: imx_v6_v7_defconfig: enable " Rogerio Pimentel
2013-04-04  7:37 ` [PATCH 1/3] video: Make IPU KMS parse display-timings 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).