diff options
author | Jakub Bartmiński <jakub.bartminski@intel.com> | 2018-07-27 17:11:47 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-07-27 18:07:45 +0300 |
commit | 905febf592f7280084ee853b05d7bd59e26c4ca0 (patch) | |
tree | 04e6a0d7a371245d0db0eff1eebb6c641a8a90bd /drivers/gpu/drm/i915/intel_wopcm.c | |
parent | 496bcce3c9bf50ccf74b3050669600631cbf8138 (diff) | |
download | linux-905febf592f7280084ee853b05d7bd59e26c4ca0.tar.xz |
drm/i915: Add a fault injection point to WOPCM init
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>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180727141148.30874-5-jakub.bartminski@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_wopcm.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_wopcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |