summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_modes.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-10-03 02:34:06 +0300
committerDave Airlie <airlied@redhat.com>2017-10-03 02:34:06 +0300
commit1b0e19bb0c6f6b209c6b711f47dfc81812706827 (patch)
tree7f0865c71b82ae87702f2fa84e822f4e66e387aa /drivers/gpu/drm/i915/intel_modes.c
parent9e66317d3c92ddaab330c125dfe9d06eee268aff (diff)
parent2ba7d7e0437127314864238f8bfcb8369d81075c (diff)
downloadlinux-1b0e19bb0c6f6b209c6b711f47dfc81812706827.tar.xz
Merge tag 'drm-intel-fixes-2017-09-27' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
drm/i915 fixes for 4.14-rc3 Couple fixes for stable: - Fix ELD connector types and consequently audio on DP (Jani). - Ignore HDMI on Port A and consequently fix an ops on i915 probe when VBT advertises HDMI on Port A (Jani). And a small fix: - That removes a reduntant hw_check on modeset. (Colin) * tag 'drm-intel-fixes-2017-09-27' of git://anongit.freedesktop.org/git/drm-intel: drm/i915/bios: ignore HDMI on port A drm/i915: remove redundant variable hw_check drm/i915: always update ELD connector type after get modes
Diffstat (limited to 'drivers/gpu/drm/i915/intel_modes.c')
-rw-r--r--drivers/gpu/drm/i915/intel_modes.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_modes.c b/drivers/gpu/drm/i915/intel_modes.c
index 951e834dd274..28a778b785ac 100644
--- a/drivers/gpu/drm/i915/intel_modes.c
+++ b/drivers/gpu/drm/i915/intel_modes.c
@@ -30,6 +30,21 @@
#include "intel_drv.h"
#include "i915_drv.h"
+static void intel_connector_update_eld_conn_type(struct drm_connector *connector)
+{
+ u8 conn_type;
+
+ if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
+ connector->connector_type == DRM_MODE_CONNECTOR_eDP) {
+ conn_type = DRM_ELD_CONN_TYPE_DP;
+ } else {
+ conn_type = DRM_ELD_CONN_TYPE_HDMI;
+ }
+
+ connector->eld[DRM_ELD_SAD_COUNT_CONN_TYPE] &= ~DRM_ELD_CONN_TYPE_MASK;
+ connector->eld[DRM_ELD_SAD_COUNT_CONN_TYPE] |= conn_type;
+}
+
/**
* intel_connector_update_modes - update connector from edid
* @connector: DRM connector device to use
@@ -44,6 +59,8 @@ int intel_connector_update_modes(struct drm_connector *connector,
ret = drm_add_edid_modes(connector, edid);
drm_edid_to_eld(connector, edid);
+ intel_connector_update_eld_conn_type(connector);
+
return ret;
}