summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2020-01-20 19:47:24 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2020-01-31 17:00:44 +0200
commit0ef1905ecf2e0e9b2ff8903ea3150b4dd2faa6c0 (patch)
tree7eb61f5a644c1fbc1dc78afb822a970770a82dab /drivers/gpu/drm/i915/i915_drv.h
parent5f34299384cb70e7d844d3301be783d437dda97b (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 1ab8238e09fe..3ed48371f3da 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -71,6 +71,7 @@
#include "display/intel_dpll_mgr.h"
#include "display/intel_dsb.h"
#include "display/intel_frontbuffer.h"
+#include "display/intel_global_state.h"
#include "display/intel_gmbus.h"
#include "display/intel_opregion.h"
@@ -1098,6 +1099,8 @@ struct drm_i915_private {
*/
struct mutex dpll_lock;
+ struct list_head global_obj_list;
+
/*
* For reading active_pipes, cdclk_state holding any crtc
* lock is sufficient, for writing must hold all of them.