All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 13/14] drm/i915/dp_mst: Ensure link parameters are up-to-date for a disabled link
Date: Thu, 25 Jul 2024 15:16:08 +0300	[thread overview]
Message-ID: <ZqJCCL9yBPeaJrHi@ideak-desk.fi.intel.com> (raw)
In-Reply-To: <SN7PR11MB6750F74D3657EDBD34FA6F57E3AB2@SN7PR11MB6750.namprd11.prod.outlook.com>

On Thu, Jul 25, 2024 at 08:26:38AM +0300, Kandpal, Suraj wrote:
> 
> 
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces@lists.freedesktop.org> On Behalf Of Imre
> > Deak
> > Sent: Monday, July 22, 2024 10:25 PM
> > To: intel-gfx@lists.freedesktop.org
> > Subject: [PATCH 13/14] drm/i915/dp_mst: Ensure link parameters are up-to-
> > date for a disabled link
> >
> > As explained in the previous patch, the MST link BW reported by branch
> > devices during topology probing/path resources enumeration depends on
> > the link parameters programmed to DPCD to be up-to-date. After a sink is
> 
> I think you maybe missed a couple of words here maybe fix that

Not sure, it looks ok to me.

> Rest LGTM
> Reviewed-by: Suraj Kandpal <suraj.kandpal@intel.com>
> 
> > plugged this is not ensured, as those DPCD values start out zeroed. The
> > target link parameters (for a subsequent modeset) are the maximum that is
> > supported, so make sure these maximum values are programmed before
> > the topology probing.
> >
> > Signed-off-by: Imre Deak <imre.deak@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_dp.c     |  3 ++
> >  drivers/gpu/drm/i915/display/intel_dp_mst.c | 31 +++++++++++++++++++++
> > drivers/gpu/drm/i915/display/intel_dp_mst.h |  1 +
> >  3 files changed, 35 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c
> > b/drivers/gpu/drm/i915/display/intel_dp.c
> > index 0771e4c6357ba..41f5d82ca75d8 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> > @@ -4262,6 +4262,9 @@ intel_dp_mst_configure(struct intel_dp *intel_dp)
> >
> >       intel_dp->is_mst = intel_dp->mst_detect != DRM_DP_SST;
> >
> > +     if (intel_dp->is_mst)
> > +             intel_dp_mst_prepare_probe(intel_dp);
> > +
> >       drm_dp_mst_topology_mgr_set_mst(&intel_dp->mst_mgr, intel_dp-
> > >is_mst);
> >
> >       /* Avoid stale info on the next detect cycle. */ diff --git
> > a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > index 19c8b6878b030..faee7af0a8a48 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> > @@ -43,6 +43,7 @@
> >  #include "intel_dp_hdcp.h"
> >  #include "intel_dp_mst.h"
> >  #include "intel_dp_tunnel.h"
> > +#include "intel_dp_link_training.h"
> >  #include "intel_dpio_phy.h"
> >  #include "intel_hdcp.h"
> >  #include "intel_hotplug.h"
> > @@ -2031,3 +2032,33 @@ bool intel_dp_mst_crtc_needs_modeset(struct
> > intel_atomic_state *state,
> >
> >       return false;
> >  }
> > +
> > +/**
> > + * intel_dp_mst_prepare_probe - Prepare an MST link for topology
> > +probing
> > + * @intel_dp: DP port object
> > + *
> > + * Prepare an MST link for topology probing, programming the target
> > + * link parameters to DPCD. This step is a requirement of the
> > +enumaration
> > + * of path resources during probing.
> > + */
> > +void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp) {
> > +     int link_rate = intel_dp_max_link_rate(intel_dp);
> > +     int lane_count = intel_dp_max_lane_count(intel_dp);
> > +     u8 rate_select;
> > +     u8 link_bw;
> > +
> > +     if (intel_dp->link_trained)
> > +             return;
> > +
> > +     if (intel_mst_probed_link_params_valid(intel_dp, link_rate,
> > lane_count))
> > +             return;
> > +
> > +     intel_dp_compute_rate(intel_dp, link_rate, &link_bw, &rate_select);
> > +
> > +     intel_dp_link_training_set_mode(intel_dp, link_rate, false);
> > +     intel_dp_link_training_set_bw(intel_dp, link_bw, rate_select,
> > lane_count,
> > +                                   drm_dp_enhanced_frame_cap(intel_dp-
> > >dpcd));
> > +
> > +     intel_mst_set_probed_link_params(intel_dp, link_rate, lane_count);
> > }
> > diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.h
> > b/drivers/gpu/drm/i915/display/intel_dp_mst.h
> > index 8ca1d599091c6..fba76454fa67f 100644
> > --- a/drivers/gpu/drm/i915/display/intel_dp_mst.h
> > +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.h
> > @@ -27,5 +27,6 @@ int intel_dp_mst_atomic_check_link(struct
> > intel_atomic_state *state,
> >                                  struct intel_link_bw_limits *limits);  bool
> > intel_dp_mst_crtc_needs_modeset(struct intel_atomic_state *state,
> >                                    struct intel_crtc *crtc);
> > +void intel_dp_mst_prepare_probe(struct intel_dp *intel_dp);
> >
> >  #endif /* __INTEL_DP_MST_H__ */
> > --
> > 2.44.2
> 

  reply	other threads:[~2024-07-25 12:15 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-22 16:54 [PATCH 00/14] drm/i915/dp_mst: Enable LT fallback for UHBR<->non-UHBR rates Imre Deak
2024-07-22 16:54 ` [PATCH 01/14] drm/dp_mst: Factor out function to queue a topology probe work Imre Deak
2024-07-22 17:19   ` Lyude Paul
2024-07-26 17:05     ` Imre Deak
2024-07-30 10:55       ` Jani Nikula
2024-07-22 16:54 ` [PATCH 02/14] drm/dp_mst: Add a helper to queue a topology probe Imre Deak
2024-07-22 16:54 ` [PATCH 03/14] drm/dp_mst: Simplify the condition when to enumerate path resources Imre Deak
2024-08-04 13:45   ` Manasi Navare
2024-08-05 13:47     ` Imre Deak
2024-07-22 16:54 ` [PATCH 04/14] drm/i915/ddi: For an active output call the DP encoder sync_state() only for DP Imre Deak
2024-07-23  8:28   ` Kandpal, Suraj
2024-07-23 11:56     ` Imre Deak
2024-07-23 13:04       ` Kandpal, Suraj
2024-07-22 16:54 ` [PATCH 05/14] drm/i915/dp: Initialize the link parameters during HW readout Imre Deak
2024-07-23  8:34   ` Kandpal, Suraj
2024-07-23 11:59     ` Imre Deak
2024-07-23 13:05       ` Kandpal, Suraj
2024-07-22 16:54 ` [PATCH 06/14] drm/i915/dp: Send only a single modeset-retry uevent for a commit Imre Deak
2024-07-24  4:29   ` Murthy, Arun R
2024-07-24 11:16     ` Imre Deak
2024-07-25  3:16       ` Murthy, Arun R
2024-07-25 11:44         ` Imre Deak
2024-07-26  3:30           ` Murthy, Arun R
2024-07-22 16:54 ` [PATCH 07/14] drm/i915/dp: Add a separate function to reduce the link parameters Imre Deak
2024-07-23  9:12   ` Kandpal, Suraj
2024-07-24  4:55   ` Murthy, Arun R
2024-07-24 11:19     ` Imre Deak
2024-07-25  3:20       ` Murthy, Arun R
2024-07-25 12:14         ` Imre Deak
2024-07-22 16:54 ` [PATCH 08/14] drm/i915/dp: Add helpers to set link training mode, BW parameters Imre Deak
2024-07-23  9:17   ` Kandpal, Suraj
2024-07-22 16:54 ` [PATCH 09/14] drm/i915/dp_mst: Reduce the link parameters in BW order after LT failures Imre Deak
2024-07-22 19:25   ` Imre Deak
2024-07-24  6:43   ` Kandpal, Suraj
2024-07-24 11:27     ` Imre Deak
2024-07-24 16:42       ` Kandpal, Suraj
2024-07-29 14:44   ` [PATCH v2 " Imre Deak
2024-07-29 15:59     ` Murthy, Arun R
2024-07-22 16:54 ` [PATCH 10/14] drm/i915/dp_mst: Configure MST after the link parameters are reset Imre Deak
2024-07-24  6:45   ` Kandpal, Suraj
2024-07-22 16:55 ` [PATCH 11/14] drm/i915/dp_mst: Queue modeset-retry after a failed payload BW allocation Imre Deak
2024-07-24  8:07   ` Kandpal, Suraj
2024-07-22 16:55 ` [PATCH 12/14] drm/i915/dp_mst: Reprobe the MST topology after a link parameter change Imre Deak
2024-07-24  8:48   ` Kandpal, Suraj
2024-07-22 16:55 ` [PATCH 13/14] drm/i915/dp_mst: Ensure link parameters are up-to-date for a disabled link Imre Deak
2024-07-25  5:26   ` Kandpal, Suraj
2024-07-25 12:16     ` Imre Deak [this message]
2024-07-22 16:55 ` [PATCH 14/14] drm/i915/dp_mst: Enable LT fallback between UHBR/non-UHBR link rates Imre Deak
2024-07-24  8:52   ` Kandpal, Suraj
2024-07-24 11:33     ` Imre Deak
2024-07-24 16:41       ` Kandpal, Suraj
2024-07-22 18:48 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp_mst: Enable LT fallback for UHBR<->non-UHBR rates Patchwork
2024-07-22 18:48 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-07-22 18:55 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-23 10:41 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-07-29 16:25 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp_mst: Enable LT fallback for UHBR<->non-UHBR rates (rev2) Patchwork
2024-07-29 16:25 ` ✗ Fi.CI.SPARSE: " Patchwork
2024-07-29 16:34 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-30  7:27 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-07-31 16:05   ` Imre Deak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZqJCCL9yBPeaJrHi@ideak-desk.fi.intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=suraj.kandpal@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.