public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Bommu Krishnaiah <krishnaiah.bommu@intel.com>,
	Chris Wilson <chris@chris-wilson.co.uk>
Subject: [Intel-gfx] [PATCH 4/4] Klock work Fix for uninitialized array intel_migrate.c
Date: Mon, 28 Jun 2021 20:08:29 +0530	[thread overview]
Message-ID: <20210628143829.22995-5-krishnaiah.bommu@intel.com> (raw)
In-Reply-To: <20210628143829.22995-1-krishnaiah.bommu@intel.com>

Signed-off-by: Bommu Krishnaiah <krishnaiah.bommu@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gt/intel_migrate.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_migrate.c b/drivers/gpu/drm/i915/gt/intel_migrate.c
index 23c59ce66cee5..5df7b8af6fdb9 100644
--- a/drivers/gpu/drm/i915/gt/intel_migrate.c
+++ b/drivers/gpu/drm/i915/gt/intel_migrate.c
@@ -208,11 +208,15 @@ static struct intel_context *__migrate_engines(struct intel_gt *gt)
 
 	count = 0;
 	for (i = 0; i < ARRAY_SIZE(gt->engine_class[COPY_ENGINE_CLASS]); i++) {
+
 		engine = gt->engine_class[COPY_ENGINE_CLASS][i];
 		if (engine_supports_migration(engine))
 			engines[count++] = engine;
 	}
 
+	if (count == 0)
+		return ERR_PTR(-ENXIO);
+
 	return intel_context_create(engines[random_index(count)]);
 }
 
-- 
2.25.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-06-28 14:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-28 14:38 [Intel-gfx] [PATCH 0/4] The Following Patches are to Fix the Critical KclockWork Errors in i915_gem and gt Bommu Krishnaiah
2021-06-28 14:38 ` [Intel-gfx] [PATCH 1/4] Klock work Fix for NULL dereferencing in i915_gem_ttm.c Bommu Krishnaiah
2021-06-29  9:26   ` Ramalingam C
2021-07-01  9:39   ` Matthew Auld
2021-07-01  9:49     ` Matthew Auld
2021-06-28 14:38 ` [Intel-gfx] [PATCH 2/4] Klock work Fix for NULL dereferencing in i915_gem_mman.c Bommu Krishnaiah
2021-06-29  9:23   ` Ramalingam C
2021-06-28 14:38 ` [Intel-gfx] [PATCH 3/4] Klock work Fix for possible memory leak in intel_execlists_submission.c Bommu Krishnaiah
2021-06-28 15:01   ` Tvrtko Ursulin
2021-06-28 14:38 ` Bommu Krishnaiah [this message]
2021-06-29  8:52   ` [Intel-gfx] [PATCH 4/4] Klock work Fix for uninitialized array intel_migrate.c Ramalingam C
2021-06-28 18:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for The Following Patches are to Fix the Critical KclockWork Errors in i915_gem and gt Patchwork
2021-06-28 18:37 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-06-28 19:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-06-28 22:46 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2021-06-29  8:14 ` [Intel-gfx] [PATCH 0/4] " Ramalingam C

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=20210628143829.22995-5-krishnaiah.bommu@intel.com \
    --to=krishnaiah.bommu@intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.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