devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: dri-devel@lists.freedesktop.org, airlied@linux.ie,
	linux-omap@vger.kernel.org, devicetree@vger.kernel.org,
	bcousson@baylibre.com, alsa-devel@alsa-project.org
Cc: peter.ujfalusi@ti.com,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	moinejf@free.fr, tony@atomide.com, broonie@kernel.org,
	Jyri Sarha <jsarha@ti.com>,
	liam.r.girdwood@linux.intel.com, tomi.valkeinen@ti.com,
	rmk+kernel@arm.linux.org.uk
Subject: [PATCH RFC v3 1/7] drm/edid: add function to help find SADs, DO NOT MERGE
Date: Fri, 14 Aug 2015 12:30:39 +0300	[thread overview]
Message-ID: <df6eb8c77ca4afa84a2140441f253e0503db68ac.1439542916.git.jsarha@ti.com> (raw)
In-Reply-To: <cover.1439542916.git.jsarha@ti.com>

From: Russell King - ARM Linux <linux@arm.linux.org.uk>

Add a function to find the start of the SADs in the ELD.  This
complements the helper to retrieve the SAD count.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

This should already be coming in from drm-next.

Signed-off-by: Jyri Sarha <jsarha@ti.com>
---
 include/drm/drm_edid.h | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/include/drm/drm_edid.h b/include/drm/drm_edid.h
index 7990501..53c53c4 100644
--- a/include/drm/drm_edid.h
+++ b/include/drm/drm_edid.h
@@ -348,6 +348,25 @@ static inline int drm_eld_mnl(const uint8_t *eld)
 }
 
 /**
+ * drm_eld_sad - Get ELD SAD structures.
+ * @eld: pointer to an eld memory structure with sad_count set
+ */
+static inline const uint8_t *drm_eld_sad(const uint8_t *eld)
+{
+	unsigned int ver, mnl;
+
+	ver = (eld[DRM_ELD_VER] & DRM_ELD_VER_MASK) >> DRM_ELD_VER_SHIFT;
+	if (ver != 2 && ver != 31)
+		return NULL;
+
+	mnl = drm_eld_mnl(eld);
+	if (mnl > 16)
+		return NULL;
+
+	return eld + DRM_ELD_CEA_SAD(mnl, 0);
+}
+
+/**
  * drm_eld_sad_count - Get ELD SAD count.
  * @eld: pointer to an eld memory structure with sad_count set
  */
-- 
1.9.1

  reply	other threads:[~2015-08-14  9:30 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-14  9:30 [PATCH RFC v3 0/7] Implement generic ASoC HDMI codec and use it in tda998x Jyri Sarha
2015-08-14  9:30 ` Jyri Sarha [this message]
2015-08-14  9:30 ` [PATCH RFC v3 3/7] ASoC: hdmi-codec: Add hdmi-codec for external HDMI-encoders Jyri Sarha
2015-08-14  9:57   ` Russell King - ARM Linux
2015-08-17  6:50     ` Jyri Sarha
     [not found]   ` <ed41a6c0b594866c05e695cc066371d0e3862c7e.1439542916.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-08-14 16:18     ` Mark Brown
2015-08-17  7:07       ` Jyri Sarha
2015-08-17 18:41         ` Mark Brown
2015-08-17 19:22           ` Jyri Sarha
2015-08-17  7:57       ` Jyri Sarha
2015-08-17 12:59         ` Jyri Sarha
2015-08-14  9:30 ` [PATCH RFC v3 5/7] drm/i2c: tda998x: Remove include/sound/tda998x.h and fix graph parsing Jyri Sarha
     [not found] ` <cover.1439542916.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-08-14  9:30   ` [PATCH RFC v3 2/7] ASoC: hdmi: Remove obsolete dummy HDMI codec Jyri Sarha
     [not found]     ` <360a38c83ae2a24620da85b8496b745326d995de.1439542916.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-08-14 16:10       ` Mark Brown
2015-08-17  7:00         ` Jyri Sarha
2015-08-17 18:46           ` Mark Brown
2015-08-14  9:30   ` [PATCH RFC v3 4/7] drm/i2c: tda998x: Add support of a DT graph of ports Jyri Sarha
2015-08-14  9:30   ` [PATCH RFC v3 6/7] drm/i2c: tda998x: Register ASoC HDMI codec for audio functionality Jyri Sarha
     [not found]     ` <1e8e3215caa932dab68de8576aee81f5e1008163.1439542916.git.jsarha-l0cyMroinI0@public.gmane.org>
2015-08-14 10:06       ` Russell King - ARM Linux
2015-08-17  7:25         ` Jyri Sarha
2015-08-14  9:30   ` [PATCH RFC v3 7/7] ARM: dts: am335x-boneblack: Add HDMI audio support Jyri Sarha

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=df6eb8c77ca4afa84a2140441f253e0503db68ac.1439542916.git.jsarha@ti.com \
    --to=jsarha@ti.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=liam.r.girdwood@linux.intel.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=moinejf@free.fr \
    --cc=peter.ujfalusi@ti.com \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=tomi.valkeinen@ti.com \
    --cc=tony@atomide.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).