Skip to content

Commit de46dbe

Browse files
committed
drm/i915/edp: read sink MSO configuration for eDP 1.4+
Read and debug log the eDP sink MSO configuration. Do not actually do anything with the information yet besides logging. FIXME: The pixel overlap is present in DisplayID 2.0, but we don't have parsing for that. Assume zero for now. We could also add quirks for non-zero pixel overlap before DisplayID 2.0 parsing. v3: Add placeholder for pixel overlap. v2: Rename intel_dp_mso_init -> intel_edp_mso_init Cc: Nischal Varide <[email protected]> Reviewed-by: Uma Shankar <[email protected]> Signed-off-by: Jani Nikula <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/24ef61574e5af12cd86d5b85afbfbd4ac2f9de25.1613054234.git.jani.nikula@intel.com
1 parent f886261 commit de46dbe

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

drivers/gpu/drm/i915/display/intel_display_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1493,6 +1493,8 @@ struct intel_dp {
14931493
int max_link_lane_count;
14941494
/* Max rate for the current link */
14951495
int max_link_rate;
1496+
int mso_link_count;
1497+
int mso_pixel_overlap;
14961498
/* sink or branch descriptor */
14971499
struct drm_dp_desc desc;
14981500
struct drm_dp_aux aux;

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

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3516,6 +3516,37 @@ static void intel_dp_get_dsc_sink_cap(struct intel_dp *intel_dp)
35163516
}
35173517
}
35183518

3519+
static void intel_edp_mso_init(struct intel_dp *intel_dp)
3520+
{
3521+
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
3522+
u8 mso;
3523+
3524+
if (intel_dp->edp_dpcd[0] < DP_EDP_14)
3525+
return;
3526+
3527+
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_MSO_LINK_CAPABILITIES, &mso) != 1) {
3528+
drm_err(&i915->drm, "Failed to read MSO cap\n");
3529+
return;
3530+
}
3531+
3532+
/* Valid configurations are SST or MSO 2x1, 2x2, 4x1 */
3533+
mso &= DP_EDP_MSO_NUMBER_OF_LINKS_MASK;
3534+
if (mso % 2 || mso > drm_dp_max_lane_count(intel_dp->dpcd)) {
3535+
drm_err(&i915->drm, "Invalid MSO link count cap %u\n", mso);
3536+
mso = 0;
3537+
}
3538+
3539+
if (mso) {
3540+
drm_dbg_kms(&i915->drm, "Sink MSO %ux%u configuration\n",
3541+
mso, drm_dp_max_lane_count(intel_dp->dpcd) / mso);
3542+
drm_err(&i915->drm, "No source MSO support, disabling\n");
3543+
mso = 0;
3544+
}
3545+
3546+
intel_dp->mso_link_count = mso;
3547+
intel_dp->mso_pixel_overlap = 0; /* FIXME: read from DisplayID v2.0 */
3548+
}
3549+
35193550
static bool
35203551
intel_edp_init_dpcd(struct intel_dp *intel_dp)
35213552
{
@@ -3599,6 +3630,8 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
35993630
*/
36003631
intel_edp_init_source_oui(intel_dp, true);
36013632

3633+
intel_edp_mso_init(intel_dp);
3634+
36023635
return true;
36033636
}
36043637

0 commit comments

Comments
 (0)