diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-07-12 18:51:02 +0300 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2017-07-13 19:28:43 +0300 |
commit | a4370c777406c2810e37fafd166ccddecdb2a60c (patch) | |
tree | 656eaad2a6834f2c25525d91f3fb877b123589be /include/drm/drm_dp_mst_helper.h | |
parent | 178e32c224d2772d3862828dc6f81e4d8953b2f2 (diff) | |
download | linux-a4370c777406c2810e37fafd166ccddecdb2a60c.tar.xz |
drm/atomic: Make private objs proper objects
Make the atomic private object stuff less special by introducing proper
base classes for the object and its state. Drivers can embed these in
their own appropriate objects, after which these things will work
exactly like the plane/crtc/connector states during atomic operations.
v2: Reorder to not depend on drm_dynarray (Daniel)
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170712155102.26276-3-ville.syrjala@linux.intel.com
Diffstat (limited to 'include/drm/drm_dp_mst_helper.h')
-rw-r--r-- | include/drm/drm_dp_mst_helper.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/drm/drm_dp_mst_helper.h b/include/drm/drm_dp_mst_helper.h index 177ab6f86855..d55abb75f29a 100644 --- a/include/drm/drm_dp_mst_helper.h +++ b/include/drm/drm_dp_mst_helper.h @@ -404,12 +404,17 @@ struct drm_dp_payload { int vcpi; }; +#define to_dp_mst_topology_state(x) container_of(x, struct drm_dp_mst_topology_state, base) + struct drm_dp_mst_topology_state { + struct drm_private_state base; int avail_slots; struct drm_atomic_state *state; struct drm_dp_mst_topology_mgr *mgr; }; +#define to_dp_mst_topology_mgr(x) container_of(x, struct drm_dp_mst_topology_mgr, base) + /** * struct drm_dp_mst_topology_mgr - DisplayPort MST manager * @@ -419,6 +424,11 @@ struct drm_dp_mst_topology_state { */ struct drm_dp_mst_topology_mgr { /** + * @base: Base private object for atomic + */ + struct drm_private_obj base; + + /** * @dev: device pointer for adding i2c devices etc. */ struct drm_device *dev; |