aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-11-01 10:21:01 -0400
committerJani Nikula <jani.nikula@intel.com>2017-11-07 10:43:34 -0500
commitc945b8c14bb7cefe8ac31c63eaf8bad521df643e (patch)
tree74b74f9891f336eae90201841bc634f936343a2d
parent42750d39ad51691dc363cad2c221209449b24884 (diff)
drm/edid: build ELD in drm_add_edid_modes()
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. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/551b2e1cf19be04c510e7865d7539cfc2f54ea89.1509545641.git.jani.nikula@intel.com
-rw-r--r--drivers/gpu/drm/drm_edid.c8
1 files 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,
4612 * @edid: EDID data 4612 * @edid: EDID data
4613 * 4613 *
4614 * Add the specified modes to the connector's mode list. Also fills out the 4614 * Add the specified modes to the connector's mode list. Also fills out the
4615 * &drm_display_info structure in @connector with any information which can be 4615 * &drm_display_info structure and ELD in @connector with any information which
4616 * derived from the edid. 4616 * can be derived from the edid.
4617 * 4617 *
4618 * Return: The number of modes added or 0 if we couldn't find any. 4618 * Return: The number of modes added or 0 if we couldn't find any.
4619 */ 4619 */
@@ -4623,9 +4623,11 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
4623 u32 quirks; 4623 u32 quirks;
4624 4624
4625 if (edid == NULL) { 4625 if (edid == NULL) {
4626 clear_eld(connector);
4626 return 0; 4627 return 0;
4627 } 4628 }
4628 if (!drm_edid_is_valid(edid)) { 4629 if (!drm_edid_is_valid(edid)) {
4630 clear_eld(connector);
4629 dev_warn(connector->dev->dev, "%s: EDID invalid.\n", 4631 dev_warn(connector->dev->dev, "%s: EDID invalid.\n",
4630 connector->name); 4632 connector->name);
4631 return 0; 4633 return 0;
@@ -4633,6 +4635,8 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
4633 4635
4634 quirks = edid_get_quirks(edid); 4636 quirks = edid_get_quirks(edid);
4635 4637
4638 drm_edid_to_eld(connector, edid);
4639
4636 /* 4640 /*
4637 * CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks. 4641 * CEA-861-F adds ycbcr capability map block, for HDMI 2.0 sinks.
4638 * To avoid multiple parsing of same block, lets parse that map 4642 * To avoid multiple parsing of same block, lets parse that map