[Intel-gfx] [PATCH v2] drm/i915/selftests: Add a simple exerciser for suspend/hibernate

Bartminski, Jakub jakub.bartminski at intel.com
Thu Aug 30 10:47:21 UTC 2018


On Thu, 2018-08-30 at 10:52 +0100, Chris Wilson wrote:

> +static int igt_gem_suspend(void *arg)
[...]
> +	if (i915_gem_suspend(i915)) {
> +		pr_err("i915_gem_suspend failed\n");
> +		err = -EINVAL;
> +		goto out;
> +	}
> +
> +	i915_gem_suspend_late(i915);

Shouldn't we also do i915_gem_suspend_gtt_mappings after
i915_gem_suspend (usually it's in drm_suspend, which is called by both
pm_suspend and pm_freeze)? It's later restored in i915_gem_resume.

> +static int igt_gem_hibernate(void *arg)

Most of this function is same as igt_gem_suspend and that is probably
not going to change since both suspend and hibernation normally go
through pm_prepare and pm_resume_early/resume, maybe some prepare and
resume helpers for readability?

- Jakub
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3278 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20180830/fa99539e/attachment.bin>


More information about the Intel-gfx mailing list