]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Introduce better global state handling
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 20 Jan 2020 17:47:24 +0000 (19:47 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 31 Jan 2020 15:00:44 +0000 (17:00 +0200)
commit0ef1905ecf2e0e9b2ff8903ea3150b4dd2faa6c0
tree7eb61f5a644c1fbc1dc78afb822a970770a82dab
parent5f34299384cb70e7d844d3301be783d437dda97b
drm/i915: Introduce better global state handling

Our current global state handling is pretty ad-hoc. Let's try to
make it better by imitating the standard drm core private object
approach.

The reason why we don't want to directly use the private objects
is locking; Each private object has its own lock so if we
introduce any global private objects we get serialized by that
single lock across all pipes. The global state apporoach instead
uses a read/write lock type of approach where each individual
crtc lock counts as a read lock, and grabbing all the crtc locks
allows one write access.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200120174728.21095-15-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com>
drivers/gpu/drm/i915/Makefile
drivers/gpu/drm/i915/display/intel_atomic.c
drivers/gpu/drm/i915/display/intel_atomic.h
drivers/gpu/drm/i915/display/intel_audio.c
drivers/gpu/drm/i915/display/intel_cdclk.c
drivers/gpu/drm/i915/display/intel_display.c
drivers/gpu/drm/i915/display/intel_display_types.h
drivers/gpu/drm/i915/display/intel_global_state.c [new file with mode: 0644]
drivers/gpu/drm/i915/display/intel_global_state.h [new file with mode: 0644]
drivers/gpu/drm/i915/i915_drv.h