From: Keith Packard Date: Wed, 29 Jun 2011 07:30:34 +0000 (-0700) Subject: drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state X-Git-Tag: v3.0-rc6~11^2~4 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d70bed1947772f34d66ada3bd923bfc12ea2452b;p=pandora-kernel.git drm/i915: Hold struct_mutex during i915_save_state/i915_restore_state Lots of register access in these functions, some of which requires the struct mutex. These functions now hold the struct mutex across the calls to i915_save_display and i915_restore_display, and so the internal mutex calls in those functions have been removed. To ensure that no-one else was calling them (and hence violating the new required locking invarient), those functions have been made static. gen6_enable_rps locks the struct mutex, and so i915_restore_state unlocks the mutex around calls to that function. Reviewed-by: Ben Widawsky Signed-off-by: Keith Packard --- Reading git-diff-tree failed