From: Jani Nikula <jani.nikula@linux.intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Vivi@freedesktop.org,
Alan Previn <alan.previn.teres.alexis@intel.com>,
dri-devel@lists.freedesktop.org, Rodrigo <rodrigo.vivi@intel.com>
Subject: Re: [Intel-gfx] [PATCH 1/1] drm/i915/gsc: Fix the Driver-FLR completion
Date: Fri, 20 Jan 2023 11:14:46 +0200 [thread overview]
Message-ID: <873585a7p5.fsf@intel.com> (raw)
In-Reply-To: <20230119194955.2426167-1-alan.previn.teres.alexis@intel.com>
On Thu, 19 Jan 2023, Alan Previn <alan.previn.teres.alexis@intel.com> wrote:
> The Driver-FLR flow may inadvertently exit early before the full
> completion of the re-init of the internal HW state if we only poll
> GU_DEBUG Bit31 (polling for it to toggle from 0 -> 1). Instead
> we need a two-step completion wait-for-completion flow that also
> involves GU_CNTL. See the patch and new code comments for detail.
> This is new direction from HW architecture folks.
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> Fixes: 5a44fcd73498 ("drm/i915/gsc: Do a driver-FLR on unload if GSC was loaded")
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 8dee9e62a73e..959869e2ff05 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2748,6 +2748,12 @@ static void driver_initiated_flr(struct intel_uncore *uncore)
> /* Trigger the actual Driver-FLR */
> intel_uncore_rmw_fw(uncore, GU_CNTL, 0, DRIVERFLR);
>
> + /* Completion Step 1 - poll for 'CNTL-BIT31 = 0' wait for hw teardown to complete */
Please don't use comments to repeat what the code already says.
Here, you could just say, "Wait for hardware teardown to complete",
which describes what the code does at a higher level, but does not
duplicate any of it.
> + ret = intel_wait_for_register_fw(uncore, GU_CNTL,
> + DRIVERFLR_STATUS, 0,
> + flr_timeout_ms);
> +
> + /* Completion: Step 2 - poll for 'DEBUG-BIT31 = 1' for hw/fw re-init to complete */
"Wait for hardware/firmware re-init to complete"
> ret = intel_wait_for_register_fw(uncore, GU_DEBUG,
> DRIVERFLR_STATUS, DRIVERFLR_STATUS,
> flr_timeout_ms);
> @@ -2756,6 +2762,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)
> return;
> }
>
> + /* Write 1 to clear GU_DEBUG's sticky completion status bit */
"Clear sticky completion status" maybe?
> intel_uncore_write_fw(uncore, GU_DEBUG, DRIVERFLR_STATUS);
> }
>
>
> base-commit: 0a0ee61784df01ac098a92bd43673ee30c629f13
--
Jani Nikula, Intel Open Source Graphics Center
WARNING: multiple messages have this Message-ID (diff)
From: Jani Nikula <jani.nikula@linux.intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: Vivi@freedesktop.org,
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
Alan Previn <alan.previn.teres.alexis@intel.com>,
dri-devel@lists.freedesktop.org, Rodrigo <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 1/1] drm/i915/gsc: Fix the Driver-FLR completion
Date: Fri, 20 Jan 2023 11:14:46 +0200 [thread overview]
Message-ID: <873585a7p5.fsf@intel.com> (raw)
In-Reply-To: <20230119194955.2426167-1-alan.previn.teres.alexis@intel.com>
On Thu, 19 Jan 2023, Alan Previn <alan.previn.teres.alexis@intel.com> wrote:
> The Driver-FLR flow may inadvertently exit early before the full
> completion of the re-init of the internal HW state if we only poll
> GU_DEBUG Bit31 (polling for it to toggle from 0 -> 1). Instead
> we need a two-step completion wait-for-completion flow that also
> involves GU_CNTL. See the patch and new code comments for detail.
> This is new direction from HW architecture folks.
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>
> Fixes: 5a44fcd73498 ("drm/i915/gsc: Do a driver-FLR on unload if GSC was loaded")
> ---
> drivers/gpu/drm/i915/intel_uncore.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 8dee9e62a73e..959869e2ff05 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -2748,6 +2748,12 @@ static void driver_initiated_flr(struct intel_uncore *uncore)
> /* Trigger the actual Driver-FLR */
> intel_uncore_rmw_fw(uncore, GU_CNTL, 0, DRIVERFLR);
>
> + /* Completion Step 1 - poll for 'CNTL-BIT31 = 0' wait for hw teardown to complete */
Please don't use comments to repeat what the code already says.
Here, you could just say, "Wait for hardware teardown to complete",
which describes what the code does at a higher level, but does not
duplicate any of it.
> + ret = intel_wait_for_register_fw(uncore, GU_CNTL,
> + DRIVERFLR_STATUS, 0,
> + flr_timeout_ms);
> +
> + /* Completion: Step 2 - poll for 'DEBUG-BIT31 = 1' for hw/fw re-init to complete */
"Wait for hardware/firmware re-init to complete"
> ret = intel_wait_for_register_fw(uncore, GU_DEBUG,
> DRIVERFLR_STATUS, DRIVERFLR_STATUS,
> flr_timeout_ms);
> @@ -2756,6 +2762,7 @@ static void driver_initiated_flr(struct intel_uncore *uncore)
> return;
> }
>
> + /* Write 1 to clear GU_DEBUG's sticky completion status bit */
"Clear sticky completion status" maybe?
> intel_uncore_write_fw(uncore, GU_DEBUG, DRIVERFLR_STATUS);
> }
>
>
> base-commit: 0a0ee61784df01ac098a92bd43673ee30c629f13
--
Jani Nikula, Intel Open Source Graphics Center
next prev parent reply other threads:[~2023-01-20 9:15 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 19:49 [Intel-gfx] [PATCH 1/1] drm/i915/gsc: Fix the Driver-FLR completion Alan Previn
2023-01-19 19:49 ` Alan Previn
2023-01-19 19:57 ` [Intel-gfx] " Rodrigo Vivi
2023-01-19 19:57 ` Rodrigo Vivi
2023-01-19 21:34 ` [Intel-gfx] " Teres Alexis, Alan Previn
2023-01-19 21:34 ` Teres Alexis, Alan Previn
2023-01-19 20:37 ` [Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/1] " Patchwork
2023-01-20 8:27 ` [Intel-gfx] [PATCH 1/1] " Gupta, Anshuman
2023-01-20 8:27 ` Gupta, Anshuman
2023-01-20 16:41 ` Teres Alexis, Alan Previn
2023-01-20 9:14 ` Jani Nikula [this message]
2023-01-20 9:14 ` Jani Nikula
2023-01-20 16:42 ` [Intel-gfx] " Teres Alexis, Alan Previn
2023-01-20 16:42 ` Teres Alexis, Alan Previn
2023-01-20 22:18 ` [Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/1] " 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=873585a7p5.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=Vivi@freedesktop.org \
--cc=alan.previn.teres.alexis@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@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.