diff mbox series

drm/i915/guc: skip scrub_ctbs selftest if reset is disabled

Message ID 20220708224158.929327-1-daniele.ceraolospurio@intel.com (mailing list archive)
State New, archived
Headers show
Series drm/i915/guc: skip scrub_ctbs selftest if reset is disabled | expand

Commit Message

Daniele Ceraolo Spurio July 8, 2022, 10:41 p.m. UTC
The test needs GT reset to trigger the scrubbing logic, so we can only
run it when reset is enabled.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <john.c.harrison@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
---
 drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

John Harrison Aug. 16, 2022, 10:50 p.m. UTC | #1
On 7/8/2022 15:41, Daniele Ceraolo Spurio wrote:
> The test needs GT reset to trigger the scrubbing logic, so we can only
> run it when reset is enabled.
>
> Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
> Cc: John Harrison <john.c.harrison@intel.com>
> Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>

> ---
>   drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
> index 1df71d0796ae..5bd804f29b32 100644
> --- a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
> @@ -54,6 +54,9 @@ static int intel_guc_scrub_ctbs(void *arg)
>   	struct intel_engine_cs *engine;
>   	struct intel_context *ce;
>   
> +	if (!intel_has_gpu_reset(gt))
> +		return 0;
> +
>   	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
>   	engine = intel_selftest_find_any_engine(gt);
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
index 1df71d0796ae..5bd804f29b32 100644
--- a/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
+++ b/drivers/gpu/drm/i915/gt/uc/selftest_guc.c
@@ -54,6 +54,9 @@  static int intel_guc_scrub_ctbs(void *arg)
 	struct intel_engine_cs *engine;
 	struct intel_context *ce;
 
+	if (!intel_has_gpu_reset(gt))
+		return 0;
+
 	wakeref = intel_runtime_pm_get(gt->uncore->rpm);
 	engine = intel_selftest_find_any_engine(gt);