From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH 1/5] drm/i915: Call hsw_fdi_link_train() directly()
Date: Mon, 16 Dec 2019 22:50:14 +0200 [thread overview]
Message-ID: <20191216205014.GA1208@intel.com> (raw)
In-Reply-To: <5e37538eb15a815069d6e1230579324b0cf8daa4.camel@intel.com>
On Mon, Dec 16, 2019 at 08:37:28PM +0000, Souza, Jose wrote:
> On Fri, 2019-12-13 at 21:52 +0200, Ville Syrjala wrote:
> > From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> >
> > Remove the pointless vfunc detour for hsw_fdi_link_train()
> > and just call it directly. Also pass the encoder in so we
> > can nuke the silly encoder loop within.
> >
> > Cc: José Roberto de Souza <jose.souza@intel.com>
> > Cc: Manasi Navare <manasi.d.navare@intel.com>
> > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > ---
> > drivers/gpu/drm/i915/display/intel_crt.c | 2 +-
> > drivers/gpu/drm/i915/display/intel_ddi.c | 12 ++++--------
> > drivers/gpu/drm/i915/display/intel_ddi.h | 2 +-
> > drivers/gpu/drm/i915/display/intel_display.c | 2 --
> > 4 files changed, 6 insertions(+), 12 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_crt.c
> > b/drivers/gpu/drm/i915/display/intel_crt.c
> > index 7a2d36905155..50624b8f064d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_crt.c
> > +++ b/drivers/gpu/drm/i915/display/intel_crt.c
> > @@ -278,7 +278,7 @@ static void hsw_pre_enable_crt(struct
> > intel_encoder *encoder,
> >
> > intel_set_cpu_fifo_underrun_reporting(dev_priv, pipe, false);
> >
> > - dev_priv->display.fdi_link_train(crtc, crtc_state);
> > + hsw_fdi_link_train(encoder, crtc_state);
> >
> > intel_ddi_enable_pipe_clock(crtc_state);
> > }
> > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c
> > b/drivers/gpu/drm/i915/display/intel_ddi.c
> > index 5b6f32517c75..94f8bc4cd335 100644
> > --- a/drivers/gpu/drm/i915/display/intel_ddi.c
> > +++ b/drivers/gpu/drm/i915/display/intel_ddi.c
> > @@ -1107,18 +1107,14 @@ static u32 icl_pll_to_ddi_clk_sel(struct
> > intel_encoder *encoder,
> > * DDI A (which is used for eDP)
> > */
> >
> > -void hsw_fdi_link_train(struct intel_crtc *crtc,
> > +void hsw_fdi_link_train(struct intel_encoder *encoder,
> > const struct intel_crtc_state *crtc_state)
> > {
> > - struct drm_device *dev = crtc->base.dev;
> > - struct drm_i915_private *dev_priv = to_i915(dev);
> > - struct intel_encoder *encoder;
> > + struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
> > + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
> > u32 temp, i, rx_ctl_val, ddi_pll_sel;
> >
> > - for_each_encoder_on_crtc(dev, &crtc->base, encoder) {
> > - WARN_ON(encoder->type != INTEL_OUTPUT_ANALOG);
> > - intel_prepare_dp_ddi_buffers(encoder, crtc_state);
> > - }
> > + intel_prepare_dp_ddi_buffers(encoder, crtc_state);
> >
> > /* Set the FDI_RX_MISC pwrdn lanes and the 2 workarounds listed
> > at the
> > * mode set "sequence for CRT port" document:
> > diff --git a/drivers/gpu/drm/i915/display/intel_ddi.h
> > b/drivers/gpu/drm/i915/display/intel_ddi.h
> > index 19aeab1246ee..167c6579d972 100644
> > --- a/drivers/gpu/drm/i915/display/intel_ddi.h
> > +++ b/drivers/gpu/drm/i915/display/intel_ddi.h
> > @@ -22,7 +22,7 @@ struct intel_encoder;
> > void intel_ddi_fdi_post_disable(struct intel_encoder *intel_encoder,
> > const struct intel_crtc_state
> > *old_crtc_state,
> > const struct drm_connector_state
> > *old_conn_state);
> > -void hsw_fdi_link_train(struct intel_crtc *crtc,
> > +void hsw_fdi_link_train(struct intel_encoder *encoder,
> > const struct intel_crtc_state *crtc_state);
> > void intel_ddi_init(struct drm_i915_private *dev_priv, enum port
> > port);
> > bool intel_ddi_get_hw_state(struct intel_encoder *encoder, enum pipe
> > *pipe);
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c
> > b/drivers/gpu/drm/i915/display/intel_display.c
> > index 0f37f1d2026d..8aed67d2c105 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -16673,8 +16673,6 @@ void intel_init_display_hooks(struct
> > drm_i915_private *dev_priv)
> > } else if (IS_IVYBRIDGE(dev_priv)) {
> > /* FIXME: detect B0+ stepping and use auto training */
> > dev_priv->display.fdi_link_train =
> > ivb_manual_fdi_link_train;
> > - } else if (IS_HASWELL(dev_priv) || IS_BROADWELL(dev_priv)) {
> > - dev_priv->display.fdi_link_train = hsw_fdi_link_train;
>
> Just missing the chunk removing fdi_link_train from
> drm_i915_display_funcs.
Still need it for pre-hsw.
>
> With that:
>
> Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
>
> > }
> >
> > if (INTEL_GEN(dev_priv) >= 9)
--
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:[~2019-12-16 20:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 19:52 [Intel-gfx] [PATCH 1/5] drm/i915: Call hsw_fdi_link_train() directly() Ville Syrjala
2019-12-13 19:52 ` [Intel-gfx] [PATCH 2/5] drm/i915: Nuke .post_pll_disable() for DDI platforms Ville Syrjala
2019-12-16 20:42 ` Souza, Jose
2019-12-13 19:52 ` [Intel-gfx] [PATCH 3/5] drm/i915: Pass old crtc state to skylake_scaler_disable() Ville Syrjala
2019-12-16 22:01 ` Souza, Jose
2019-12-13 19:52 ` [Intel-gfx] [PATCH 4/5] drm/i915: Pass old crtc state to intel_crtc_vblank_off() Ville Syrjala
2019-12-16 22:01 ` Souza, Jose
2019-12-13 19:52 ` [Intel-gfx] [PATCH 5/5] drm/i915: Move stuff from haswell_crtc_disable() into encoder .post_disable() Ville Syrjala
2019-12-17 17:33 ` Souza, Jose
2019-12-14 1:32 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/5] drm/i915: Call hsw_fdi_link_train() directly() Patchwork
2019-12-16 17:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/5] drm/i915: Call hsw_fdi_link_train() directly() (rev2) Patchwork
2019-12-16 20:37 ` [Intel-gfx] [PATCH 1/5] drm/i915: Call hsw_fdi_link_train() directly() Souza, Jose
2019-12-16 20:50 ` Ville Syrjälä [this message]
2019-12-16 22:10 ` Souza, Jose
2019-12-16 22:34 ` [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/5] drm/i915: Call hsw_fdi_link_train() directly() (rev2) 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=20191216205014.GA1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jose.souza@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