drm/i915: vlv: reserve GT power context early
authorImre Deak <imre.deak@intel.com>
Tue, 11 Feb 2014 19:39:06 +0000 (21:39 +0200)
committerJani Nikula <jani.nikula@intel.com>
Mon, 3 Mar 2014 17:06:40 +0000 (19:06 +0200)
commit17b0c1f7865d8bf4f5e5aa94e2aeafb35d23e4e9
treeafbcfbc38f5b062a19826530d2984760e0355dc6
parentbcdb72ac7c00d2b56359fc82bcc8fe50454717d5
drm/i915: vlv: reserve GT power context early

We reserve the space for the power context in stolen memory at a fixed
address from a delayed work. This races with the subsequent driver
init/resume code which could allocate something at that address, so the
reservation for the power context fails. Reserve the space up-front, so
this can't happen. This also adds a missing struct_mutex lock around the
stolen allocation, which wasn't taken in the delayed work path.

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: stable@vger.kernel.org
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_pm.c