On Sat, Jun 11, 2016 at 09:21:11AM +0100, Chris Wilson wrote: > One of the first steps in triaging memory corruption on module load is > to disable stolen. (It helps reduce the impact of the BIOS clobbering > our memory since we allocate our ringbuffers and initial objects from > stolen, if they are clobbered we get an immediate hang and garbage on > screen.) Rather than requesting bug reporters patch their kernel to test > the theory, allow us to disable stolen through a module option. Just a quick drive-by observation, intelfb_alloc() calls i915_gem_object_create_stolen() and if I follow the call chain in that function it seems to me that dev_priv->mm.stolen_base == 0 isn't checked anywhere, so this looks like something that might break with i915.enable_stolen=0. But probably that's what you meant with "secondary effects". Best regards, Lukas > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_gem_stolen.c | 5 +++++ > drivers/gpu/drm/i915/i915_params.c | 6 ++++++ > drivers/gpu/drm/i915/i915_params.h | 1 + > 3 files changed, 12 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c > index e9cd82290408..bb8567b1d6a4 100644 > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c > @@ -411,6 +411,11 @@ int i915_gem_init_stolen(struct drm_device *dev) > } > #endif > > + if (!i915.enable_stolen) { > + DRM_INFO("Disabling use of stolen memory at user request.\n"); > + return 0; > + } > + > if (ggtt->stolen_size == 0) > return 0; > > diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c > index 573e78723fc5..511528199aec 100644 > --- a/drivers/gpu/drm/i915/i915_params.c > +++ b/drivers/gpu/drm/i915/i915_params.c > @@ -60,6 +60,7 @@ struct i915_params i915 __read_mostly = { > .enable_dp_mst = true, > .inject_load_failure = 0, > .enable_dpcd_backlight = false, > + .enable_stolen = true, > }; > > module_param_named(modeset, i915.modeset, int, 0400); > @@ -119,6 +120,11 @@ MODULE_PARM_DESC(enable_hangcheck, > "WARNING: Disabling this can cause system wide hangs. " > "(default: true)"); > > +module_param_named(enable_stolen, i915.enable_stolen, bool, 0400); > +MODULE_PARM_DESC(enable_stolen, > + "Enable use of memory reserved (stolen) by the BIOS for graphics. " > + "(default: true)"); > + > module_param_named_unsafe(enable_ppgtt, i915.enable_ppgtt, int, 0400); > MODULE_PARM_DESC(enable_ppgtt, > "Override PPGTT usage. " > diff --git a/drivers/gpu/drm/i915/i915_params.h b/drivers/gpu/drm/i915/i915_params.h > index 1323261a0cdd..f126decae848 100644 > --- a/drivers/gpu/drm/i915/i915_params.h > +++ b/drivers/gpu/drm/i915/i915_params.h > @@ -63,6 +63,7 @@ struct i915_params { > bool nuclear_pageflip; > bool enable_dp_mst; > bool enable_dpcd_backlight; > + bool enable_stolen; > }; > > extern struct i915_params i915 __read_mostly; > -- > 2.8.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx