* [PATCH] drm/i915/guc/slpc: Check GuC status before freq boost
@ 2021-11-12 7:10 Vinay Belgaumkar
2021-11-12 16:05 ` Dixit, Ashutosh
0 siblings, 1 reply; 2+ messages in thread
From: Vinay Belgaumkar @ 2021-11-12 7:10 UTC (permalink / raw)
To: intel-gfx, dri-devel; +Cc: Ashutosh Dixit, Vinay Belgaumkar
It's possible that i915 might get wedged between a boost
and un-boost. Validate the i915-GuC connection before trying
to send a H2G to change the min frequency.
Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/4464
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
---
drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
index 4e1d3cd29164..22c1c12369f2 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
@@ -183,11 +183,15 @@ static int slpc_unset_param(struct intel_guc_slpc *slpc,
static int slpc_force_min_freq(struct intel_guc_slpc *slpc, u32 freq)
{
struct drm_i915_private *i915 = slpc_to_i915(slpc);
+ struct intel_guc *guc = slpc_to_guc(slpc);
intel_wakeref_t wakeref;
int ret = 0;
lockdep_assert_held(&slpc->lock);
+ if (!intel_guc_is_ready(guc))
+ return -ENODEV;
+
/*
* This function is a little different as compared to
* intel_guc_slpc_set_min_freq(). Softlimit will not be updated
--
2.25.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915/guc/slpc: Check GuC status before freq boost
2021-11-12 7:10 [PATCH] drm/i915/guc/slpc: Check GuC status before freq boost Vinay Belgaumkar
@ 2021-11-12 16:05 ` Dixit, Ashutosh
0 siblings, 0 replies; 2+ messages in thread
From: Dixit, Ashutosh @ 2021-11-12 16:05 UTC (permalink / raw)
To: Vinay Belgaumkar; +Cc: intel-gfx, dri-devel
On Thu, 11 Nov 2021 23:10:16 -0800, Vinay Belgaumkar wrote:
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> index 4e1d3cd29164..22c1c12369f2 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_slpc.c
> @@ -183,11 +183,15 @@ static int slpc_unset_param(struct intel_guc_slpc *slpc,
> static int slpc_force_min_freq(struct intel_guc_slpc *slpc, u32 freq)
> {
> struct drm_i915_private *i915 = slpc_to_i915(slpc);
> + struct intel_guc *guc = slpc_to_guc(slpc);
> intel_wakeref_t wakeref;
> int ret = 0;
>
> lockdep_assert_held(&slpc->lock);
>
> + if (!intel_guc_is_ready(guc))
> + return -ENODEV;
> +
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
The test wedges/resets the GPU after a request is queued but before it is
retired.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-12 16:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-12 7:10 [PATCH] drm/i915/guc/slpc: Check GuC status before freq boost Vinay Belgaumkar
2021-11-12 16:05 ` Dixit, Ashutosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox