All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: jani.nikula@intel.com, intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/7] drm/edid: build ELD in drm_add_edid_modes()
Date: Wed,  1 Nov 2017 16:21:01 +0200	[thread overview]
Message-ID: <551b2e1cf19be04c510e7865d7539cfc2f54ea89.1509545641.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1509545641.git.jani.nikula@intel.com>
In-Reply-To: <cover.1509545641.git.jani.nikula@intel.com>

Call drm_edid_to_eld() from drm_add_edid_modes() to fill in the ELD
automatically. There's no harm in doing this for connectors that do not
support audio.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/drm_edid.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 3162ea58e450..4e3ef3d91b95 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -4612,8 +4612,8 @@ static int add_displayid_detailed_modes(struct drm_connector *connector,
  * @edid: EDID data
  *
  * Add the specified modes to the connector's mode list. Also fills out the
- * &drm_display_info structure in @connector with any information which can be
- * derived from the edid.
+ * &drm_display_info structure and ELD in @connector with any information which
+ * can be derived from the edid.
  *
  * Return: The number of modes added or 0 if we couldn't find any.
  */
@@ -4623,9 +4623,11 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
 	u32 quirks;
 
 	if (edid == NULL) {
+		clear_eld(connector);
 		return 0;
 	}
 	if (!drm_edid_is_valid(edid)) {
+		clear_eld(connector);
 		dev_warn(connector->dev->dev, "%s: EDID invalid.\n",
 			 connector->name);
 		return 0;
@@ -4633,6 +4635,8 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
 
 	quirks = edid_get_quirks(edid);
 
+	drm_edid_to_eld(connector, edid);
+
 	/*
 	 * CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks.
 	 * To avoid multiple parsing of same block, lets parse that map
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-11-01 14:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01 14:20 [PATCH 0/7] drm/edid and drivers: ELD refactoring Jani Nikula
2017-11-01 14:20 ` [PATCH 1/7] drm/edid: use macros for ELD offsets and values Jani Nikula
2017-11-01 14:20 ` [PATCH 2/7] drm/edid: set ELD connector type in drm_edid_to_eld() Jani Nikula
2017-11-01 14:20 ` [PATCH 3/7] drm/i915: remove redundant ELD connector type update Jani Nikula
2017-11-01 14:21 ` [PATCH 4/7] drm/edid: abstract connector ELD clearing Jani Nikula
2017-11-01 14:21 ` Jani Nikula [this message]
2017-11-01 14:21 ` [PATCH 6/7] drm/drivers: drop redundant drm_edid_to_eld() calls Jani Nikula
2017-11-01 15:05   ` Ville Syrjälä
2017-11-01 16:54   ` Eric Anholt
2017-11-06  4:28   ` Archit Taneja
2017-11-01 14:21 ` [PATCH 7/7] drm/edid: make drm_edid_to_eld() static Jani Nikula
2017-11-01 14:56 ` [PATCH 0/7] drm/edid and drivers: ELD refactoring Ville Syrjälä
2017-11-01 15:16 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-11-01 15:42 ` Patchwork
2017-11-01 18:55 ` Patchwork
2017-11-02  3:56 ` [PATCH 0/7] " Alex Deucher
2017-11-06 14:54 ` Thierry Reding

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=551b2e1cf19be04c510e7865d7539cfc2f54ea89.1509545641.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.