From: Manasi Navare <manasi.d.navare@intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 5/7] drm/i915: Reverse preemph vs. voltage swing preference
Date: Mon, 18 May 2020 11:20:22 -0700 [thread overview]
Message-ID: <20200518182022.GA32080@intel.com> (raw)
In-Reply-To: <20200515195957.GO6112@intel.com>
On Fri, May 15, 2020 at 10:59:57PM +0300, Ville Syrjälä wrote:
> On Fri, May 15, 2020 at 12:18:22PM -0700, Manasi Navare wrote:
> > On Tue, May 12, 2020 at 08:41:43PM +0300, Ville Syrjala wrote:
> > > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > >
> > > The DP spec says:
> > > "When the combination of the requested pre-emphasis level and
> > > voltage swing exceeds the capability of a DPTX, the DPTX shall
> > > set the pre-emphasis level according to the request and use the
> > > highest voltage swing it can output with the given pre-emphasis level."
> > > and
> > > "When a DPTX reads a request beyond the limits of this Standard,
> > > the DPTX shall set the pre-emphasis level according to the request
> > > and set the highest voltage swing level it can output with the
> > > given pre-emphasis level. If a DPTX is requested for 9.5dB of
> > > pre-emphasis level (may be supported for a DPTX) and cannot support
> > > that level, it shall set the pre-emphasis level to the next
> > > highest level, 6dB."
> > >
> > > Ie. we should first validate the pre-emphasis, and then select
> > > the appropriate vswing for it.
> > >
> > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > So basically reverse the logic for selecting the vswing and pre emphasis
> >
> > > ---
> > > .../drm/i915/display/intel_dp_link_training.c | 32 +++++++++----------
> > > 1 file changed, 16 insertions(+), 16 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > > index 171d9e842fc0..573f93779449 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> > > @@ -34,18 +34,18 @@ intel_dp_dump_link_status(const u8 link_status[DP_LINK_STATUS_SIZE])
> > > link_status[3], link_status[4], link_status[5]);
> > > }
> > >
> > > -static u8 dp_pre_emphasis_max(u8 voltage_swing)
> > > +static u8 dp_voltage_max(u8 preemph)
> > > {
> > > - switch (voltage_swing & DP_TRAIN_VOLTAGE_SWING_MASK) {
> > > - case DP_TRAIN_VOLTAGE_SWING_LEVEL_0:
> > > - return DP_TRAIN_PRE_EMPH_LEVEL_3;
> > > - case DP_TRAIN_VOLTAGE_SWING_LEVEL_1:
> > > - return DP_TRAIN_PRE_EMPH_LEVEL_2;
> > > - case DP_TRAIN_VOLTAGE_SWING_LEVEL_2:
> > > - return DP_TRAIN_PRE_EMPH_LEVEL_1;
> > > - case DP_TRAIN_VOLTAGE_SWING_LEVEL_3:
> > > + switch (preemph & DP_TRAIN_PRE_EMPHASIS_MASK) {
> > > + case DP_TRAIN_PRE_EMPH_LEVEL_0:
> > > + return DP_TRAIN_VOLTAGE_SWING_LEVEL_3;
> > > + case DP_TRAIN_PRE_EMPH_LEVEL_1:
> > > + return DP_TRAIN_VOLTAGE_SWING_LEVEL_2;
> > > + case DP_TRAIN_PRE_EMPH_LEVEL_2:
> > > + return DP_TRAIN_VOLTAGE_SWING_LEVEL_1;
> > > + case DP_TRAIN_PRE_EMPH_LEVEL_3:
> > > default:
> > > - return DP_TRAIN_PRE_EMPH_LEVEL_0;
> > > + return DP_TRAIN_VOLTAGE_SWING_LEVEL_0;
> >
> > These vswing levels for that specific pre emph level comes from the Bspec
> > or from the DP spec? It wasnt clear to me how level3 of vswing was the max for pre emphasis level 0 and all others?
>
> From DP 1.4 spec "Table 3-1: Allowed Vdiff_pre_pp and Pre-emphasis
> Combinations"
>
> Previosuly this was present in some semi-mangled way in each
> platform's max preeph calculation. Now we just have one canonical
> copy of it. Later on we could probably lift this into drm_dp_helper.
Okay great yes confirmed from that table and looks good to me
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Manasi
>
> --
> Ville Syrjälä
> Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-05-18 18:19 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-12 17:41 [Intel-gfx] [PATCH 0/7] drm/i915: DP vswing/preemph fixes Ville Syrjala
2020-05-12 17:41 ` [Intel-gfx] [PATCH 1/7] drm/i915: Fix cpt/ppt max pre-emphasis Ville Syrjala
2020-05-30 1:30 ` Souza, Jose
2020-05-12 17:41 ` [Intel-gfx] [PATCH 2/7] drm/i915: Fix ibx max vswing/preemph Ville Syrjala
2020-06-01 20:23 ` Souza, Jose
2020-05-12 17:41 ` [Intel-gfx] [PATCH 3/7] drm/i915: Fix ivb cpu edp vswing Ville Syrjala
2020-05-30 1:38 ` Souza, Jose
2020-05-12 17:41 ` [Intel-gfx] [PATCH 4/7] drm/i915: Add {preemph, voltage}_max() vfuncs Ville Syrjala
2020-05-15 19:09 ` Manasi Navare
2020-05-12 17:41 ` [Intel-gfx] [PATCH 5/7] drm/i915: Reverse preemph vs. voltage swing preference Ville Syrjala
2020-05-15 19:18 ` Manasi Navare
2020-05-15 19:59 ` Ville Syrjälä
2020-05-18 18:20 ` Manasi Navare [this message]
2020-05-12 17:41 ` [Intel-gfx] [PATCH 6/7] drm/i915: Fix DP_TRAIN_MAX_{PRE_EMPHASIS, SWING}_REACHED handling Ville Syrjala
2020-06-25 21:06 ` Imre Deak
2020-05-12 17:41 ` [Intel-gfx] [PATCH 7/7] drm/i915: Replace some hand rolled max()s Ville Syrjala
2020-05-15 19:21 ` Manasi Navare
2020-05-12 18:38 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: DP vswing/preemph fixes Patchwork
2020-05-12 20:11 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
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=20200518182022.GA32080@intel.com \
--to=manasi.d.navare@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox