drm/dp: add helper for checking DP_ENHANCED_FRAME_CAP in DPCD
authorJani Nikula <jani.nikula@intel.com>
Fri, 4 Oct 2013 12:08:08 +0000 (15:08 +0300)
committerDave Airlie <airlied@redhat.com>
Wed, 9 Oct 2013 08:17:06 +0000 (18:17 +1000)
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
include/drm/drm_dp_helper.h

index 110f4f1f51d7bb6b4070de8abed4bc30106e0e27..a92c3754e3bbffe56c286d85bd2212f753ebe2c3 100644 (file)
@@ -390,4 +390,11 @@ drm_dp_max_lane_count(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
        return dpcd[DP_MAX_LANE_COUNT] & DP_MAX_LANE_COUNT_MASK;
 }
 
+static inline bool
+drm_dp_enhanced_frame_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
+{
+       return dpcd[DP_DPCD_REV] >= 0x11 &&
+               (dpcd[DP_MAX_LANE_COUNT] & DP_ENHANCED_FRAME_CAP);
+}
+
 #endif /* _DRM_DP_HELPER_H_ */