History

drm: report dp downstream port type as a subconnector property

Currently, downstream port type is only reported in debugfs. This information should be considered important since it reflects the actual physical connector type. Some userspace (e.g. window compositors) may want to show this info to a user. The 'subconnector' property is already utilized for DVI-I and TV-out for reporting connector subtype. The initial motivation for this feature came from i2c test [1]. It is supposed to be skipped on VGA connectors, but it cannot detect VGA over DP and fails instead. v2: - Ville: utilized drm_dp_is_branch() - Ville: implement DP 1.0 downstream type info - Replaced create_dp_properties with add_dp_subconnector_property - Added dp_set_subconnector_property helper v4: - Ville: add DP1.0 best assumption about subconnector - Ville: assume DVI is DVI-D - Ville: reuse Writeback enum value for Virtual subconnector - Renamed #defines: HDMI -> HDMIA, DP -> DisplayPort v5: rebase v6: - Jani Nikula: renamed a function name - Jani Nikula: addressed the issues with documentation [1]: https://bugs.freedesktop.org/show_bug.cgi?id=104097

Oleg Vasilev committed 6 years ago

Commit e5b92771 parent a3431606 files · +148 −10Browse files

Showing the changes to include/uapi (1 of 6 files). Show all

Unified · Split

include/uapi/drm/drm_mode.h+13−8
@@ -332,14 +332,19 @@ struct drm_mode_get_encoder { · 331 unmodified lines
332/* This is for connectors with multiple signal types. */332/* This is for connectors with multiple signal types. */
333/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */333/* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
334enum drm_mode_subconnector {334enum drm_mode_subconnector {
335 DRM_MODE_SUBCONNECTOR_Automatic = 0,335 DRM_MODE_SUBCONNECTOR_Automatic = 0, /* DVI-I, TV */
336 DRM_MODE_SUBCONNECTOR_Unknown = 0,336 DRM_MODE_SUBCONNECTOR_Unknown = 0, /* DVI-I, TV, DP */
337 DRM_MODE_SUBCONNECTOR_DVID = 3,337 DRM_MODE_SUBCONNECTOR_VGA = 1, /* DP */
338 DRM_MODE_SUBCONNECTOR_DVIA = 4,338 DRM_MODE_SUBCONNECTOR_DVID = 3, /* DVI-I DP */
339 DRM_MODE_SUBCONNECTOR_Composite = 5,339 DRM_MODE_SUBCONNECTOR_DVIA = 4, /* DVI-I */
340 DRM_MODE_SUBCONNECTOR_SVIDEO = 6,340 DRM_MODE_SUBCONNECTOR_Composite = 5, /* TV */
341 DRM_MODE_SUBCONNECTOR_Component = 8,341 DRM_MODE_SUBCONNECTOR_SVIDEO = 6, /* TV */
342 DRM_MODE_SUBCONNECTOR_SCART = 9,342 DRM_MODE_SUBCONNECTOR_Component = 8, /* TV */
343 DRM_MODE_SUBCONNECTOR_SCART = 9, /* TV */
344 DRM_MODE_SUBCONNECTOR_DisplayPort = 10, /* DP */
345 DRM_MODE_SUBCONNECTOR_HDMIA = 11, /* DP */
346 DRM_MODE_SUBCONNECTOR_Native = 15, /* DP */
347 DRM_MODE_SUBCONNECTOR_Wireless = 18, /* DP */
343};348};
344 349
345#define DRM_MODE_CONNECTOR_Unknown 0350#define DRM_MODE_CONNECTOR_Unknown 0