aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2017-11-01 10:20:58 -0400
committerJani Nikula <jani.nikula@intel.com>2017-11-07 10:43:34 -0500
commit1d1c36650752b7fb81cee515a9bba4131cac4b7c (patch)
tree9cce462c9a338217b1aed2b761c48d6bd3a5bc4f /drivers
parentf7da778522ef15201783678e1dc01a59ba462cdb (diff)
drm/edid: set ELD connector type in drm_edid_to_eld()
Since drm_edid_to_eld() knows the connector type, we can set the type in ELD while at it. Most connectors this gets called on are not DP encoders, and with the HDMI type being 0, this does not change behaviour for non-DP. For i915 having this in place earlier would have saved a considerable amount of debugging that lead to the fix 2d8f63297b9f ("drm/i915: always update ELD connector type after get modes"). I don't see other drivers, even the ones calling drm_edid_to_eld() on DP connectors, setting the connector type in ELD. Cc: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: Archit Taneja <architt@codeaurora.org> Cc: Andrzej Hajda <a.hajda@samsung.com> Cc: Russell King <linux@armlinux.org.uk> Cc: CK Hu <ck.hu@mediatek.com> Cc: Philipp Zabel <p.zabel@pengutronix.de> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Mark Yao <mark.yao@rock-chips.com> Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org> Cc: Vincent Abriou <vincent.abriou@st.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> 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/d527b31619528c477c2c136f25cdf118bc0cfc1d.1509545641.git.jani.nikula@intel.com
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_edid.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 6229735ecc15..3139c2e90e32 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3835,8 +3835,7 @@ EXPORT_SYMBOL(drm_edid_get_monitor_name);
3835 * @edid: EDID to parse 3835 * @edid: EDID to parse
3836 * 3836 *
3837 * Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The 3837 * Fill the ELD (EDID-Like Data) buffer for passing to the audio driver. The
3838 * Conn_Type, HDCP and Port_ID ELD fields are left for the graphics driver to 3838 * HDCP and Port_ID ELD fields are left for the graphics driver to fill in.
3839 * fill in.
3840 */ 3839 */
3841void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid) 3840void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
3842{ 3841{
@@ -3918,6 +3917,12 @@ void drm_edid_to_eld(struct drm_connector *connector, struct edid *edid)
3918 } 3917 }
3919 eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= total_sad_count << DRM_ELD_SAD_COUNT_SHIFT; 3918 eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= total_sad_count << DRM_ELD_SAD_COUNT_SHIFT;
3920 3919
3920 if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
3921 connector->connector_type == DRM_MODE_CONNECTOR_eDP)
3922 eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= DRM_ELD_CONN_TYPE_DP;
3923 else
3924 eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= DRM_ELD_CONN_TYPE_HDMI;
3925
3921 eld[DRM_ELD_BASELINE_ELD_LEN] = 3926 eld[DRM_ELD_BASELINE_ELD_LEN] =
3922 DIV_ROUND_UP(drm_eld_calc_baseline_block_size(eld), 4); 3927 DIV_ROUND_UP(drm_eld_calc_baseline_block_size(eld), 4);
3923 3928