]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Lock gmbus/aux mutexes while changing cdclk
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 2 Mar 2020 17:44:42 +0000 (19:44 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 9 Mar 2020 20:28:33 +0000 (22:28 +0200)
commitcb693573b3414bdfad39fc78ac3677b2b66e2fc6
tree90a592a397bf1ccf2cfa5837750e0f20f6b00b51
parent942b3ddc226aa8a874e813dca3768453e1f64dbf
drm/i915: Lock gmbus/aux mutexes while changing cdclk

gmbus/aux may be clocked by cdclk, thus we should make sure no
transfers are ongoing while the cdclk frequency is being changed.
We do that by simply grabbing all the gmbus/aux mutexes. No one
else should be holding any more than one of those at a time so
the lock ordering here shouldn't matter.

v2: Use mutex_lock_nest_lock() (Chris)

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200302174442.5803-1-ville.syrjala@linux.intel.com
Acked-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/display/intel_cdclk.c