Read device ID for DisplayPort branch devices. The device ID is defined in DPCD register 0x503 and it is mandatory field for DP branch devices. Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx> --- drivers/gpu/drm/i915/intel_dp.c | 6 ++++++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 5e16063..2b768da 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -3458,6 +3458,12 @@ intel_dp_probe_oui(struct intel_dp *intel_dp) if (drm_dp_dpcd_read(&intel_dp->aux, DP_BRANCH_OUI, buf, 3) == 3) DRM_DEBUG_KMS("Branch OUI: %02hx%02hx%02hx\n", buf[0], buf[1], buf[2]); + + if (intel_dp->bd.present) { + if (drm_dp_dpcd_read(&intel_dp->aux, DP_BRANCH_ID, intel_dp->bd.id, + sizeof(intel_dp->bd.id)) == sizeof(intel_dp->bd.id)) + DRM_DEBUG_KMS("Device ID: %s\n", intel_dp->bd.id); + } } static bool diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index ee4084d..f1fc4e2 100644 --- a/include/drm/drm_dp_helper.h +++ b/include/drm/drm_dp_helper.h @@ -457,6 +457,7 @@ #define DP_SOURCE_OUI 0x300 #define DP_SINK_OUI 0x400 #define DP_BRANCH_OUI 0x500 +#define DP_BRANCH_ID 0x503 #define DP_SET_POWER 0x600 # define DP_SET_POWER_D0 0x1 @@ -869,6 +870,7 @@ struct drm_dp_bd { bool present; int type; bool hpd; + uint8_t id[6]; union { struct drm_dp_vga vga; struct drm_dp_dvi dvi; -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx