[CI,2/2] drm/dp/fec: DRM helper for Forward Error Correction
diff mbox series

Message ID 20181102000154.11755-2-anusha.srivatsa@intel.com
State New
Headers show
  • [CI,1/2] i915/dp/fec: Cache the FEC_CAPABLE DPCD register
Related show

Commit Message

Srivatsa, Anusha Nov. 2, 2018, 12:01 a.m. UTC
DP 1.4 has Forward Error Correction Support(FEC).
Add helper function to check if the sink device
supports FEC.

v2: Separate the helper and the code that uses the helper into
two separate patches. (Manasi)

- Move the code to drm_dp_helper.c (Manasi)
- change the return type, code style changes (Gaurav)
- Use drm_dp_dpcd_readb instead of drm_dp_dpcd_read. (Jani)

- Avoid aux reads everytime, instead read cached
values of dpcd register (jani)
- Move helper to drm_dp_helper.h like other dsc

v5: rebased. Change the helper parameter suitably.

Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
 include/drm/drm_dp_helper.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff mbox series

diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 0fba8d2198a4..3314e91f6eb3 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -1149,6 +1149,13 @@  drm_dp_dsc_sink_max_slice_width(const u8 dsc_dpcd[DP_DSC_RECEIVER_CAP_SIZE])
+/* Forward Error Correction Support on DP 1.4 */
+static inline bool
+drm_dp_sink_supports_fec(const u8 fec_capable)
+	return fec_capable & DP_FEC_CAPABLE;
  * DisplayPort AUX channel