FAILED: patch "[PATCH] drm/i915/hdcp: fix connector refcounting" failed to apply to 5.10-stable tree
[email protected]
maintainerThe patch below does not apply to the 5.10-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 <[email protected]>.
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.10.y
git checkout FETCH_HEAD
git cherry-pick -x 4cc2718f621a6a57a02581125bb6d914ce74d23b
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2024101406-gallows-construct-02e9@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^..
Possible dependencies:
4cc2718f621a ("drm/i915/hdcp: fix connector refcounting")848a4e5c096d ("drm/i915: add a dedicated workqueue inside drm_i915_private")f48eab290287 ("drm/i915/dp: Add link training debug and error printing helpers") f60500f31e99 ("drm/i915/display/dp: 128/132b LT requirement")40053823baad ("drm/i915/display: move modeset probe/remove functions to intel_display_driver.c") 15e4f0b541d4 ("drm/i915/display: rename intel_modeset_probe_defer() -> intel_display_driver_probe_defer()") ff2c80be1a00 ("drm/i915/display: move intel_modeset_probe_defer() to intel_display_driver.[ch]") 77316e755213 ("drm/i915/display: start high level display driver file")99cfbed19d06 ("drm/i915/vrr: Relocate VRR enable/disable")ecaeecea9263 ("drm/i915/vrr: Tell intel_crtc_update_active_timings() about VRR explicitly") fa9e4fce52ec ("drm/i915/vrr: Make delayed vblank operational in VRR mode on adl/dg2") b25e07419fee ("drm/i915/vrr: Eliminate redundant function arguments")6a9856075563 ("drm/i915: Generalize planes_{enabling,disabling}()")c5de248484af ("drm/i915/dpt: Add a modparam to disable DPT via the chicken bit") 5a08585d38d6 ("drm/i915: Add PLANE_CHICKEN registers")1a324a40b452 ("i915/display/dp: SDP CRC16 for 128b132b link layer")b5202a93cd37 ("drm/i915: Extract intel_crtc_scanline_offset()")84f4ebe8c1ab ("drm/i915: Relocate intel_crtc_update_active_timings()")6e8acb6686d8 ("drm/i915: Add belts and suspenders locking for seamless M/N changes") 8cb1f95cca68 ("drm/i915: Update vblank timestamping stuff on seamless M/N change")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 4cc2718f621a6a57a02581125bb6d914ce74d23b Mon Sep 17 00:00:00 2001
From: Jani Nikula <[email protected]>
Date: Tue, 24 Sep 2024 18:30:22 +0300
Subject: [PATCH] drm/i915/hdcp: fix connector refcounting
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
We acquire a connector reference before scheduling an HDCP prop work, and expect the work function to release the reference.
However, if the work was already queued, it won't be queued multiple times, and the reference is not dropped.
Release the reference immediately if the work was already queued.
drivers/gpu/drm/i915/display/intel_hdcp.c +7 -3
@@ -1094,7 +1094,8 @@ static void intel_hdcp_update_value(struct intel_connector *connector, hdcp->value = value;if (update_property) {drm_connector_get (&connector->base); -queue_work (i915->unordered_wq, &hdcp->prop_work); +if (!queue_work (i915->unordered_wq, &hdcp->prop_work)) +drm_connector_put (&connector->base); } }
@@ -2524,7 +2525,8 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,mutex_lock (&hdcp->mutex); hdcp->value =DRM_MODE_CONTENT_PROTECTION_DESIRED ;drm_connector_get (&connector->base); -queue_work (i915->unordered_wq, &hdcp->prop_work); +if (!queue_work (i915->unordered_wq, &hdcp->prop_work)) +drm_connector_put (&connector->base);mutex_unlock (&hdcp->mutex); }
@@ -2541,7 +2543,9 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,*/ if (!desired_and_not_enabled && !content_protection_type_changed) {drm_connector_get (&connector->base); -queue_work (i915->unordered_wq, &hdcp->prop_work); +if (!queue_work (i915->unordered_wq, &hdcp->prop_work)) +drm_connector_put (&connector->base); + } }