linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Stefan Agner <stefan@agner.ch>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	dri-devel@lists.freedesktop.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [PATCH v2 04/13] drm: Add data mirror bus flag
Date: Tue, 20 Dec 2016 15:21:07 +0200	[thread overview]
Message-ID: <2022101.xOBCGyn98G@avalon> (raw)
In-Reply-To: <127f384d92291ce5d9447b763340432c@agner.ch>

Hi Stefan,

Thank you for the review.

On Tuesday 20 Dec 2016 14:01:46 Stefan Agner wrote:
> On 2016-12-18 21:31, Laurent Pinchart wrote:
> > Hi Stefan and Thierry,
> > 
> > As the author and suggester of the other bus flags, could you please
> > review this patch ?
> 
> It looks to me like an appropriate use case for the flag. One remark
> below:
>
> > On Saturday 19 Nov 2016 05:28:04 Laurent Pinchart wrote:
> >> The flag indicates that data is mirrored on the bus. The exact meaning
> >> is bus-type dependent. For LVDS buses it indicates that the seven data
> >> bits that transmitted in a clock pulse are sent in slots 6 to 0 order.
> >> 
> >> Signed-off-by: Laurent Pinchart
> >> <laurent.pinchart+renesas@ideasonboard.com>
> >> ---
> >> 
> >>  include/drm/drm_connector.h | 2 ++
> >>  1 file changed, 2 insertions(+)
> >> 
> >> diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
> >> index ac9d7d8e0e43..5c1dda236760 100644
> >> --- a/include/drm/drm_connector.h
> >> +++ b/include/drm/drm_connector.h
> >> @@ -159,6 +159,8 @@ struct drm_display_info {
> >> 
> >>  #define DRM_BUS_FLAG_PIXDATA_POSEDGE	(1<<2)
> >>  /* drive data on neg. edge */
> >>  #define DRM_BUS_FLAG_PIXDATA_NEGEDGE	(1<<3)
> >> 
> >> +/* data is mirrored on the bus */
> >> +#define DRM_BUS_FLAG_DATA_MIRROR	(1<<4)
> 
> Sounds like a bit endianness issue. I am wondering is if "mirror" is a
> good term. Can we name the possible orderings? How about:
> 
> DRM_BUS_FLAG_DATA_MSB_TO_LSB
> DRM_BUS_FLAG_DATA_LSB_TO_MSB

LVDS display buses send pixels in RGB666 or RGB888 as follows.

- "jeida-18" - 18-bit data mapping compatible with the [JEIDA], [LDI] and
  [VESA] specifications. Data are transferred as follows on 3 LVDS lanes.

Slot	    0       1       2       3       4       5       6
	________________                         _________________
Clock	                \_______________________/
	  ______  ______  ______  ______  ______  ______  ______
DATA0	><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__><
DATA1	><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__><
DATA2	><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__><

- "jeida-24" - 24-bit data mapping compatible with the [DSIM] and [LDI]
  specifications. Data are transferred as follows on 4 LVDS lanes.

Slot	    0       1       2       3       4       5       6
	________________                         _________________
Clock	                \_______________________/
	  ______  ______  ______  ______  ______  ______  ______
DATA0	><__G2__><__R7__><__R6__><__R5__><__R4__><__R3__><__R2__><
DATA1	><__B3__><__B2__><__G7__><__G6__><__G5__><__G4__><__G3__><
DATA2	><_CTL2_><_CTL1_><_CTL0_><__B7__><__B6__><__B5__><__B4__><
DATA3	><_CTL3_><__B1__><__B0__><__G1__><__G0__><__R1__><__R0__><

- "vesa-24" - 24-bit data mapping compatible with the [VESA] specification.
  Data are transferred as follows on 4 LVDS lanes.

Slot	    0       1       2       3       4       5       6
	________________                         _________________
Clock	                \_______________________/
	  ______  ______  ______  ______  ______  ______  ______
DATA0	><__G0__><__R5__><__R4__><__R3__><__R2__><__R1__><__R0__><
DATA1	><__B1__><__B0__><__G5__><__G4__><__G3__><__G2__><__G1__><
DATA2	><_CTL2_><_CTL1_><_CTL0_><__B5__><__B4__><__B3__><__B2__><
DATA3	><_CTL3_><__B7__><__B6__><__G7__><__G6__><__R7__><__R6__><


Mirroring flips slots 0 to 6, resulting in a sort of LSB to MSB transmission 
(I'm not sure I'd call that endianness though). I'm fine renaming the flag as 
you propose. Do we need two flags, or should we assume MSB to LSB by default 
and add a single flag ?

> >>  	/**
> >>  	 * @bus_flags: Additional information (like pixel signal polarity) for

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2016-12-20 13:20 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-19  3:28 [PATCH v2 00/13] R-Car DU: Add support for LVDS mode selection Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 01/13] devicetree/bindings: display: Document common panel properties Laurent Pinchart
2016-11-21 16:48   ` Rob Herring
2016-11-22  9:36     ` Laurent Pinchart
2016-11-29  8:27       ` Laurent Pinchart
2016-11-29 15:14         ` Rob Herring
2016-11-29 18:23           ` Laurent Pinchart
2016-12-18 20:54             ` Laurent Pinchart
2016-12-19 15:38               ` Rob Herring
2016-12-19 16:54                 ` Laurent Pinchart
2017-01-03 22:33                   ` Rob Herring
2016-11-22 11:05   ` Thierry Reding
2016-11-22 13:14     ` Laurent Pinchart
2016-11-22 21:10     ` Rob Herring
2017-04-09 11:47   ` Emil Velikov
2017-04-11  5:12     ` Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 02/13] devicetree/bindings: display: Add bindings for LVDS panels Laurent Pinchart
2016-11-21 16:48   ` Rob Herring
2016-11-22 11:02   ` Thierry Reding
2016-11-22 13:21     ` Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 03/13] devicetree/bindings: display: Add bindings for two Mitsubishi panels Laurent Pinchart
2016-11-21 16:49   ` Rob Herring
2016-11-19  3:28 ` [PATCH v2 04/13] drm: Add data mirror bus flag Laurent Pinchart
2016-12-18 20:31   ` Laurent Pinchart
2016-12-20 13:01     ` Stefan Agner
2016-12-20 13:21       ` Laurent Pinchart [this message]
2016-12-20 13:31         ` Stefan Agner
2017-01-04  0:39           ` [PATCH v2.1 04/13] drm: Add data transmission order " Laurent Pinchart
2017-01-04  7:06             ` Thierry Reding
2017-01-04 11:58               ` Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 05/13] drm: panels: Constify device node argument to of_drm_find_panel() Laurent Pinchart
2016-12-18 20:57   ` Laurent Pinchart
2017-01-04  7:09   ` Thierry Reding
2016-11-19  3:28 ` [PATCH v2 06/13] drm: panels: Add LVDS panel driver Laurent Pinchart
2016-11-22 11:14   ` Thierry Reding
2016-11-22 13:17     ` Laurent Pinchart
2017-01-11 22:46       ` Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 07/13] arm64: dts: r8a7795: Add PWM support Laurent Pinchart
2016-11-21  8:27   ` Geert Uytterhoeven
2016-11-21  9:18     ` Laurent Pinchart
2017-01-04  1:06       ` Laurent Pinchart
2017-01-04  9:01         ` Simon Horman
2016-11-19  3:28 ` [PATCH v2 08/13] arm64: dts: r8a7795: salvator-x: Add DU LVDS output endpoint Laurent Pinchart
2017-01-04  1:07   ` Laurent Pinchart
2017-01-04  9:08     ` Simon Horman
2016-11-19  3:28 ` [PATCH v2 09/13] arm64: dts: r8a7795: salvator-x: Add panel backlight support Laurent Pinchart
2016-11-21  8:36   ` Geert Uytterhoeven
2016-11-21  9:19     ` Laurent Pinchart
2016-11-21  9:23       ` Geert Uytterhoeven
2016-11-21  9:59         ` Laurent Pinchart
2017-04-05  8:45           ` Laurent Pinchart
2017-04-05  8:55             ` Geert Uytterhoeven
2017-04-05 18:21               ` Simon Horman
2016-11-19  3:28 ` [PATCH v2 10/13] ARM: shmobile: dts: Switch to panel-lvds bindings for Mitsubishi panels Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 11/13] drm: rcar-du: Switch to encoder .atomic_mode_set() helper function Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 12/13] drm: rcar-du: Use the DRM panel API Laurent Pinchart
2016-11-19  3:28 ` [PATCH v2 13/13] drm: rcar-du: Add support for LVDS mode selection Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2022101.xOBCGyn98G@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=stefan@agner.ch \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).