All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Lyude Paul <lyude@redhat.com>
Cc: nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
	intel-gfx@lists.freedesktop.org,
	"Daniel Vetter" <daniel.vetter@ffwll.ch>,
	"Jani Nikula" <jani.nikula@linux.intel.com>,
	stable@vger.kernel.org, "Ben Skeggs" <bskeggs@redhat.com>,
	"David Airlie" <airlied@linux.ie>,
	"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
	"Thierry Reding" <treding@nvidia.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/5] drm/nouveau: Fix nv50_mstc->best_encoder()
Date: Fri, 5 Oct 2018 09:14:40 +0200	[thread overview]
Message-ID: <20181005071440.GU31561@phenom.ffwll.local> (raw)
In-Reply-To: <20181005002956.7317-3-lyude@redhat.com>

On Thu, Oct 04, 2018 at 08:29:51PM -0400, Lyude Paul wrote:
> As mentioned in the previous commit, we currently prevent new modesets
> on recently-removed MST connectors by returning no encoder from our
> ->best_encoder() callback once the MST port has disappeared. This is
> wrong however, because it prevents legacy modesetting users from being
> able to disable CRTCs on MST connectors after the connector's respective
> topology has disappeared.
> 
> So, fix this by instead by just always returning a valid encoder.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: stable@vger.kernel.org
> 
> Changes since v2:
> - Remove usage of atomic MST helper for now, since that got replaced
>   with a much simpler solution
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 5691dfa1db6f..63a23a80f279 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -843,22 +843,16 @@ nv50_mstc_atomic_best_encoder(struct drm_connector *connector,
>  {
>  	struct nv50_head *head = nv50_head(connector_state->crtc);
>  	struct nv50_mstc *mstc = nv50_mstc(connector);
> -	if (mstc->port) {
> -		struct nv50_mstm *mstm = mstc->mstm;
> -		return &mstm->msto[head->base.index]->encoder;
> -	}
> -	return NULL;
> +
> +	return &mstc->mstm->msto[head->base.index]->encoder;
>  }
>  
>  static struct drm_encoder *
>  nv50_mstc_best_encoder(struct drm_connector *connector)
>  {
>  	struct nv50_mstc *mstc = nv50_mstc(connector);
> -	if (mstc->port) {
> -		struct nv50_mstm *mstm = mstc->mstm;
> -		return &mstm->msto[0]->encoder;
> -	}
> -	return NULL;
> +
> +	return &mstc->mstm->msto[0]->encoder;
>  }
>  
>  static enum drm_mode_status
> -- 
> 2.17.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Lyude Paul <lyude@redhat.com>
Cc: dri-devel@lists.freedesktop.org, David Airlie <airlied@linux.ie>,
	nouveau@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	linux-kernel@vger.kernel.org, stable@vger.kernel.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Thierry Reding <treding@nvidia.com>,
	Ben Skeggs <bskeggs@redhat.com>
Subject: Re: [PATCH v4 2/5] drm/nouveau: Fix nv50_mstc->best_encoder()
Date: Fri, 5 Oct 2018 09:14:40 +0200	[thread overview]
Message-ID: <20181005071440.GU31561@phenom.ffwll.local> (raw)
In-Reply-To: <20181005002956.7317-3-lyude@redhat.com>

On Thu, Oct 04, 2018 at 08:29:51PM -0400, Lyude Paul wrote:
> As mentioned in the previous commit, we currently prevent new modesets
> on recently-removed MST connectors by returning no encoder from our
> ->best_encoder() callback once the MST port has disappeared. This is
> wrong however, because it prevents legacy modesetting users from being
> able to disable CRTCs on MST connectors after the connector's respective
> topology has disappeared.
> 
> So, fix this by instead by just always returning a valid encoder.
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: stable@vger.kernel.org
> 
> Changes since v2:
> - Remove usage of atomic MST helper for now, since that got replaced
>   with a much simpler solution
> 
> Signed-off-by: Lyude Paul <lyude@redhat.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

> ---
>  drivers/gpu/drm/nouveau/dispnv50/disp.c | 14 ++++----------
>  1 file changed, 4 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.c b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> index 5691dfa1db6f..63a23a80f279 100644
> --- a/drivers/gpu/drm/nouveau/dispnv50/disp.c
> +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.c
> @@ -843,22 +843,16 @@ nv50_mstc_atomic_best_encoder(struct drm_connector *connector,
>  {
>  	struct nv50_head *head = nv50_head(connector_state->crtc);
>  	struct nv50_mstc *mstc = nv50_mstc(connector);
> -	if (mstc->port) {
> -		struct nv50_mstm *mstm = mstc->mstm;
> -		return &mstm->msto[head->base.index]->encoder;
> -	}
> -	return NULL;
> +
> +	return &mstc->mstm->msto[head->base.index]->encoder;
>  }
>  
>  static struct drm_encoder *
>  nv50_mstc_best_encoder(struct drm_connector *connector)
>  {
>  	struct nv50_mstc *mstc = nv50_mstc(connector);
> -	if (mstc->port) {
> -		struct nv50_mstm *mstm = mstc->mstm;
> -		return &mstm->msto[0]->encoder;
> -	}
> -	return NULL;
> +
> +	return &mstc->mstm->msto[0]->encoder;
>  }
>  
>  static enum drm_mode_status
> -- 
> 2.17.1
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2018-10-05  7:14 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-05  0:29 [PATCH v4 0/5] Fix legacy DPMS changes with MST Lyude Paul
2018-10-05  0:29 ` Lyude Paul
2018-10-05  0:29 ` [PATCH v4 1/5] drm/atomic_helper: Disallow new modesets on unregistered connectors Lyude Paul
2018-10-05  7:13   ` Daniel Vetter
2018-10-05  0:29 ` [PATCH v4 2/5] drm/nouveau: Fix nv50_mstc->best_encoder() Lyude Paul
2018-10-05  7:14   ` Daniel Vetter [this message]
2018-10-05  7:14     ` Daniel Vetter
2018-10-05  0:29 ` [PATCH v4 3/5] drm/i915: Leave intel_conn->mst_port set, use mst_port_gone instead Lyude Paul
2018-10-05  7:20   ` Daniel Vetter
2018-10-05  7:20     ` Daniel Vetter
2018-10-05  0:29 ` [PATCH v4 4/5] drm/i915: Skip vcpi allocation for MSTB ports that are gone Lyude Paul
2018-10-05  7:26   ` Daniel Vetter
2018-10-05  7:26     ` Daniel Vetter
2018-10-05  0:29 ` [PATCH v4 5/5] drm/i915: Fix intel_dp_mst_best_encoder() Lyude Paul
2018-10-05  7:28   ` Daniel Vetter
2018-10-05  0:36 ` ✗ Fi.CI.BAT: failure for Fix legacy DPMS changes with MST (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=20181005071440.GU31561@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=bskeggs@redhat.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lyude@redhat.com \
    --cc=nouveau@lists.freedesktop.org \
    --cc=stable@vger.kernel.org \
    --cc=treding@nvidia.com \
    --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 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.