All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jakub Bartmiński" <jakub.bartminski@intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH v7 5/6] drm/i915: Add a fault injection point to WOPCM init
Date: Fri, 27 Jul 2018 14:08:55 +0200	[thread overview]
Message-ID: <20180727120856.20485-5-jakub.bartminski@intel.com> (raw)
In-Reply-To: <20180727120856.20485-1-jakub.bartminski@intel.com>

Add a fault injection point in the WOPCM initialization path.

v4:
Move the injection inside the WOPCM init function.

Signed-off-by: Jakub Bartmiński <jakub.bartminski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/i915/intel_wopcm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_wopcm.c b/drivers/gpu/drm/i915/intel_wopcm.c
index 09cc62b0d7ca..92cb82dd0c07 100644
--- a/drivers/gpu/drm/i915/intel_wopcm.c
+++ b/drivers/gpu/drm/i915/intel_wopcm.c
@@ -168,6 +168,9 @@ int intel_wopcm_init(struct intel_wopcm *wopcm)
 
 	GEM_BUG_ON(!wopcm->size);
 
+	if (i915_inject_load_failure())
+		return -E2BIG;
+
 	if (guc_fw_size >= wopcm->size) {
 		DRM_ERROR("GuC FW (%uKiB) is too big to fit in WOPCM.",
 			  guc_fw_size / 1024);
-- 
2.17.1

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

  parent reply	other threads:[~2018-07-27 12:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-27 12:08 [PATCH v7 1/6] drm/i915/guc: Avoid wasting memory on incorrect GuC pin bias Jakub Bartmiński
2018-07-27 12:08 ` [PATCH v7 2/6] drm/i915/guc: Do not partition WOPCM if GuC is not used Jakub Bartmiński
2018-07-27 12:08 ` [PATCH v7 3/6] drm/i915/guc: Move the pin bias value from GuC to GGTT Jakub Bartmiński
2018-07-27 12:18   ` Chris Wilson
2018-07-27 12:29     ` Michal Wajdeczko
2018-07-27 12:08 ` [PATCH v7 4/6] drm/i915: Remove unnecessary ggtt_offset_bias from i915_gem_context Jakub Bartmiński
2018-07-27 12:08 ` Jakub Bartmiński [this message]
2018-07-27 12:15   ` [PATCH v7 5/6] drm/i915: Add a fault injection point to WOPCM init Chris Wilson
2018-07-27 12:08 ` [PATCH v7 6/6] HAX enable GuC for CI Jakub Bartmiński
2018-07-27 12:34 ` ✗ Fi.CI.BAT: failure for series starting with [v7,1/6] drm/i915/guc: Avoid wasting memory on incorrect GuC pin bias 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=20180727120856.20485-5-jakub.bartminski@intel.com \
    --to=jakub.bartminski@intel.com \
    --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 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.