Skip to content

Commit 8976bf1

Browse files
committed
drm/dp: Add drm_dp_128b132b_supported()
Factor out a function to check for 128b/132b channel coding support used by a follow-up patch in the patchset. v2: s/drm_dp_uhbr_channel_coding_supported()/drm_dp128b132b_supported() (Jani) Cc: [email protected] Cc: Jani Nikula <[email protected]> Reviewed-by: Ankit Nautiyal <[email protected]> Reviewed-by: Manasi Navare <[email protected]> Acked-by: Maarten Lankhorst <[email protected]> Signed-off-by: Imre Deak <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 0f1ceee commit 8976bf1

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ static void intel_dp_set_dpcd_sink_rates(struct intel_dp *intel_dp)
225225
* Sink rates for 128b/132b. If set, sink should support all 8b/10b
226226
* rates and 10 Gbps.
227227
*/
228-
if (intel_dp->dpcd[DP_MAIN_LINK_CHANNEL_CODING] & DP_CAP_ANSI_128B132B) {
228+
if (drm_dp_128b132b_supported(intel_dp->dpcd)) {
229229
u8 uhbr_rates = 0;
230230

231231
BUILD_BUG_ON(ARRAY_SIZE(intel_dp->sink_rates) < ARRAY_SIZE(dp_rates) + 3);

include/drm/display/drm_dp_helper.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,12 @@ drm_dp_channel_coding_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
251251
return dpcd[DP_MAIN_LINK_CHANNEL_CODING] & DP_CAP_ANSI_8B10B;
252252
}
253253

254+
static inline bool
255+
drm_dp_128b132b_supported(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
256+
{
257+
return dpcd[DP_MAIN_LINK_CHANNEL_CODING] & DP_CAP_ANSI_128B132B;
258+
}
259+
254260
static inline bool
255261
drm_dp_alternate_scrambler_reset_cap(const u8 dpcd[DP_RECEIVER_CAP_SIZE])
256262
{

0 commit comments

Comments
 (0)