linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: denis@eukrea.com (Denis Carikli)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v14 06/10] drm: drm_display_mode: add signal polarity flags
Date: Mon, 16 Jun 2014 12:11:20 +0200	[thread overview]
Message-ID: <1402913484-25910-6-git-send-email-denis@eukrea.com> (raw)
In-Reply-To: <1402913484-25910-1-git-send-email-denis@eukrea.com>

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

Signed-off-by: Denis Carikli <denis@eukrea.com>
---
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(+)

diff --git a/Documentation/DocBook/drm.tmpl b/Documentation/DocBook/drm.tmpl
index 7df3134..22d435f 100644
--- a/Documentation/DocBook/drm.tmpl
+++ b/Documentation/DocBook/drm.tmpl
@@ -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,
diff --git a/include/drm/drm_modes.h b/include/drm/drm_modes.h
index 91d0582..c5cbe31 100644
--- a/include/drm/drm_modes.h
+++ b/include/drm/drm_modes.h
@@ -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 */
-- 
1.7.9.5

  parent reply	other threads:[~2014-06-16 10:11 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-16 10:11 [PATCH v14 01/10] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format Denis Carikli
2014-06-16 10:11 ` [PATCH v14 02/10] imx-drm: Add RGB666 support for parallel display Denis Carikli
2014-06-16 10:15   ` Russell King - ARM Linux
2014-06-16 10:11 ` [PATCH v14 03/10] imx-drm: Correct BGR666 and the board's dts that use them Denis Carikli
2014-06-16 10:15   ` Russell King - ARM Linux
2014-06-16 10:11 ` [PATCH v14 04/10] imx-drm: use defines for clock polarity settings Denis Carikli
2014-06-24 15:13   ` Russell King - ARM Linux
2014-06-24 16:25     ` Denis Carikli
2014-06-24 16:35       ` Russell King - ARM Linux
2014-06-25  4:48   ` Sascha Hauer
2014-06-25  8:43     ` Russell King - ARM Linux
2014-06-25  9:46       ` Sascha Hauer
2014-06-25  9:44     ` Denis Carikli
2014-06-26 20:56       ` Russell King - ARM Linux
2014-06-27 14:17         ` [PATCH v14 updated] " Denis Carikli
2014-06-16 10:11 ` [PATCH v14 05/10] ARM: dts: imx5*, imx6*: correct display-timings nodes Denis Carikli
2014-06-24 15:01   ` Russell King - ARM Linux
2014-06-25  2:29     ` Shawn Guo
2014-06-16 10:11 ` Denis Carikli [this message]
2014-06-24 14:57   ` [PATCH v14 06/10] drm: drm_display_mode: add signal polarity flags Russell King - ARM Linux
2014-06-24 22:13     ` Thierry Reding
2014-06-16 10:11 ` [PATCH v14 07/10] imx-drm: Use drm_display_mode timings flags Denis Carikli
2014-06-25  9:20   ` Russell King - ARM Linux
2014-06-16 10:11 ` [PATCH v14 08/10] drm/panel: Add Eukrea mbimxsd51 displays Denis Carikli
2014-06-24 15:06   ` Russell King - ARM Linux
2014-06-24 19:52     ` Rob Herring
2014-06-24 21:56       ` Thierry Reding
2014-06-25  9:42     ` Denis Carikli
2014-06-24 21:49   ` Thierry Reding
2014-06-24 21:56     ` Eric Bénard
2014-06-24 22:04       ` Thierry Reding
2014-06-25  8:27         ` Denis Carikli
2014-06-16 10:11 ` [PATCH v14 09/10] ARM: dts: mbimx51sd: Add display support Denis Carikli
2014-06-16 12:29   ` Denis Carikli
2014-06-17 13:46     ` Denis Carikli
2014-06-16 10:11 ` [PATCH v14 10/10] ARM: dts: mbimx51sd: Add CMO-QVGA backlight support Denis Carikli
2014-06-16 10:14 ` [PATCH v14 01/10] [media] v4l2: add new V4L2_PIX_FMT_RGB666 pixel format Russell King - ARM Linux

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=1402913484-25910-6-git-send-email-denis@eukrea.com \
    --to=denis@eukrea.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).