Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Gustavo Sousa <gustavo.sousa@intel.com>
To: "Kandpal, Suraj" <suraj.kandpal@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>
Cc: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"Kahola, Mika" <mika.kahola@intel.com>,
	Jani Nikula <jani.nikula@intel.com>
Subject: RE: [PATCH 3/3] drm/i915/cx0: Clear response ready & error bit
Date: Mon, 5 Jan 2026 12:14:19 -0300	[thread overview]
Message-ID: <176762605914.9480.7739153319106853404@intel.com> (raw)
In-Reply-To: <DM3PPF208195D8D0C2024AF07117D5F35F6E3BDA@DM3PPF208195D8D.namprd11.prod.outlook.com>

Quoting Kandpal, Suraj (2025-12-31 01:59:29-03:00)
>> Subject: Re: [PATCH 3/3] drm/i915/cx0: Clear response ready & error bit
>> 
>> Quoting Suraj Kandpal (2025-12-30 05:31:42-03:00)
>> >Clear the response ready and error bit of PORT_P2M_MESSAGE_BUS_STATUS
>> >before writing the transaction pending bit of PORT_M2P_MSGBUS_CTL as
>> >that is a hard requirement. If not done we find that the PHY hangs
>> >since it ends up in a weird state if left idle for more than 1 hour.
>> 
>> Since the series title refers to suspend/resume, is there an easy way of
>> reproducing this via some power state transition?
>
>Sadly no we did try to no avail went as low as DC9 too. Tried sleep then wake,
>Tried hibernating too.

I see.  I was wondering if DMC could be at play here.

So the only known way of reproducing this is to leave it idle for more
than 1 hour?  Do you know if that happens if we load the driver with
DC5/6 disabled (i.e. enable_dc=0)?

>
>> 
>> I'm wondering if we are looking at a driver issue here or if this is really
>> something else.  I see that we usually call intel_cx0_bus_reset() in error paths,
>> which contains a call to intel_clear_response_ready_flag(), but it could end up
>> being not called if the reset times out.
>
>Yes the reset times out and this is because PHY is in hanged state here
>
>> 
>> Do we see error messages from the driver when the PHY hangs?
>
>Yes we do see a PHY hang when we are at the stage of swing programming setting
>And the error happens when we try to read the msg access bit itself which is because the PHY ends up in
>Weird state where it has a write ack but no response ready bit getting set.
>But with my observation I can certainly say this is PHY issue.
>I also double confirmed this behavior with windows folks and their code where they said they saw an issue in the same lines.
>Also the bspec basically adds this as a disclaimer that response ready and error bit should be cleared no matter what before writing
>The transaction pending bit.

Agreed on the need to clear the response ready bit before starting
another transaction, so the patch looks fine.  I believe Jani's
request to rename the function wouldn't necessarily change the semantics
of this patch, so

Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>

in case the rename gets done as a follow-up.

>
>Regards,
>Suraj Kandpal
>
>> 
>> --
>> Gustavo Sousa
>> 
>> >
>> >Bspec: 65101
>> >Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
>> >---
>> > drivers/gpu/drm/i915/display/intel_cx0_phy.c | 4 ++++
>> > 1 file changed, 4 insertions(+)
>> >
>> >diff --git a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
>> >b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
>> >index 5edd293b533b..5ebc3404eee2 100644
>> >--- a/drivers/gpu/drm/i915/display/intel_cx0_phy.c
>> >+++ b/drivers/gpu/drm/i915/display/intel_cx0_phy.c
>> >@@ -222,6 +222,8 @@ static int __intel_cx0_read_once(struct intel_encoder
>> *encoder,
>> >                 return -ETIMEDOUT;
>> >         }
>> >
>> >+        intel_clear_response_ready_flag(encoder, lane);
>> >+
>> >         intel_de_write(display, XELPDP_PORT_M2P_MSGBUS_CTL(display, port,
>> lane),
>> >                        XELPDP_PORT_M2P_TRANSACTION_PENDING |
>> >                        XELPDP_PORT_M2P_COMMAND_READ | @@ -293,6 +295,8
>> >@@ static int __intel_cx0_write_once(struct intel_encoder *encoder,
>> >                 return -ETIMEDOUT;
>> >         }
>> >
>> >+        intel_clear_response_ready_flag(encoder, lane);
>> >+
>> >         intel_de_write(display, XELPDP_PORT_M2P_MSGBUS_CTL(display, port,
>> lane),
>> >                        XELPDP_PORT_M2P_TRANSACTION_PENDING |
>> >                        (committed ?
>> XELPDP_PORT_M2P_COMMAND_WRITE_COMMITTED :
>> >--
>> >2.34.1
>> >

  reply	other threads:[~2026-01-05 15:14 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-30  8:31 [PATCH 0/3] Fix Cx0 Suspend Resume issue Suraj Kandpal
2025-12-30  8:31 ` [PATCH 1/3] drm/i915/cx0: Split PLL enabling/disabling in two parts Suraj Kandpal
2025-12-30 15:20   ` Gustavo Sousa
2025-12-31  5:07     ` Kandpal, Suraj
2026-01-05 14:13       ` Gustavo Sousa
2026-01-06  6:19         ` Kandpal, Suraj
2026-01-08  8:51         ` Kahola, Mika
2025-12-30 21:23   ` kernel test robot
2026-01-07 15:22   ` Michał Grzelak
2025-12-30  8:31 ` [PATCH 2/3] drm/i915/cx0: Move step 12 to enable clock hook Suraj Kandpal
2025-12-30 15:22   ` Gustavo Sousa
2025-12-31  5:10     ` Kandpal, Suraj
2026-01-05 14:37       ` Gustavo Sousa
2026-01-06  6:18         ` Kandpal, Suraj
2025-12-30  8:31 ` [PATCH 3/3] drm/i915/cx0: Clear response ready & error bit Suraj Kandpal
2025-12-30 15:29   ` Jani Nikula
2025-12-30 17:36   ` Gustavo Sousa
2025-12-31  4:59     ` Kandpal, Suraj
2026-01-05 15:14       ` Gustavo Sousa [this message]
2026-01-06  6:21         ` Kandpal, Suraj
2025-12-30  8:38 ` ✓ CI.KUnit: success for Fix Cx0 Suspend Resume issue 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=176762605914.9480.7739153319106853404@intel.com \
    --to=gustavo.sousa@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=mika.kahola@intel.com \
    --cc=suraj.kandpal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox