All of lore.kernel.org
 help / color / mirror / Atom feed
From: Salvatore Bonaccorso <carnil@debian.org>
To: gregkh@linuxfoundation.org
Cc: lyude@redhat.com, alexander.deucher@amd.com,
	harry.wentland@amd.com, odyx@debian.org, stable@vger.kernel.org
Subject: Re: FAILED: patch "[PATCH] drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count" failed to apply to 6.1-stable tree
Date: Thu, 16 Mar 2023 22:08:57 +0100	[thread overview]
Message-ID: <ZBOFaX9VNbedlGSj@eldamar.lan> (raw)
In-Reply-To: <167844819310084@kroah.com>

Hi,

On Fri, Mar 10, 2023 at 12:36:33PM +0100, gregkh@linuxfoundation.org wrote:
> 
> The patch below does not apply to the 6.1-stable tree.
> If someone wants it applied there, or to any other stable or longterm
> tree, then please email the backport, including the original git commit
> id to <stable@vger.kernel.org>.
> 
> To reproduce the conflict and resubmit, you may use the following commands:
> 
> git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.1.y
> git checkout FETCH_HEAD
> git cherry-pick -x c689e1e362ea29d10fbd9a5e94b17be991d0e231
> # <resolve conflicts, build, test, etc.>
> git commit -s
> git send-email --to '<stable@vger.kernel.org>' --in-reply-to '167844819310084@kroah.com' --subject-prefix 'PATCH 6.1.y' HEAD^..
> 
> Possible dependencies:
> 
> c689e1e362ea ("drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count assignments")
> 
> thanks,
> 
> greg k-h
> 
> ------------------ original commit in Linus's tree ------------------
> 
> From c689e1e362ea29d10fbd9a5e94b17be991d0e231 Mon Sep 17 00:00:00 2001
> From: Lyude Paul <lyude@redhat.com>
> Date: Wed, 23 Nov 2022 14:50:16 -0500
> Subject: [PATCH] drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count
>  assignments
> 
> Looks like I made a pretty big mistake here without noticing: it seems when
> I moved the assignments of mst_state->pbn_div I completely missed the fact
> that the reason for us calling drm_dp_mst_update_slots() earlier was to
> account for the fact that we need to call this function using info from the
> root MST connector, instead of just trying to do this from each MST
> encoder's atomic check function. Otherwise, we end up filling out all of
> DC's link information with zeroes.
> 
> So, let's restore that and hopefully fix this DSC regression.
> 
> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2171
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Signed-off-by: Harry Wentland <harry.wentland@amd.com>
> Fixes: 4d07b0bc4034 ("drm/display/dp_mst: Move all payload info into the atomic state")
> Cc: stable@vger.kernel.org # 6.1
> Reviewed-by: Harry Wentland <harry.wentland@amd.com>
> Tested-by: Didier Raboud <odyx@debian.org>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> 
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index 39513a6d2244..2122c2be269b 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -9683,6 +9683,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>  	struct drm_connector_state *old_con_state, *new_con_state;
>  	struct drm_crtc *crtc;
>  	struct drm_crtc_state *old_crtc_state, *new_crtc_state;
> +	struct drm_dp_mst_topology_mgr *mgr;
> +	struct drm_dp_mst_topology_state *mst_state;
>  	struct drm_plane *plane;
>  	struct drm_plane_state *old_plane_state, *new_plane_state;
>  	enum dc_status status;
> @@ -9938,6 +9940,28 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>  		lock_and_validation_needed = true;
>  	}
>  
> +#if defined(CONFIG_DRM_AMD_DC_DCN)
> +	/* set the slot info for each mst_state based on the link encoding format */
> +	for_each_new_mst_mgr_in_state(state, mgr, mst_state, i) {
> +		struct amdgpu_dm_connector *aconnector;
> +		struct drm_connector *connector;
> +		struct drm_connector_list_iter iter;
> +		u8 link_coding_cap;
> +
> +		drm_connector_list_iter_begin(dev, &iter);
> +		drm_for_each_connector_iter(connector, &iter) {
> +			if (connector->index == mst_state->mgr->conn_base_id) {
> +				aconnector = to_amdgpu_dm_connector(connector);
> +				link_coding_cap = dc_link_dp_mst_decide_link_encoding_format(aconnector->dc_link);
> +				drm_dp_mst_update_slots(mst_state, link_coding_cap);
> +
> +				break;
> +			}
> +		}
> +		drm_connector_list_iter_end(&iter);
> +	}
> +#endif
> +
>  	/**
>  	 * Streams and planes are reset when there are changes that affect
>  	 * bandwidth. Anything that affects bandwidth needs to go through
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 5fa9bab95038..e8d14ab0953a 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -927,11 +927,6 @@ static int compute_mst_dsc_configs_for_link(struct drm_atomic_state *state,
>  	if (IS_ERR(mst_state))
>  		return PTR_ERR(mst_state);
>  
> -	mst_state->pbn_div = dm_mst_get_pbn_divider(dc_link);
> -#if defined(CONFIG_DRM_AMD_DC_DCN)
> -	drm_dp_mst_update_slots(mst_state, dc_link_dp_mst_decide_link_encoding_format(dc_link));
> -#endif
> -
>  	/* Set up params */
>  	for (i = 0; i < dc_state->stream_count; i++) {
>  		struct dc_dsc_policy dsc_policy = {0};

FWIW, I'm not sure what happened here exactly. The commit was applied
for the first time in 1119e1f9636b76aef14068c7fd0b4d55132b86b8 in
6.2-rc6, backported to 6.1.9. Then again as
c689e1e362ea29d10fbd9a5e94b17be991d0e231 in 6.3-rc1.

Similar for the related commits, which was one of the major blocking
regressions for the 6.1 series.

Just wanted to mention here as noiced the failed apply mail.

Regards,
Salvatore

      reply	other threads:[~2023-03-16 21:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-10 11:36 FAILED: patch "[PATCH] drm/amdgpu/display/mst: Fix mst_state->pbn_div and slot count" failed to apply to 6.1-stable tree gregkh
2023-03-16 21:08 ` Salvatore Bonaccorso [this message]

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=ZBOFaX9VNbedlGSj@eldamar.lan \
    --to=carnil@debian.org \
    --cc=alexander.deucher@amd.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=harry.wentland@amd.com \
    --cc=lyude@redhat.com \
    --cc=odyx@debian.org \
    --cc=stable@vger.kernel.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 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.