]> Git Repo - linux.git/commitdiff
Merge branch 'drm-misc-fixes' of git://anongit.freedesktop.org/drm/drm-misc into...
authorDave Airlie <[email protected]>
Fri, 12 Feb 2021 03:38:31 +0000 (13:38 +1000)
committerDave Airlie <[email protected]>
Fri, 12 Feb 2021 03:38:51 +0000 (13:38 +1000)
(I've pulled from a non-tag to get the ttm regression fix)
drm-misc-fixes-2021-02-10:
 * dp_mst: Don't report un-attached ports as connected
 * sun4i: tcon1 sync polarity fix; Always set HDMI clock rate; Fix
          H6 HDMI PHY config; Fix H6 max frequency
 * vc4: Fix buffer overflow
 * xlnx: Fix memory leak
 * ttm: page pool regression fix.

Signed-off-by: Dave Airlie <[email protected]>
From: Thomas Zimmermann <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/YCPo6g3gDxD3P//h@linux-uq9g
1  2 
drivers/gpu/drm/drm_dp_mst_topology.c

index 8781deefeae3e69642930fb2013b61fea149cafd,f5812ca48bf270a806adc10bf6ec8d1a2bd77aed..b11c0522a4410676c8ef6180a98ea984ac0687e2
@@@ -3629,26 -3629,14 +3629,26 @@@ static int drm_dp_send_up_ack_reply(str
        return 0;
  }
  
 -static int drm_dp_get_vc_payload_bw(u8 dp_link_bw, u8  dp_link_count)
 +/**
 + * drm_dp_get_vc_payload_bw - get the VC payload BW for an MST link
 + * @link_rate: link rate in 10kbits/s units
 + * @link_lane_count: lane count
 + *
 + * Calculate the total bandwidth of a MultiStream Transport link. The returned
 + * value is in units of PBNs/(timeslots/1 MTP). This value can be used to
 + * convert the number of PBNs required for a given stream to the number of
 + * timeslots this stream requires in each MTP.
 + */
 +int drm_dp_get_vc_payload_bw(int link_rate, int link_lane_count)
  {
 -      if (dp_link_bw == 0 || dp_link_count == 0)
 -              DRM_DEBUG_KMS("invalid link bandwidth in DPCD: %x (link count: %d)\n",
 -                            dp_link_bw, dp_link_count);
 +      if (link_rate == 0 || link_lane_count == 0)
 +              DRM_DEBUG_KMS("invalid link rate/lane count: (%d / %d)\n",
 +                            link_rate, link_lane_count);
  
 -      return dp_link_bw * dp_link_count / 2;
 +      /* See DP v2.0 2.6.4.2, VCPayload_Bandwidth_for_OneTimeSlotPer_MTP_Allocation */
 +      return link_rate * link_lane_count / 54000;
  }
 +EXPORT_SYMBOL(drm_dp_get_vc_payload_bw);
  
  /**
   * drm_dp_read_mst_cap() - check whether or not a sink supports MST
@@@ -3704,7 -3692,7 +3704,7 @@@ int drm_dp_mst_topology_mgr_set_mst(str
                        goto out_unlock;
                }
  
 -              mgr->pbn_div = drm_dp_get_vc_payload_bw(mgr->dpcd[1],
 +              mgr->pbn_div = drm_dp_get_vc_payload_bw(drm_dp_bw_code_to_link_rate(mgr->dpcd[1]),
                                                        mgr->dpcd[2] & DP_MAX_LANE_COUNT_MASK);
                if (mgr->pbn_div == 0) {
                        ret = -EINVAL;
@@@ -4224,6 -4212,7 +4224,7 @@@ drm_dp_mst_detect_port(struct drm_conne
  
        switch (port->pdt) {
        case DP_PEER_DEVICE_NONE:
+               break;
        case DP_PEER_DEVICE_MST_BRANCHING:
                if (!port->mcs)
                        ret = connector_status_connected;
This page took 0.071525 seconds and 4 git commands to generate.