From mboxrd@z Thu Jan 1 00:00:00 1970 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 42A341B0F00 for ; Mon, 10 Feb 2025 13:14:28 +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=1739193269; cv=none; b=B/udfV5FOE/E8rcjTdzrqxbQPm6sHdBlIFGi3xQONoRgMw17cAYY/V4fL5SVsBq6Fdoaa22KQOXzlgyHE0LtUaOf7pi2MA8qNoZkgmgv2Yy5ibFlyLXFCsSINAZwL4PtCCwyLC4Ol959MIrn2bKv2hNu0cDjBPKNna9x/aRi3nk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1739193269; c=relaxed/simple; bh=bgT+Gd/q8Momi8k7KPXt3Nb4JCQInn9bzUDYBTD9GIQ=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=Il5nREanhlu70FfmGsVv5y0GN4mOHt3J6dStbGG/6teCKN7cn8rKJmwKKB0rv9K2IA8QDD81BuoUzUUfh9KPmrUOU79T/UqjG3gKn9wPaYZc/MND8dJgHe8dfuESdpw1hYKhjxePNq2ZU9CBEWIHz1wHC7dlvX1t16xcJluOEno= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=gk834ii7; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="gk834ii7" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 385A0C4CED1; Mon, 10 Feb 2025 13:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1739193268; bh=bgT+Gd/q8Momi8k7KPXt3Nb4JCQInn9bzUDYBTD9GIQ=; h=Subject:To:Cc:From:Date:From; b=gk834ii7b5e11yY6dS4Ry4rOYrCbpH9vp8ryBB/6TPYH8pqKGSb+rWXGpD823raLF Pa7fBKgdmiO2DpvfMIg1w591o2VfaBiDwXyciQp9jMXUKS4Mhe2QM37zX3MnXPMDFs a+SYVT7LFpfY65Peyvp5A7FE/ORFJXu6I5b7Hl20= Subject: FAILED: patch "[PATCH] drm/rockchip: cdn-dp: Use" failed to apply to 5.15-stable tree To: tzimmermann@suse.de,andy.yan@rock-chips.com,groeck@chromium.org,heiko@sntech.de,hjc@rock-chips.com,stable@vger.kernel.org,zyw@rock-chips.com Cc: From: Date: Mon, 10 Feb 2025 14:14:25 +0100 Message-ID: <2025021025-abdomen-glass-2533@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.15-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 . 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-5.15.y git checkout FETCH_HEAD git cherry-pick -x 666e1960464140cc4bc9203c203097e70b54c95a # git commit -s git send-email --to '' --in-reply-to '2025021025-abdomen-glass-2533@gregkh' --subject-prefix 'PATCH 5.15.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 666e1960464140cc4bc9203c203097e70b54c95a Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Tue, 5 Nov 2024 14:38:16 +0100 Subject: [PATCH] drm/rockchip: cdn-dp: Use drm_connector_helper_hpd_irq_event() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The code for detecting and updating the connector status in cdn_dp_pd_event_work() has a number of problems. - It does not aquire the locks to call the detect helper and update the connector status. These are struct drm_mode_config.connection_mutex and struct drm_mode_config.mutex. - It does not use drm_helper_probe_detect(), which helps with the details of locking and detection. - It uses the connector's status field to determine a change to the connector status. The epoch_counter field is the correct one. The field signals a change even if the connector status' value did not change. Replace the code with a call to drm_connector_helper_hpd_irq_event(), which fixes all these problems. Signed-off-by: Thomas Zimmermann Fixes: 81632df69772 ("drm/rockchip: cdn-dp: do not use drm_helper_hpd_irq_event") Cc: Chris Zhong Cc: Guenter Roeck Cc: Sandy Huang Cc: "Heiko Stübner" Cc: Andy Yan Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-rockchip@lists.infradead.org Cc: # v4.11+ Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20241105133848.480407-1-tzimmermann@suse.de diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c index b04538907f95..f576b1aa86d1 100644 --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c @@ -947,9 +947,6 @@ static void cdn_dp_pd_event_work(struct work_struct *work) { struct cdn_dp_device *dp = container_of(work, struct cdn_dp_device, event_work); - struct drm_connector *connector = &dp->connector; - enum drm_connector_status old_status; - int ret; mutex_lock(&dp->lock); @@ -1009,11 +1006,7 @@ static void cdn_dp_pd_event_work(struct work_struct *work) out: mutex_unlock(&dp->lock); - - old_status = connector->status; - connector->status = connector->funcs->detect(connector, false); - if (old_status != connector->status) - drm_kms_helper_hotplug_event(dp->drm_dev); + drm_connector_helper_hpd_irq_event(&dp->connector); } static int cdn_dp_pd_event(struct notifier_block *nb,