[PATCH v3 10/12] drm/i915: Read DP branch device HW revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HW revision is mandatory field for DisplayPort branch
devices. This is defined in DPCD register field 0x509.

Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_dp.c | 5 +++++
 include/drm/drm_dp_helper.h     | 2 ++
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2b768da..12ab26b 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3463,6 +3463,11 @@ intel_dp_probe_oui(struct intel_dp *intel_dp)
 		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);
+
+		if (drm_dp_dpcd_read(&intel_dp->aux, DP_BRANCH_HW_REV, &intel_dp->bd.hw_rev,
+				     sizeof(intel_dp->bd.hw_rev)) == sizeof(intel_dp->bd.hw_rev))
+			DRM_DEBUG_KMS("HW revision: %.2d.%.2d\n",
+				      intel_dp->bd.hw_rev & 0xf, (intel_dp->bd.hw_rev>>4) & 0xf);
 	}
 }
 
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index f1fc4e2..d0965ca 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -458,6 +458,7 @@
 #define DP_SINK_OUI			    0x400
 #define DP_BRANCH_OUI			    0x500
 #define DP_BRANCH_ID                        0x503
+#define DP_BRANCH_HW_REV                    0x509
 
 #define DP_SET_POWER                        0x600
 # define DP_SET_POWER_D0                    0x1
@@ -871,6 +872,7 @@ struct drm_dp_bd {
 	int type;
 	bool hpd;
 	uint8_t id[6];
+	uint8_t hw_rev;
 	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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux