On Tue, Dec 22, 2015 at 11:50:53AM +0530, ankitprasad.r.sharma@xxxxxxxxx wrote: > From: Ankitprasad Sharma <ankitprasad.r.sharma@xxxxxxxxx> > > The BIOS RapidStartTechnology may corrupt the stolen memory across S3 > suspend due to unalarmed hibernation, in which case we will not be able > to preserve the User data stored in the stolen region. Hence this patch > tries to identify presence of the RST device on the ACPI bus, and > disables use of stolen memory (for persistent data) if found. > > Signed-off-by: Ankitprasad Sharma <ankitprasad.r.sharma@xxxxxxxxx> > --- > drivers/gpu/drm/i915/i915_drv.h | 7 +++++++ > drivers/gpu/drm/i915/i915_gem.c | 8 ++++++++ > drivers/gpu/drm/i915/i915_gem_stolen.c | 14 ++++++++++++++ > drivers/gpu/drm/i915/intel_acpi.c | 20 ++++++++++++++++++++ > 4 files changed, 49 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h > index 492878a..d26a8f1 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -1309,6 +1309,9 @@ struct i915_gem_mm { > */ > bool busy; > > + /* Intel RapidStart Technology info */ This defeats the purpose of using a generic term. /** Stolen will be lost upon hibernate (as the memory is unpowered). * Across resume, we expect stolen to be intact - however, it may * also be utililised by third parties (e.g. Intel RapidStart * Technology) and if so we hae to assume that any data stored in * stolen across resume is lost and we set this flag to indicate that * the stolen memory is volatile. */ > + bool nonvolatile_stolen; > + > /* the indicator for dispatch video commands on two BSD rings */ > int bsd_ring_dispatch_index; > > @@ -3417,9 +3420,13 @@ intel_opregion_notify_adapter(struct drm_device *dev, pci_power_t state) > #ifdef CONFIG_ACPI > extern void intel_register_dsm_handler(void); > extern void intel_unregister_dsm_handler(void); > +extern bool intel_detect_acpi_rst(void); > +extern int match_device(struct device *dev, void* ids); As Tvrtko mentioned this is private to the driver. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx