FAILED: patch "[PATCH] drm/i915/display: Add enabled pipe planes into state for selective fetch" failed to apply to 6.12-stable tree
Sasha Levin
maintainerThe patch below does not apply to the 6.12-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-6.12.y
git checkout FETCH_HEAD
git cherry-pick -x 94cb1f08b197d9ae932ff98c741bd0dbc96e17e8
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '[email protected]' --subject-prefix 'PATCH 6.12.y' 'HEAD^..'
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 94cb1f08b197d9ae932ff98c741bd0dbc96e17e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jouni=20H=C3=B6gander?= <[email protected]>
Date: Tue, 29 Sep 2026 12:44:28 +0300
Subject: [PATCH] drm/i915/display: Add enabled pipe planes into state for
selective fetch
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Selective fetch support for biplanar formats relies on linking of UV and the Y planes. Planes that are not part of the atomic state are pulled in by the drm_atomic_add_affected_planes. If the UV plane is added into the state by drm_atomic_add_affected_planes in the selective fetch calculation, the linking isn't done anymore and the Y plane is left disabled.
Fix this by adding affected planes already in intel_add_affected_planes if selective fetch is enabled.
Remove redundant drm_atomic_add_affected_planes from intel_psr2_sel_fetch_update and redundant check for plane selective fetch support that is not needed as all planes are already in atomic state on first loop iterating them. Also switch to intel_atomic_get_new_plane_state for linked plane new plane state.
--- drivers/gpu/drm/i915/display/intel_plane.c | 10 +++++++++ drivers/gpu/drm/i915/display/intel_psr.c | 25 +++++++--------------- 2 files changed, 18 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/display/intel_plane.c +10 -0
@@ -1980,6 +1980,16 @@ static int intel_add_affected_planes(struct intel_atomic_state *state) ret =intel_joiner_add_affected_planes (state,intel_crtc_joined_pipe_mask (crtc_state));if (ret)return ret; + +/* +* Add affected plane here to ensure UV and Y plane linking is +* in place if UV plane is added as a part of selective update. +*/ +if (crtc_state->enable_psr2_sel_fetch) { + ret =intel_plane_add_affected (state, crtc); +if (ret) +return ret; + } }return 0 ;
drivers/gpu/drm/i915/display/intel_psr.c +8 -17
@@ -2905,7 +2905,7 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state, .y2 = crtc_state->hw.adjusted_mode.crtc_vdisplay, };bool full_update = false, su_area_changed; -int i, ret; +int i;/* * Selective fetch is not always usable, for instance it is dropped
@@ -3020,19 +3020,15 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,intel_psr_apply_su_area_workarounds (crtc_state); - ret =drm_atomic_add_affected_planes (&state->base, &crtc->base); -if (ret) -return ret; - do { bool cursor_in_su_area = false; /* * Adjust su area to cover cursor fully as necessary - * (early transport). This needs to be done after - * drm_atomic_add_affected_planes to ensure visible - * cursor is added into affected planes even when - * cursor is not updated by itself. + * (early transport). A visible cursor is in the state + * even when it is not updated by itself as all planes + * of the pipe are added into the state before the plane + * checks when selective fetch is enabled. */ intel_psr2_sel_fetch_et_alignment(state, crtc, &display_area, &cursor_in_su_area);
@@ -3083,11 +3079,6 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,continue ; } -if (!psr2_sel_fetch_plane_state_supported (new_plane_state)) { - full_update = true; -break ; - } - sel_fetch_area = &new_plane_state->psr2_sel_fetch_area; sel_fetch_area->y1 = inter.y1 - new_plane_state->uapi.dst.y1; sel_fetch_area->y2 = inter.y2 - new_plane_state->uapi.dst.y1;
@@ -3101,9 +3092,9 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,struct intel_plane_state *linked_new_plane_state;struct drm_rect *linked_sel_fetch_area; - linked_new_plane_state =intel_atomic_get_plane_state (state, linked); -if (IS_ERR (linked_new_plane_state)) -return PTR_ERR (linked_new_plane_state); + linked_new_plane_state =intel_atomic_get_new_plane_state (state, linked); +if (!linked_new_plane_state) +return -EINVAL ; linked_sel_fetch_area = &linked_new_plane_state->psr2_sel_fetch_area; linked_sel_fetch_area->y1 = sel_fetch_area->y1;
Signature · 1 line
2.53.0
Sasha Levin
maintainerPATCH 1/1 drm/i915/display: Add enabled pipe planes into state for selective fetch
From: Jouni Högander <[email protected]>
[ Upstream commit 94cb1f08b197d9ae932ff98c741bd0dbc96e17e8 ]
Selective fetch support for biplanar formats relies on linking of UV and the Y planes. Planes that are not part of the atomic state are pulled in by the drm_atomic_add_affected_planes. If the UV plane is added into the state by drm_atomic_add_affected_planes in the selective fetch calculation, the linking isn't done anymore and the Y plane is left disabled.
Fix this by adding affected planes already in intel_add_affected_planes if selective fetch is enabled.
Remove redundant drm_atomic_add_affected_planes from intel_psr2_sel_fetch_update and redundant check for plane selective fetch support that is not needed as all planes are already in atomic state on first loop iterating them. Also switch to intel_atomic_get_new_plane_state for linked plane new plane state.
--- drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++++++ drivers/gpu/drm/i915/display/intel_psr.c | 25 +++++++------------- 2 files changed, 20 insertions(+), 17 deletions(-)
drivers/gpu/drm/i915/display/intel_display.c +12 -0
@@ -5879,6 +5879,18 @@ static int intel_atomic_check_planes(struct intel_atomic_state *state)struct intel_crtc *crtc;int i, ret; +for_each_new_intel_crtc_in_state (state, crtc, new_crtc_state, i) { +/* +* Add affected plane here to ensure UV and Y plane linking is +* in place if UV plane is added as a part of selective update. +*/ +if (new_crtc_state->enable_psr2_sel_fetch) { + ret =intel_atomic_add_affected_planes (state, crtc); +if (ret) +return ret; + } + } + ret =icl_add_linked_planes (state);if (ret)return ret;
drivers/gpu/drm/i915/display/intel_psr.c +8 -17
@@ -2561,7 +2561,7 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state, .y2 = crtc_state->hw.adjusted_mode.crtc_vdisplay, };bool full_update = false, su_area_changed; -int i, ret; +int i;/* * Selective fetch is not always usable, for instance it is dropped
@@ -2676,19 +2676,15 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,intel_psr_apply_su_area_workarounds (crtc_state); - ret =drm_atomic_add_affected_planes (&state->base, &crtc->base); -if (ret) -return ret; - do { bool cursor_in_su_area = false; /* * Adjust su area to cover cursor fully as necessary - * (early transport). This needs to be done after - * drm_atomic_add_affected_planes to ensure visible - * cursor is added into affected planes even when - * cursor is not updated by itself. + * (early transport). A visible cursor is in the state + * even when it is not updated by itself as all planes + * of the pipe are added into the state before the plane + * checks when selective fetch is enabled. */ intel_psr2_sel_fetch_et_alignment(state, crtc, &display_area, &cursor_in_su_area);
@@ -2736,11 +2732,6 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,continue ; } -if (!psr2_sel_fetch_plane_state_supported (new_plane_state)) { - full_update = true; -break ; - } - sel_fetch_area = &new_plane_state->psr2_sel_fetch_area; sel_fetch_area->y1 = inter.y1 - new_plane_state->uapi.dst.y1; sel_fetch_area->y2 = inter.y2 - new_plane_state->uapi.dst.y1;
@@ -2754,9 +2745,9 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,struct intel_plane_state *linked_new_plane_state;struct drm_rect *linked_sel_fetch_area; - linked_new_plane_state =intel_atomic_get_plane_state (state, linked); -if (IS_ERR (linked_new_plane_state)) -return PTR_ERR (linked_new_plane_state); + linked_new_plane_state =intel_atomic_get_new_plane_state (state, linked); +if (!linked_new_plane_state) +return -EINVAL ; linked_sel_fetch_area = &linked_new_plane_state->psr2_sel_fetch_area; linked_sel_fetch_area->y1 = sel_fetch_area->y1;
Signature · 1 line
2.53.0