Re: [PATCH 10/10] drm/i915: Disable use of stolen area by User when Intel RST is present

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 04, 2016 at 04:46:55PM +0100, Lukas Wunner wrote:
> > +	/* If the stolen region can be modified behind our backs upon suspend,
> > +	 * then we cannot use it to store nonvolatile contents (i.e user data)
> > +	 * as it will be corrupted upon resume.
> > +	 */
> > +	dev_priv->mm.nonvolatile_stolen = true;
> > +#ifdef CONFIG_SUSPEND
> > +	if (intel_detect_acpi_rst()) {
> > +		/* BIOSes using RapidStart Technology have been reported
> > +		 * to overwrite stolen across S3, not just S4.
> > +		 */
> > +		dev_priv->mm.nonvolatile_stolen = false;
> > +	}
> > +#endif
> > +
> 
> I'd suggest simplifying it like this:
> 
> 	dev_priv->mm.nonvolatile_stolen = !(IS_ENABLED(CONFIG_SUSPEND) &&
> 					    acpi_dev_present("INT3392"));

Using if (IS_ENABLED(CONFIG_SUSPEND) && intel_detect_acpi_rst()) would
be better indeed. My main concern here is that we document carefully why we had
to disable this, and to leave room for future caveats. Hence my
preference for the verbose layout.

We could #define INTEL_RAPID_START "INT339" for
if (IS_ENABLED(CONFIG_SUSPEND) && acpi_dev_present(INTEL_RAPID_START))
but Anki wanted to keep the acpi details themselves out of stolen (hence
the current split).
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux