From nobody Sat Feb 7 21:24:15 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D658A12F39B; Wed, 27 Mar 2024 12:06:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541212; cv=none; b=qwK0uVcWe9mKdBZl8paXksw7oMDWCdvmRfqRZZH0hVfPrCkP6B9l70sY7Z9enHSKn3IB7TmvPQ4Ww5eIM86XaAOoqI182ODyGroinjrjYqJ/gbthNu8RPXUr92NwLj/rWsFaGGBl1QpZq3pgYvqAKqQ983nW/SKpwSnBsb0KSDY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711541212; c=relaxed/simple; bh=JsFLmICPclUEfk3uONVg9S1ufjrbfa369jBFDcMe1D8=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DBYJ6i7Lp1vyjoJV7YoeTfEFWcVE61VS0Bht0aR+bZGCu9dRkZnqkEMMdIgzgFMcLD3GkeK4lUi+0a2g6DPfWsKLhC2JW7i8hV/bkN65LvoGwTku6M+7TgGCYdzv4D5tj53LM2XtKATomgbZsA/LmJMwgI0oVseF8z+6PLU7PYM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AiYKpqpf; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AiYKpqpf" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFD6CC433C7; Wed, 27 Mar 2024 12:06:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711541212; bh=JsFLmICPclUEfk3uONVg9S1ufjrbfa369jBFDcMe1D8=; h=From:To:Cc:Subject:Date:From; b=AiYKpqpfZLIB0RhUbv3jjPdfam3Ptoab8wn0i9RB3nydQkMScSpAejqhkhmbsoNew uNSdNILLvUvxfTqzjNCOTevyVQqVhXUILYXa9WgrnDYVD4ypGpvrrQA0WjGStkna3B cFv9J8Gjk2j+8b8ccm5LfTo+flUV+95kDrQgVsDck38+uaohle/9kACHO6blQqTH/S TGLOam0e9cBx9v1mhNPTnaTSGjWaQQL1gqLsdcXzSgq+wJjpFXw8I+lpxUkDUMS1aD GPG1Ht/VaPdL512PleSk6NgbSvdAIRDOYzDvzvRhTMZW3dQ9He2bO67U2OLRAia3Bu sn3kSMTM0da4g== From: Sasha Levin To: stable@vger.kernel.org, wayne.lin@amd.com Cc: Aurabindo Pillai , Rodrigo Siqueira , Daniel Wheeler , Alex Deucher , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: FAILED: Patch "drm/amd/display: adjust few initialization order in dm" failed to apply to 6.8-stable tree Date: Wed, 27 Mar 2024 08:06:50 -0400 Message-ID: <20240327120650.2824824-1-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The patch below does not apply to the 6.8-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 . Thanks, Sasha Acked-by: Rodrigo Siqueira Reviewed-by: Aurabindo Pillai Tested-by: Daniel Wheeler ------------------ original commit in Linus's tree ------------------ From c9aef4f6c6d7cdc92a64ffe761c6921ec85157ae Mon Sep 17 00:00:00 2001 From: Wayne Lin Date: Fri, 2 Feb 2024 17:34:11 +0800 Subject: [PATCH] drm/amd/display: adjust few initialization order in dm [Why] Observe error message "Can't retrieve aconnector in hpd_rx_irq_offload_work" when boot up with a mst tbt4 dock connected. After analyzing, there are few parts needed to be adjusted: 1. hpd_rx_offload_wq[].aconnector is not initialzed before the dmub outbox hpd_irq handler get registered which causes the error message. 2. registeration of hpd and hpd_rx_irq event for usb4 dp tunneling is not aligned with legacy interface sequence [How] Put DMUB_NOTIFICATION_HPD and DMUB_NOTIFICATION_HPD_IRQ handler registration into register_hpd_handlers() to align other interfaces and get hpd_rx_offload_wq[].aconnector initialized earlier than that. Leave DMUB_NOTIFICATION_AUX_REPLY registered as it was since we need that while calling dc_link_detect(). USB4 connection status will be proactively detected by dc_link_detect_connection_type() in amdgpu_dm_initialize_drm_de= vice() Cc: Stable Reviewed-by: Aurabindo Pillai Acked-by: Rodrigo Siqueira Tested-by: Daniel Wheeler Signed-off-by: Wayne Lin Signed-off-by: Alex Deucher --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 37 +++++++++---------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gp= u/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 985137b51372d..8b13cb334b366 100644 --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -1844,21 +1844,12 @@ static int amdgpu_dm_init(struct amdgpu_device *ade= v) DRM_ERROR("amdgpu: fail to register dmub aux callback"); goto error; } - if (!register_dmub_notify_callback(adev, DMUB_NOTIFICATION_HPD, dmub_hpd= _callback, true)) { - DRM_ERROR("amdgpu: fail to register dmub hpd callback"); - goto error; - } - if (!register_dmub_notify_callback(adev, DMUB_NOTIFICATION_HPD_IRQ, dmub= _hpd_callback, true)) { - DRM_ERROR("amdgpu: fail to register dmub hpd callback"); - goto error; - } - } - - /* Enable outbox notification only after IRQ handlers are registered and = DMUB is alive. - * It is expected that DMUB will resend any pending notifications at this= point, for - * example HPD from DPIA. - */ - if (dc_is_dmub_outbox_supported(adev->dm.dc)) { + /* Enable outbox notification only after IRQ handlers are registered and= DMUB is alive. + * It is expected that DMUB will resend any pending notifications at thi= s point. Note + * that hpd and hpd_irq handler registration are deferred to register_hp= d_handlers() to + * align legacy interface initialization sequence. Connection status wil= l be proactivly + * detected once in the amdgpu_dm_initialize_drm_device. + */ dc_enable_dmub_outbox(adev->dm.dc); =20 /* DPIA trace goes to dmesg logs only if outbox is enabled */ @@ -3547,6 +3538,14 @@ static void register_hpd_handlers(struct amdgpu_devi= ce *adev) int_params.requested_polarity =3D INTERRUPT_POLARITY_DEFAULT; int_params.current_polarity =3D INTERRUPT_POLARITY_DEFAULT; =20 + if (dc_is_dmub_outbox_supported(adev->dm.dc)) { + if (!register_dmub_notify_callback(adev, DMUB_NOTIFICATION_HPD, dmub_hpd= _callback, true)) + DRM_ERROR("amdgpu: fail to register dmub hpd callback"); + + if (!register_dmub_notify_callback(adev, DMUB_NOTIFICATION_HPD_IRQ, dmub= _hpd_callback, true)) + DRM_ERROR("amdgpu: fail to register dmub hpd callback"); + } + list_for_each_entry(connector, &dev->mode_config.connector_list, head) { =20 @@ -3575,10 +3574,6 @@ static void register_hpd_handlers(struct amdgpu_devi= ce *adev) handle_hpd_rx_irq, (void *) aconnector); } - - if (adev->dm.hpd_rx_offload_wq) - adev->dm.hpd_rx_offload_wq[connector->index].aconnector =3D - aconnector; } } =20 @@ -4590,6 +4585,10 @@ static int amdgpu_dm_initialize_drm_device(struct am= dgpu_device *adev) goto fail; } =20 + if (dm->hpd_rx_offload_wq) + dm->hpd_rx_offload_wq[aconnector->base.index].aconnector =3D + aconnector; + if (!dc_link_detect_connection_type(link, &new_connection_type)) DRM_ERROR("KMS: Failed to detect connector\n"); =20 --=20 2.43.0