From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
"Nikula, Jani" <jani.nikula@intel.com>,
"intel-gfx@lists.freedesktop.org"
<intel-gfx@lists.freedesktop.org>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] drm/i915/psr: fix pipe to vblank conversion
Date: Fri, 7 Nov 2025 07:03:19 +0000 [thread overview]
Message-ID: <df54e434d95553c02fe9e7a8607cbc25652ef107.camel@intel.com> (raw)
In-Reply-To: <20251106200000.1455164-1-jani.nikula@intel.com>
On Thu, 2025-11-06 at 22:00 +0200, Jani Nikula wrote:
> First, we can't assume pipe == crtc index. If a pipe is fused off in
> between, it no longer holds. intel_crtc_for_pipe() is the only proper
> way to get from a pipe to the corresponding crtc.
>
> Second, drivers aren't supposed to access or index drm->vblank[]
> directly. There's drm_crtc_vblank_crtc() for this.
>
> Use both functions to fix the pipe to vblank conversion.
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
>
> Fixes: f02658c46cf7 ("drm/i915/psr: Add mechanism to notify PSR of
> pipe enable/disable")
> Cc: Jouni Högander <jouni.hogander@intel.com>
> Cc: <stable@vger.kernel.org> # v6.16+
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_psr.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index 05014ffe3ce1..c77a92ea7919 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -932,7 +932,8 @@ static bool is_dc5_dc6_blocked(struct intel_dp
> *intel_dp)
> {
> struct intel_display *display = to_intel_display(intel_dp);
> u32 current_dc_state =
> intel_display_power_get_current_dc_state(display);
> - struct drm_vblank_crtc *vblank = &display->drm-
> >vblank[intel_dp->psr.pipe];
> + struct intel_crtc *crtc = intel_crtc_for_pipe(display,
> intel_dp->psr.pipe);
> + struct drm_vblank_crtc *vblank = drm_crtc_vblank_crtc(&crtc-
> >base);
>
> return (current_dc_state != DC_STATE_EN_UPTO_DC5 &&
> current_dc_state != DC_STATE_EN_UPTO_DC6) ||
next prev parent reply other threads:[~2025-11-07 7:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-06 20:00 [PATCH] drm/i915/psr: fix pipe to vblank conversion Jani Nikula
2025-11-06 21:24 ` ✓ i915.CI.BAT: success for " Patchwork
2025-11-07 7:03 ` Hogander, Jouni [this message]
2025-11-10 11:21 ` [PATCH] " Jani Nikula
2025-11-07 15:14 ` ✗ i915.CI.Full: failure for " 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=df54e434d95553c02fe9e7a8607cbc25652ef107.camel@intel.com \
--to=jouni.hogander@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox