devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] staging: imx_drm: imx_ldb: fix 18 bit format
@ 2013-06-17  9:02 Steffen Trumtrar
       [not found] ` <1371459772-16443-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Steffen Trumtrar @ 2013-06-17  9:02 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Fabio Estevam,
	Steffen Trumtrar, Greg Kroah-Hartman,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Markus Niebel, Martin Fuzzey,
	Philipp Zabel, Sean Cross, Sascha Hauer

From: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>

Since 18 bit is supported as datawidth in device tree it should be
supported in driver. Beside the LDB channel the IPU channel has also
to be configured to use BGR666.

Signed-off-by: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
Signed-off-by: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
This is based on the series: "staging: drm/imx: Add LDB support" by Philipp.

Changes since v1:
	- fixed function call: imx_drm_crtc_panel_format_pins -> imx_drm_crtc_panel_format

 drivers/staging/imx-drm/imx-ldb.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
index 0a7e4da..92a0e21 100644
--- a/drivers/staging/imx-drm/imx-ldb.c
+++ b/drivers/staging/imx-drm/imx-ldb.c
@@ -179,6 +179,7 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder)
 	struct imx_ldb_channel *imx_ldb_ch = enc_to_imx_ldb_ch(encoder);
 	struct imx_ldb *ldb = imx_ldb_ch->ldb;
 	struct drm_display_mode *mode = &encoder->crtc->mode;
+	u32 pixel_fmt;
 	unsigned long serial_clk;
 	unsigned long di_clk = mode->clock * 1000;
 	int mux = imx_drm_encoder_get_mux_id(imx_ldb_ch->imx_drm_encoder,
@@ -194,8 +195,23 @@ static void imx_ldb_encoder_prepare(struct drm_encoder *encoder)
 		imx_ldb_set_clock(ldb, mux, imx_ldb_ch->chno, serial_clk, di_clk);
 	}
 
+	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;
+		break;
+	case 1:
+		pixel_fmt = (ldb->ldb_ctrl & LDB_DATA_WIDTH_CH1_24) ?
+			V4L2_PIX_FMT_RGB24 : V4L2_PIX_FMT_BGR666;
+		break;
+	default:
+		dev_err(ldb->dev, "unable to config di%d panel format\n",
+			imx_ldb_ch->chno);
+		pixel_fmt = V4L2_PIX_FMT_RGB24;
+	}
+
 	imx_drm_crtc_panel_format(encoder->crtc, DRM_MODE_ENCODER_LVDS,
-			V4L2_PIX_FMT_RGB24);
+			pixel_fmt);
 }
 
 static void imx_ldb_encoder_commit(struct drm_encoder *encoder)
-- 
1.8.3.1

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

* Re: [PATCH v2] staging: imx_drm: imx_ldb: fix 18 bit format
       [not found] ` <1371459772-16443-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
@ 2013-06-17 14:03   ` Shawn Guo
       [not found]     ` <20130617140314.GJ31687-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
  2013-06-17 20:59   ` Greg Kroah-Hartman
  1 sibling, 1 reply; 5+ messages in thread
From: Shawn Guo @ 2013-06-17 14:03 UTC (permalink / raw)
  To: Steffen Trumtrar, Greg Kroah-Hartman
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Fabio Estevam,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Markus Niebel, Martin Fuzzey,
	Philipp Zabel, Sean Cross, Sascha Hauer,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Jun 17, 2013 at 11:02:52AM +0200, Steffen Trumtrar wrote:
> From: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> 
> Since 18 bit is supported as datawidth in device tree it should be
> supported in driver. Beside the LDB channel the IPU channel has also
> to be configured to use BGR666.
> 
> Signed-off-by: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> Signed-off-by: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> ---
> This is based on the series: "staging: drm/imx: Add LDB support" by Philipp.

Greg,

Can you queued this patch and "staging: drm/imx: Add LDB support" from
Philipp Zabel for 3.11 please?  With these two patches, I can boot my
imx6q board into LUbuntu 13.04 with LVDS panel.  So for both patches,

Tested-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

Shawn

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

* Re: [PATCH v2] staging: imx_drm: imx_ldb: fix 18 bit format
       [not found]     ` <20130617140314.GJ31687-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
@ 2013-06-17 20:58       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-17 20:58 UTC (permalink / raw)
  To: Shawn Guo
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Fabio Estevam,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Markus Niebel, Martin Fuzzey,
	Philipp Zabel, Sean Cross, Steffen Trumtrar, Sascha Hauer,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Jun 17, 2013 at 10:03:16PM +0800, Shawn Guo wrote:
> On Mon, Jun 17, 2013 at 11:02:52AM +0200, Steffen Trumtrar wrote:
> > From: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> > 
> > Since 18 bit is supported as datawidth in device tree it should be
> > supported in driver. Beside the LDB channel the IPU channel has also
> > to be configured to use BGR666.
> > 
> > Signed-off-by: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> > Signed-off-by: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > ---
> > This is based on the series: "staging: drm/imx: Add LDB support" by Philipp.
> 
> Greg,
> 
> Can you queued this patch and "staging: drm/imx: Add LDB support" from
> Philipp Zabel for 3.11 please?  With these two patches, I can boot my
> imx6q board into LUbuntu 13.04 with LVDS panel.  So for both patches,

I don't seem to have that other patch around here, are you sure I didn't
already apply it?

thanks,

greg k-h

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

* Re: [PATCH v2] staging: imx_drm: imx_ldb: fix 18 bit format
       [not found] ` <1371459772-16443-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  2013-06-17 14:03   ` Shawn Guo
@ 2013-06-17 20:59   ` Greg Kroah-Hartman
       [not found]     ` <20130617205948.GA3018-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
  1 sibling, 1 reply; 5+ messages in thread
From: Greg Kroah-Hartman @ 2013-06-17 20:59 UTC (permalink / raw)
  To: Steffen Trumtrar
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Fabio Estevam,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Markus Niebel, Martin Fuzzey,
	Philipp Zabel, Sean Cross, Sascha Hauer,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Jun 17, 2013 at 11:02:52AM +0200, Steffen Trumtrar wrote:
> From: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> 
> Since 18 bit is supported as datawidth in device tree it should be
> supported in driver. Beside the LDB channel the IPU channel has also
> to be configured to use BGR666.
> 
> Signed-off-by: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> Signed-off-by: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> Tested-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> ---
> This is based on the series: "staging: drm/imx: Add LDB support" by Philipp.

I don't seem to have that series in my queue anywhere, can someone
please resend it, and this patch, so that I can apply them?

thanks,

greg k-h

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

* Re: [PATCH v2] staging: imx_drm: imx_ldb: fix 18 bit format
       [not found]     ` <20130617205948.GA3018-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
@ 2013-06-18  1:25       ` Shawn Guo
  0 siblings, 0 replies; 5+ messages in thread
From: Shawn Guo @ 2013-06-18  1:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel-gWbeCf7V1WCQmaza687I9mD2FQJk+8+b, Fabio Estevam,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Markus Niebel, Martin Fuzzey,
	Philipp Zabel, Sean Cross, Steffen Trumtrar, Sascha Hauer,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

On Mon, Jun 17, 2013 at 01:59:48PM -0700, Greg Kroah-Hartman wrote:
> On Mon, Jun 17, 2013 at 11:02:52AM +0200, Steffen Trumtrar wrote:
> > From: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> > 
> > Since 18 bit is supported as datawidth in device tree it should be
> > supported in driver. Beside the LDB channel the IPU channel has also
> > to be configured to use BGR666.
> > 
> > Signed-off-by: Markus Niebel <Markus.Niebel-77yLcl8UjJQ@public.gmane.org>
> > Signed-off-by: Steffen Trumtrar <s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > Tested-by: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > ---
> > This is based on the series: "staging: drm/imx: Add LDB support" by Philipp.
> 
> I don't seem to have that series in my queue anywhere, can someone
> please resend it, and this patch, so that I can apply them?

I just resent them to you.

Shawn

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

end of thread, other threads:[~2013-06-18  1:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17  9:02 [PATCH v2] staging: imx_drm: imx_ldb: fix 18 bit format Steffen Trumtrar
     [not found] ` <1371459772-16443-1-git-send-email-s.trumtrar-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-06-17 14:03   ` Shawn Guo
     [not found]     ` <20130617140314.GJ31687-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2013-06-17 20:58       ` Greg Kroah-Hartman
2013-06-17 20:59   ` Greg Kroah-Hartman
     [not found]     ` <20130617205948.GA3018-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-06-18  1:25       ` Shawn Guo

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