]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix locking in DRRS flush/invalidate hooks
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Apr 2015 14:44:15 +0000 (16:44 +0200)
committerJani Nikula <jani.nikula@intel.com>
Fri, 10 Apr 2015 11:29:27 +0000 (14:29 +0300)
commitae3bc7b176bd5e2ee6dfce51968294b2578e6175
tree6ef4b8b6cc08a3b62915c3d95585fadd2db8a839
parentcaf693c96e3ad68a6ab5e978f0f82ba06720069d
drm/i915: Fix locking in DRRS flush/invalidate hooks

We must acquire the mutex before we can check drrs.dp, otherwise
someone might sneak in with a modeset, clear the pointer after we've
checked it and then the code will Oops.

This issue has been introduced in

commit 39d7ea18b2f1e33e7d96de50e38db5969d626013
Author: Vandana Kannan <vandana.kannan@intel.com>
Date:   Sat Jan 10 02:25:59 2015 +0530

    drm/i915: DRRS calls based on frontbuffer

v2: Don't blow up on uninitialized mutex and work item by checking
whether DRRS is support or not first. Also unconditionally initialize
the mutex/work item to avoid future trouble.

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ramalingam C <ramalingam.c@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Vandana Kannan <vandana.kannan@intel.com>
Cc: stable@vger.kernel.org (4.0+ only)
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/intel_dp.c