summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_edid.c
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-11-01 16:21:00 +0200
committerJani Nikula <jani.nikula@intel.com>2017-11-07 17:43:34 +0200
commit42750d39ad51691dc363cad2c221209449b24884 (patch)
tree77874ff99cf0a2c8a242d743daa01132d6930d30 /drivers/gpu/drm/drm_edid.c
parent1d1c36650752b7fb81cee515a9bba4131cac4b7c (diff)
drm/edid: abstract connector ELD clearing
Preparation for future work. No functional changes. 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/95e83e7a62566b65a56c8cb5038ddf0c6b8e5e95.1509545641.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_edid.c')
-rw-r--r--drivers/gpu/drm/drm_edid.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 3139c2e90e32..3162ea58e450 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3829,6 +3829,18 @@ void drm_edid_get_monitor_name(struct edid *edid, char *name, int bufsize)
}
EXPORT_SYMBOL(drm_edid_get_monitor_name);
+static void clear_eld(struct drm_connector *connector)
+{
+ memset(connector->eld, 0, sizeof(connector->eld));
+
+ connector->latency_present[0] = false;
+ connector->latency_present[1] = false;
+ connector->video_latency[0] = 0;
+ connector->audio_latency[0] = 0;
+ connector->video_latency[1] = 0;
+ connector->audio_latency[1] = 0;
+}
+
/**
* drm_edid_to_eld - build ELD from EDID
* @connector: connector corresponding to the HDMI/DP sink
@@ -3846,14 +3858,7 @@ void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
int mnl;
int dbl;
- memset(eld, 0, sizeof(connector->eld));
-
- connector->latency_present[0] = false;
- connector->latency_present[1] = false;
- connector->video_latency[0] = 0;
- connector->audio_latency[0] = 0;
- connector->video_latency[1] = 0;
- connector->audio_latency[1] = 0;
+ clear_eld(connector);
if (!edid)
return;