public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 6/6] drm/i915/mst: Document the userspace fail with possible_crtcs
Date: Thu, 3 Oct 2019 18:28:25 +0300	[thread overview]
Message-ID: <20191003152825.GO1208@intel.com> (raw)
In-Reply-To: <20191002162505.30716-6-ville.syrjala@linux.intel.com>

On Wed, Oct 02, 2019 at 07:25:05PM +0300, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> To avoid accidentally breaking things in the future add a
> comment explaining why we misconfigure the pipe_mask.
> 
> Also toss in a TODO for investigating a single encoder
> approach as opposed to the encoder-per-pipe approach.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_dp_mst.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 7be82cf926ca..cb3047fe2d02 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> @@ -615,6 +615,18 @@ intel_dp_create_fake_mst_encoder(struct intel_digital_port *intel_dig_port, enum
>  	intel_encoder->power_domain = intel_dig_port->base.power_domain;
>  	intel_encoder->port = intel_dig_port->base.port;
>  	intel_encoder->cloneable = 0;
> +	/*
> +	 * This is wrong, but broken userspace uses the intersection
> +	 * of possible_crtcs of all the encoders of a given connector
> +	 * to figure out which crtcs can drive said connector. What
> +	 * should be used instead is the union of possible_crtcs.
> +	 * To keep such userspace functioning we must misconfigure
> +	 * this to make sure the intersection is not empty :(
> +	 *
> +	 * TODO: figure out if we could eliminate the per-pipe
> +	 * encoders here and just have a single encoder for each
> +	 * MST connector. That would sidestep the userspace bug.

That of course won't work since we can't register encoders dynamically.
I guess we'll just have to live with this slight discrepancy with the
possible_crtcs. We could make the encoder<->pipe assignment totally
flexible but that wouldn't actually change anything. We still get to
pick one based on whatever reason we can think of, and using the pipe
for that seems as good a reason as any.

What we could try to remove is having separate MST encoders for each
DDI port. But that would make encoder->port not work for MST again. So
defintiely has downsides, and doens't do anything for the possible_crtcs
thing.

Bah. I'll just drop the TODO.

> +	 */
>  	intel_encoder->pipe_mask = ~0;
>  
>  	intel_encoder->compute_config = intel_dp_mst_compute_config;
> -- 
> 2.21.0

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-10-03 15:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 16:25 [PATCH 1/6] drm/i915: Polish possible_clones setup Ville Syrjala
2019-10-02 16:25 ` [PATCH 2/6] drm/i915: Simplfy LVDS crtc_mask setup Ville Syrjala
2019-10-31 13:34   ` Juha-Pekka Heikkila
2019-10-31 13:34     ` [Intel-gfx] " Juha-Pekka Heikkila
2019-10-02 16:25 ` [PATCH 3/6] drm/i915: s/crtc_mask/pipe_mask/ Ville Syrjala
2019-10-02 18:00   ` Lucas De Marchi
2019-10-03 13:47     ` Ville Syrjälä
2019-10-02 16:25 ` [PATCH 4/6] drm/i915: Allow ICL+ DSI on any pipe Ville Syrjala
2019-10-02 16:35   ` Lucas De Marchi
2019-10-02 16:25 ` [PATCH 5/6] drm/i915: Simplify pipe_mask setup even further Ville Syrjala
2019-10-02 16:25 ` [PATCH 6/6] drm/i915/mst: Document the userspace fail with possible_crtcs Ville Syrjala
2019-10-03 15:28   ` Ville Syrjälä [this message]
2019-10-02 22:52 ` ✓ Fi.CI.BAT: success for series starting with [1/6] drm/i915: Polish possible_clones setup Patchwork
2019-10-03  7:15 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-10-16 20:29 ` [PATCH 1/6] " Juha-Pekka Heikkila

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=20191003152825.GO1208@intel.com \
    --to=ville.syrjala@linux.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