diff mbox series

[v5,4/5] drm/i915: Add a fault injection point to WOPCM init

Message ID 20180725105656.13348-4-jakub.bartminski@intel.com (mailing list archive)
State New, archived
Headers show
Series [v5,1/5] drm/i915/guc: Avoid wasting memory on incorrect GuC pin bias | expand

Commit Message

Bartminski, Jakub July 25, 2018, 10:56 a.m. UTC
v4:
Move the injection inside the WOPCM init.

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(+)

Comments

Michal Wajdeczko July 25, 2018, 5:58 p.m. UTC | #1
On Wed, 25 Jul 2018 12:56:55 +0200, Jakub Bartmiński  
<jakub.bartminski@intel.com> wrote:

Missing commit message ... at minimum just repeat commit title

> v4:
> Move the injection inside the WOPCM init.
>
> 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 74bf76f3fddc..86c38b072926 100644
> --- a/drivers/gpu/drm/i915/intel_wopcm.c
> +++ b/drivers/gpu/drm/i915/intel_wopcm.c
> @@ -165,6 +165,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);
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/intel_wopcm.c b/drivers/gpu/drm/i915/intel_wopcm.c
index 74bf76f3fddc..86c38b072926 100644
--- a/drivers/gpu/drm/i915/intel_wopcm.c
+++ b/drivers/gpu/drm/i915/intel_wopcm.c
@@ -165,6 +165,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);