From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v3 v2 2/5] drm/i915: fix port checks for MST support on gen >= 11
Date: Tue, 15 Oct 2019 21:21:59 +0300 [thread overview]
Message-ID: <20191015182159.GH1208@intel.com> (raw)
In-Reply-To: <20191015164029.18431-3-lucas.demarchi@intel.com>
On Tue, Oct 15, 2019 at 09:40:26AM -0700, Lucas De Marchi wrote:
> Both Ice Lake and Elkhart Lake (gen 11) support MST on all external
> connections except DDI A. Tiger Lake (gen 12) supports on all external
> connections.
>
> Move the check to happen inside intel_dp_mst_encoder_init() and add
> specific platform checks.
>
> v2: Replace != with == checks for ports on gen < 11 (Ville)
>
> Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp.c | 7 ++-----
> drivers/gpu/drm/i915/display/intel_dp_mst.c | 22 +++++++++++++++------
> 2 files changed, 18 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
> index 6594f2af1257..415d0f2c2751 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp.c
> @@ -7271,11 +7271,8 @@ intel_dp_init_connector(struct intel_digital_port *intel_dig_port,
> intel_connector->get_hw_state = intel_connector_get_hw_state;
>
> /* init MST on ports that can support it */
> - if (HAS_DP_MST(dev_priv) && !intel_dp_is_edp(intel_dp) &&
> - (port == PORT_B || port == PORT_C ||
> - port == PORT_D || port == PORT_F))
> - intel_dp_mst_encoder_init(intel_dig_port,
> - intel_connector->base.base.id);
> + intel_dp_mst_encoder_init(intel_dig_port,
> + intel_connector->base.base.id);
>
> if (!intel_edp_init_connector(intel_dp, intel_connector)) {
> intel_dp_aux_fini(intel_dp);
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 2203be28ea01..ea062fea8a44 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -655,21 +655,31 @@ intel_dp_mst_encoder_active_links(struct intel_digital_port *intel_dig_port)
> int
> intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_base_id)
> {
> + struct drm_i915_private *i915 = to_i915(intel_dig_port->base.base.dev);
> struct intel_dp *intel_dp = &intel_dig_port->dp;
> - struct drm_device *dev = intel_dig_port->base.base.dev;
> + enum port port = intel_dig_port->base.port;
> int ret;
>
> - intel_dp->can_mst = true;
> + if (!HAS_DP_MST(i915) || intel_dp_is_edp(intel_dp))
> + return 0;
> +
> + if (INTEL_GEN(i915) <= 11 && port == PORT_A)
> + return 0;
gen<12
with that
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> +
> + if (INTEL_GEN(i915) < 11 && port == PORT_E)
> + return 0;
> +
> intel_dp->mst_mgr.cbs = &mst_cbs;
>
> /* create encoders */
> intel_dp_create_fake_mst_encoders(intel_dig_port);
> - ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev,
> + ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, &i915->drm,
> &intel_dp->aux, 16, 3, conn_base_id);
> - if (ret) {
> - intel_dp->can_mst = false;
> + if (ret)
> return ret;
> - }
> +
> + intel_dp->can_mst = true;
> +
> return 0;
> }
>
> --
> 2.23.0
--
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-10-15 18:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-15 16:40 [PATCH v3 v2 0/5] Small fixes before fixing MST Lucas De Marchi
2019-10-15 16:40 ` [PATCH v3 v2 1/5] drm/i915: simplify setting of ddi_io_power_domain Lucas De Marchi
2019-10-15 16:40 ` [PATCH v3 v2 2/5] drm/i915: fix port checks for MST support on gen >= 11 Lucas De Marchi
2019-10-15 18:21 ` Ville Syrjälä [this message]
2019-10-15 16:40 ` [PATCH v3 v2 3/5] drm/i915: remove extra new line on pipe_config mismatch Lucas De Marchi
2019-10-15 16:40 ` [PATCH v3 v2 4/5] drm/i915: add pipe id/name to pipe mismatch logs Lucas De Marchi
2019-10-15 18:24 ` Ville Syrjälä
2019-10-15 16:40 ` [PATCH v3 v2 5/5] drm/i915: prettify MST debug message Lucas De Marchi
2019-10-15 19:55 ` ✗ Fi.CI.CHECKPATCH: warning for Small fixes before fixing MST (rev2) Patchwork
2019-10-15 20:25 ` ✗ Fi.CI.BAT: failure " 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=20191015182159.GH1208@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lucas.demarchi@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.