drm/i915: Fix nesting of rps.mutex and struct_mutex during powersave init
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Aug 2016 12:58:24 +0000 (13:58 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 10 Aug 2016 15:07:36 +0000 (16:07 +0100)
commitb5163dbb17fd0648600d2c840e53b76f5ca49a5b
tree0d1235dadfd1af1313699c524b897c48acbe5927
parenteebb40e0814fe20dba2ccb899557521cbf423711
drm/i915: Fix nesting of rps.mutex and struct_mutex during powersave init

During intel_gt_powersave_init() we take the RPS mutex to ensure that
all locking requirements are met as we talk to the punit, but we also
require the struct_mutex for allocating a slice of the global GTT for a
power context on Valleyview. struct_mutex must be the outer lock here,
as we nest rps.mutex inside later on.

Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Fixes: 773ea9a80132 ("drm/i915: Perform static RPS frequency setup before...")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470833904-29886-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
drivers/gpu/drm/i915/intel_pm.c