On Thu, 22 Mar 2018 18:05:51 +0100, Piotr Piórkowski
<piotr.piorkowski@xxxxxxxxx> wrote:
If GuC firmware is not available on the system and we load i915 with
enable
GuC, then we hit this null pointer dereference issue:
/snip/
diff --git a/drivers/gpu/drm/i915/intel_uc_fw.c
b/drivers/gpu/drm/i915/intel_uc_fw.c
index 30c73243f54d..c0663857cd43 100644
--- a/drivers/gpu/drm/i915/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/intel_uc_fw.c
@@ -199,7 +199,6 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw,
int (*xfer)(struct intel_uc_fw *uc_fw,
struct i915_vma *vma))
{
- struct drm_i915_private *i915 = to_i915(uc_fw->obj->base.dev);
struct i915_vma *vma;
int err;
@@ -224,7 +223,7 @@ int intel_uc_fw_upload(struct intel_uc_fw *uc_fw,
vma = i915_gem_object_ggtt_pin(uc_fw->obj, NULL, 0, 0,
PIN_OFFSET_BIAS |
- i915->guc.ggtt_pin_bias);
+ to_i915(uc_fw->obj->base.dev)->guc.ggtt_pin_bias);
hmm, sorry, but it looks too ugly and also is over 80
so let's just initialize i915 after checking fetch_status as was suggested
by Jackie (but maybe without GEM_BUG_ON)
/m
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx