All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@linux.intel.com>
To: "Garg, Nemesa" <nemesa.garg@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Subject: RE: [PATCH] drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable
Date: Wed, 12 Aug 2026 14:05:39 +0300	[thread overview]
Message-ID: <4ce02b124a6d5cf02e2d6522bd40e9c4f5ed8472@intel.com> (raw)
In-Reply-To: <MW4PR11MB688720289D3B3CD86834A345E3DC2@MW4PR11MB6887.namprd11.prod.outlook.com>

On Wed, 12 Aug 2026, "Garg, Nemesa" <nemesa.garg@intel.com> wrote:
>> -----Original Message-----
>> From: Jani Nikula <jani.nikula@linux.intel.com>
>> Sent: Wednesday, August 12, 2026 3:47 PM
>> To: Garg, Nemesa <nemesa.garg@intel.com>; intel-gfx@lists.freedesktop.org;
>> intel-xe@lists.freedesktop.org
>> Cc: Garg, Nemesa <nemesa.garg@intel.com>
>> Subject: Re: [PATCH] drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane
>> disable
>> 
>> On Wed, 12 Aug 2026, Nemesa Garg <nemesa.garg@intel.com> wrote:
>> > icl_plane_disable_sel_fetch_arm() wrote SEL_FETCH_PLANE_CTL = 0 only
>> > when crtc_state->enable_psr2_sel_fetch was set.  If a plane was
>> > disabled after selective fetch had been turned off, the guard fired
>> > early and left the register's enable bit set in hardware.
>> 
>> Why doesn't the selective fetch disable change the bit?
>> 
> During disable path icl_plane_disable_sel_fetch_arm is called and here we have a condition :
> if (!crtc_state->enable_psr2_sel_fetch)
>                 return;
> 		
> So if the plane is disabled after selective fetch has already been turned off, this returns early and the enable bit is left set in hardware.
>
> Turning selective fetch back on does not repair it: icl_plane_update_sel_fetch_arm() only runs for planes that are in the update mask and visible. A plane disabled during the off window is neither, so its stale bit is never rewritten, it just becomes live again.
>
> From logs: plane 1A after being disabled:
>  plane 1 ddb (0 - 0) CTL=0x00000000 SURF=0x00000000 SURFLIVE=0x00000000
>                       SEL_FETCH_PLANE_CTL=0x80000000

None of that answers my question.

Where does crtc_state->enable_psr2_sel_fetch get set to false without
disabling the bit in hardware? Why? What's the scenario that actually
leads us to the case at hand?


BR,
Jani.


>
> Thanks and Regards,
> Nemesa
>
>> > The bit is harmless until selective fetch is re-enabled.  When it is,
>> > the hardware resumes fetching for the now-disabled plane and keeps its
>> > old DDB range reserved.
>> >
>> > Fixes: b1f5279b5981 ("drm/i915/psr: Move plane sel fetch configuration
>> > into plane source files")
>> > Closes:https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8739
>> 
>> Missing space after :.
>> 
>> > Assisted-by: GitHub-Copilot:claude-opus-4.6
>> > Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
>> > ---
>> >  drivers/gpu/drm/i915/display/skl_universal_plane.c | 8 +++++++-
>> >  1 file changed, 7 insertions(+), 1 deletion(-)
>> >
>> > diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> > b/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> > index 07a683293352..afc1df1b84a4 100644
>> > --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> > +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
>> > @@ -885,7 +885,13 @@ static void icl_plane_disable_sel_fetch_arm(struct
>> intel_dsb *dsb,
>> >  	struct intel_display *display = to_intel_display(plane);
>> >  	enum pipe pipe = plane->pipe;
>> >
>> > -	if (!crtc_state->enable_psr2_sel_fetch)
>> > +	/*
>> > +	 * Clear this whenever the hardware has selective fetch, not just when
>> > +	 * the current state uses it. The plane may have been enabled with
>> > +	 * selective fetch earlier and had its enable bit orphaned when the
>> > +	 * feature was switched off.
>> > +	 */
>> > +	if (!HAS_PSR2_SEL_FETCH(display))
>> >  		return;
>> >
>> >  	intel_de_write_dsb(display, dsb, SEL_FETCH_PLANE_CTL(pipe,
>> > plane->id), 0);
>> 
>> --
>> Jani Nikula, Intel

-- 
Jani Nikula, Intel

  reply	other threads:[~2026-08-12 11:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12  9:45 [PATCH] drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable Nemesa Garg
2026-08-12 10:07 ` ✓ CI.KUnit: success for " Patchwork
2026-08-12 10:15 ` [PATCH] " sashiko-bot
2026-08-12 10:17 ` Jani Nikula
2026-08-12 10:42   ` Garg, Nemesa
2026-08-12 11:05     ` Jani Nikula [this message]
2026-08-12 10:46 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-08-12 11:56 ` ✓ Xe.CI.FULL: " Patchwork
2026-08-12 12:30 ` ✗ i915.CI.BAT: failure " Patchwork

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=4ce02b124a6d5cf02e2d6522bd40e9c4f5ed8472@intel.com \
    --to=jani.nikula@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=nemesa.garg@intel.com \
    /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.