From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2 8/8] drm/i915: Remove duplicate DDI enabling logic from MST path
Date: Thu, 2 Mar 2017 12:16:41 +0200 [thread overview]
Message-ID: <20170302101641.GF31595@intel.com> (raw)
In-Reply-To: <20170301141318.3607-9-ander.conselvan.de.oliveira@intel.com>
On Wed, Mar 01, 2017 at 04:13:18PM +0200, Ander Conselvan de Oliveira wrote:
> The logic to enable a DDI in intel_mst_pre_enable_dp() is essentially
> the same as in intel_ddi_pre_enable_dp(). So reuse the latter function
> by calling the post_disable hook on the intel_dig_port instead of
> duplicating that code.
>
> v2: Don't oops because of a NULL encoder->crtc. (Ville)
> Cc: Imre Deak <imre.deak@intel.com>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
> ---
> drivers/gpu/drm/i915/intel_ddi.c | 2 ++
> drivers/gpu/drm/i915/intel_dp_mst.c | 23 +++--------------------
> 2 files changed, 5 insertions(+), 20 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
> index 2f26c75..208500a 100644
> --- a/drivers/gpu/drm/i915/intel_ddi.c
> +++ b/drivers/gpu/drm/i915/intel_ddi.c
> @@ -1714,6 +1714,8 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder,
> enum port port = intel_ddi_get_encoder_port(encoder);
> struct intel_digital_port *dig_port = enc_to_dig_port(&encoder->base);
>
> + WARN_ON(link_mst && port == PORT_A);
> +
MST isn't allowed on port E either IIRC, so might want to warn for
that one as well.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> intel_dp_set_link_params(intel_dp, link_rate, lane_count,
> link_mst);
> if (encoder->type == INTEL_OUTPUT_EDP)
> diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
> index a8334e1..094cbdc 100644
> --- a/drivers/gpu/drm/i915/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/intel_dp_mst.c
> @@ -159,26 +159,9 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder,
>
> DRM_DEBUG_KMS("%d\n", intel_dp->active_mst_links);
>
> - if (intel_dp->active_mst_links == 0) {
> - intel_ddi_clk_select(&intel_dig_port->base,
> - pipe_config->shared_dpll);
> -
> - intel_display_power_get(dev_priv,
> - intel_dig_port->ddi_io_power_domain);
> -
> - intel_prepare_dp_ddi_buffers(&intel_dig_port->base);
> - intel_dp_set_link_params(intel_dp,
> - pipe_config->port_clock,
> - pipe_config->lane_count,
> - true);
> -
> - intel_ddi_init_dp_buf_reg(&intel_dig_port->base);
> -
> - intel_dp_sink_dpms(intel_dp, DRM_MODE_DPMS_ON);
> -
> - intel_dp_start_link_train(intel_dp);
> - intel_dp_stop_link_train(intel_dp);
> - }
> + if (intel_dp->active_mst_links == 0)
> + intel_dig_port->base.pre_enable(&intel_dig_port->base,
> + pipe_config, NULL);
>
> ret = drm_dp_mst_allocate_vcpi(&intel_dp->mst_mgr,
> connector->port,
> --
> 2.9.3
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-02 10:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-01 14:13 [PATCH v2 0/8] Try to fix MST regression with DDI IO power domains Ander Conselvan de Oliveira
2017-03-01 14:13 ` [PATCH v2 1/8] drm/i915: Enable DDI IO power domains in the DP MST path Ander Conselvan de Oliveira
2017-03-02 9:06 ` Ander Conselvan De Oliveira
2017-03-01 14:13 ` [PATCH v2 2/8] drm/i915: Pass intel_crtc to fdi_link_train() hooks Ander Conselvan de Oliveira
2017-03-01 14:13 ` [PATCH v2 3/8] drm/i915: Pass intel_crtc to intel_lpt_pch_enable() Ander Conselvan de Oliveira
2017-03-01 14:13 ` [PATCH v2 4/8] drm/i915: Pass pipe_config to pch_enable() functions Ander Conselvan de Oliveira
2017-03-01 14:38 ` Ville Syrjälä
2017-03-02 9:43 ` [PATCH] " Ander Conselvan de Oliveira
2017-03-02 10:07 ` Ville Syrjälä
2017-03-01 14:13 ` [PATCH v2 5/8] drm/i915: Pass pipe_config to fdi_link_train() functions Ander Conselvan de Oliveira
2017-03-02 9:44 ` [PATCH] " Ander Conselvan de Oliveira
2017-03-01 14:13 ` [PATCH v2 6/8] drm/i915: Pass intel_crtc to DDI functions called from crtc en/disable Ander Conselvan de Oliveira
2017-03-01 14:13 ` [PATCH v2 7/8] drm/i915: Remove direct usages of intel_crtc->config from DDI code Ander Conselvan de Oliveira
2017-03-01 14:13 ` [PATCH v2 8/8] drm/i915: Remove duplicate DDI enabling logic from MST path Ander Conselvan de Oliveira
2017-03-02 10:16 ` Ville Syrjälä [this message]
2017-03-01 15:48 ` ✓ Fi.CI.BAT: success for Try to fix MST regression with DDI IO power domains (rev2) Patchwork
2017-03-02 10:48 ` ✓ Fi.CI.BAT: success for Try to fix MST regression with DDI IO power domains (rev4) 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=20170302101641.GF31595@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=ander.conselvan.de.oliveira@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
/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