drm/doc: remove standard connector props from the csv file
Subsystems (3)
PATCH 1/3 drm/doc: remove standard connector props from the csv file
They're properly documented in drm_connector.c now, and this csv file is a horrible mess. Better to remove it.
--- Documentation/gpu/kms-properties.csv | 5 ----- 1 file changed, 5 deletions(-)
Documentation/gpu/kms-properties.csv +0 -5
@@ -1,10 +1,5 @@ Owner Module/Drivers,Group,Property Name,Type,Property Values,Object attached,Description/Restrictions ,,“scaling mode”,ENUM,"{ ""None"", ""Full"", ""Center"", ""Full aspect"" }",Connector,"Supported by: amdgpu, gma500, i915, nouveau and radeon." -,Connector,“EDID”,BLOB | IMMUTABLE,0,Connector,Contains id of edid blob ptr object. -,,“DPMS”,ENUM,"{ “On”, “Standby”, “Suspend”, “Off” }",Connector,Contains DPMS operation mode value. -,,“PATH”,BLOB | IMMUTABLE,0,Connector,Contains topology path to a connector. -,,“TILE”,BLOB | IMMUTABLE,0,Connector,Contains tiling information for a connector. -,,“CRTC_ID”,OBJECT,DRM_MODE_OBJECT_CRTC,Connector,CRTC that connector is attached to (atomic) ,DVI-I,“subconnector”,ENUM,"{ “Unknown”, “DVI-D”, “DVI-A” }",Connector,TBD ,,“select subconnector”,ENUM,"{ “Automatic”, “DVI-D”, “DVI-A” }",Connector,TBD ,TV,“subconnector”,ENUM,"{ ""Unknown"", ""Composite"", ""SVIDEO"", ""Component"", ""SCART"" }",Connector,TBD
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/3 drm: Document kms locking a bit better
The rules are getting real hard, better to dump my brain into text a bit. This is by far not complete, but I think I reasonable start at least.
Some of the older kms structures would need a full doc review anyway
...
--- include/drm/drm_connector.h | 16 ++++- include/drm/drm_crtc.h | 14 ++++- include/drm/drm_mode_config.h | 140 +++++++++++++++++++++++++++++++++--------- include/drm/drm_plane.h | 16 ++++- 4 files changed, 152 insertions(+), 34 deletions(-)
include/drm/drm_connector.h +15 -1
@@ -655,7 +655,6 @@ struct drm_cmdline_mode {* @bad_edid_counter: track sinks that give us an EDID with invalid checksum * @edid_corrupt: indicates whether the last read EDID was corrupt * @debugfs_entry: debugfs directory for this connector -* @state: current atomic state for this connector * @has_tile: is this connector connected to a tiled monitor * @tile_group: tile group for the connected monitor * @tile_is_single_monitor: whether the tile is one monitor housing
@@ -823,6 +822,21 @@ struct drm_connector {struct dentry *debugfs_entry; +/** +* @state: +* +* Current atomic state for this connector. +* +* This is protected by @drm_mode_config.connection_mutex. Note that +* nonblocking atomic commits access the current connector state without +* taking locks. Either by going through the &struct drm_atomic_state +* pointers, see for_each_connector_in_state(), +* for_each_oldnew_connector_in_state(), +* for_each_old_connector_in_state() and +* for_each_new_connector_in_state(). Or through careful ordering of +* atomic commit operations as implemented in the atomic helpers, see +* &struct drm_crtc_commit. +*/ struct drm_connector_state *state;/* DisplayID bits */
include/drm/drm_crtc.h +12 -2
@@ -702,10 +702,12 @@ struct drm_crtc {/** * @mutex: * -* This provides a read lock for the overall crtc state (mode, dpms +* This provides a read lock for the overall CRTC state (mode, dpms * state, ...) and a write lock for everything which can be update -* without a full modeset (fb, cursor data, crtc properties ...). A full +* without a full modeset (fb, cursor data, CRTC properties ...). A full * modeset also need to grab &drm_mode_config.connection_mutex. +* +* For atomic drivers specifically this protects @state. */ struct drm_modeset_lock mutex;
@@ -751,6 +753,14 @@ struct drm_crtc {* @state: * * Current atomic state for this CRTC. +* +* This is protected by @mutex. Note that nonblocking atomic commits +* access the current CRTC state without taking locks. Either by going +* through the &struct drm_atomic_state pointers, see +* for_each_crtc_in_state(), for_each_oldnew_crtc_in_state(), +* for_each_old_crtc_in_state() and for_each_new_crtc_in_state(). Or +* through careful ordering of atomic commit operations as implemented +* in the atomic helpers, see &struct drm_crtc_commit. */ struct drm_crtc_state *state;
include/drm/drm_mode_config.h +110 -30
194 lines not on this page · raw message
include/drm/drm_plane.h +15 -1
@@ -459,7 +459,6 @@ enum drm_plane_type {* @funcs: helper functions * @properties: property tracking for this plane * @type: type of plane (overlay, primary, cursor) -* @state: current atomic state for this plane * @zpos_property: zpos property for this plane * @rotation_property: rotation property for this plane * @helper_private: mid-layer private data
@@ -476,6 +475,8 @@ struct drm_plane {* Protects modeset plane state, together with the &drm_crtc.mutex of * CRTC this plane is linked to (when active, getting activated or * getting disabled). +* +* For atomic drivers specifically this protects @state. */ struct drm_modeset_lock mutex;
@@ -505,6 +506,19 @@ struct drm_plane {const struct drm_plane_helper_funcs *helper_private; +/** +* @state: +* +* Current atomic state for this plane. +* +* This is protected by @mutex. Note that nonblocking atomic commits +* access the current plane state without taking locks. Either by going +* through the &struct drm_atomic_state pointers, see +* for_each_plane_in_state(), for_each_oldnew_plane_in_state(), +* for_each_old_plane_in_state() and for_each_new_plane_in_state(). Or +* through careful ordering of atomic commit operations as implemented +* in the atomic helpers, see &struct drm_crtc_commit. +*/ struct drm_plane_state *state;struct drm_property *zpos_property;
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 3/3 drm: document the all the atomic iterators
In reply to Daniel VetterMostly because I want the links from the newly-added @state functions to work. But I think explaining when they're useful and that the implicit one is deprecated is good either way. Slightly repetitive unfortunately.
--- include/drm/drm_atomic.h | 159 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-)
include/drm/drm_atomic.h +158 -1
@@ -498,6 +498,23 @@ int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);void drm_state_dump (struct drm_device *dev,struct drm_printer *p); +/** +* for_each_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @connector_state: &struct drm_connector_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. +*/ #define for_each_connector_in_state (__state, connector, connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \
@@ -506,6 +523,20 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_oldnew_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_connector_in_state (__state, connector, old_connector_state, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \
@@ -515,6 +546,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_old_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_connector_in_state (__state, connector, old_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \
@@ -523,6 +566,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_new_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_connector_in_state (__state, connector, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \
@@ -531,6 +586,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_crtc_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @crtc_state: &struct drm_crtc_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_crtc_in_state (__state, crtc, crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \
@@ -539,6 +611,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc_state) +/** +* for_each_oldnew_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_crtc_in_state (__state, crtc, old_crtc_state, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \
@@ -548,6 +632,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_old_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_crtc_in_state (__state, crtc, old_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \
@@ -556,6 +651,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_new_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_crtc_in_state (__state, crtc, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \
@@ -564,6 +670,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @plane_state: &struct drm_plane_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_plane_in_state (__state, plane, plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \
@@ -572,6 +695,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane_state) +/** +* for_each_oldnew_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_plane_in_state (__state, plane, old_plane_state, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \
@@ -581,6 +716,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_old_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_plane_in_state (__state, plane, old_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \
@@ -589,6 +735,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_new_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_plane_in_state (__state, plane, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \
@@ -603,7 +760,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);* * To give drivers flexibility &struct drm_crtc_state has 3 booleans to track * whether the state CRTC changed enough to need a full modeset cycle: -* connectors_changed, mode_changed and active_changed. This helper simply +* planes_changed, mode_changed and active_changed. This helper simply * combines these three to compute the overall need for a modeset for @state. * * The atomic helper code sets these booleans, but drivers can and should
Signature · 6 lines
2.11.0 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm: document the all the atomic iterators
Quoted 8 lines · Daniel Vetter
Mostly because I want the links from the newly-added @state functions to work. But I think explaining when they're useful and that the implicit one is deprecated is good either way. Slightly repetitive unfortunately.
Cc Harry Wentland <[email protected]>Cc Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Series is:
Quoted 261 lines
--- include/drm/drm_atomic.h | 159 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-)include/drm/drm_atomic.h +158
-2@@ -498,6 +498,23 @@ int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);void drm_state_dump (struct drm_device *dev,struct drm_printer *p); +/** +* for_each_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @connector_state: &struct drm_connector_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. +*/ #define for_each_connector_in_state (__state, connector, connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -506,6 +523,20 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_oldnew_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_connector_in_state (__state, connector, old_connector_state, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -515,6 +546,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_old_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_connector_in_state (__state, connector, old_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -523,6 +566,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_new_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_connector_in_state (__state, connector, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -531,6 +586,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_crtc_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @crtc_state: &struct drm_crtc_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_crtc_in_state (__state, crtc, crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -539,6 +611,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc_state) +/** +* for_each_oldnew_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_crtc_in_state (__state, crtc, old_crtc_state, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -548,6 +632,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_old_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_crtc_in_state (__state, crtc, old_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -556,6 +651,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_new_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_crtc_in_state (__state, crtc, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -564,6 +670,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @plane_state: &struct drm_plane_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_plane_in_state (__state, plane, plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -572,6 +695,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane_state) +/** +* for_each_oldnew_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_plane_in_state (__state, plane, old_plane_state, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -581,6 +716,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_old_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_plane_in_state (__state, plane, old_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -589,6 +735,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_new_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_plane_in_state (__state, plane, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -603,7 +760,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);* * To give drivers flexibility &struct drm_crtc_state has 3 booleans to track * whether the state CRTC changed enough to need a full modeset cycle: -* connectors_changed, mode_changed and active_changed. This helper simply +* planes_changed, mode_changed and active_changed. This helper simply * combines these three to compute the overall need for a modeset for @state. * * The atomic helper code sets these booleans, but drivers can and should -- 2.11.0
Quoted 4 lines
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 3/3] drm: document the all the atomic iterators
Quoted 6 lines · Alex Deucher
Quoted 5 lines · Daniel Vetter
Mostly because I want the links from the newly-added @state functions to work. But I think explaining when they're useful and that the implicit one is deprecated is good either way. Slightly repetitive unfortunately.
Quoted 6 lines
Quoted 3 lines
Cc Harry Wentland <[email protected]>Cc Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>Series is:
Reviewed-by Alex Deucher <[email protected]>
Thanks a lot for your reviews, all applied to -misc. -Daniel
Quoted 266 lines
Quoted 266 lines
--- include/drm/drm_atomic.h | 159 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-)include/drm/drm_atomic.h +158
-2@@ -498,6 +498,23 @@ int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);void drm_state_dump (struct drm_device *dev,struct drm_printer *p); +/** +* for_each_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @connector_state: &struct drm_connector_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. +*/ #define for_each_connector_in_state (__state, connector, connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -506,6 +523,20 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_oldnew_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_connector_in_state (__state, connector, old_connector_state, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -515,6 +546,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_old_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_connector_in_state (__state, connector, old_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -523,6 +566,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_new_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_connector_in_state (__state, connector, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -531,6 +586,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_crtc_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @crtc_state: &struct drm_crtc_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_crtc_in_state (__state, crtc, crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -539,6 +611,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc_state) +/** +* for_each_oldnew_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_crtc_in_state (__state, crtc, old_crtc_state, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -548,6 +632,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_old_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_crtc_in_state (__state, crtc, old_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -556,6 +651,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_new_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_crtc_in_state (__state, crtc, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -564,6 +670,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @plane_state: &struct drm_plane_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_plane_in_state (__state, plane, plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -572,6 +695,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane_state) +/** +* for_each_oldnew_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_plane_in_state (__state, plane, old_plane_state, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -581,6 +716,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_old_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_plane_in_state (__state, plane, old_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -589,6 +735,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_new_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_plane_in_state (__state, plane, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -603,7 +760,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);* * To give drivers flexibility &struct drm_crtc_state has 3 booleans to track * whether the state CRTC changed enough to need a full modeset cycle: -* connectors_changed, mode_changed and active_changed. This helper simply +* planes_changed, mode_changed and active_changed. This helper simply * combines these three to compute the overall need for a modeset for @state. * * The atomic helper code sets these booleans, but drivers can and should -- 2.11.0
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/dri-devel
Re: [PATCH 3/3] drm: document the all the atomic iterators
In reply to Daniel VetterPatches 1-3 are Reviewed-by: Harry Wentland <[email protected]>
Harry
Quoted 259 lines · Daniel Vetter
Mostly because I want the links from the newly-added @state functions to work. But I think explaining when they're useful and that the implicit one is deprecated is good either way. Slightly repetitive unfortunately.
Cc Harry Wentland <[email protected]>Cc Maarten Lankhorst <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- include/drm/drm_atomic.h | 159 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 158 insertions(+), 1 deletion(-)include/drm/drm_atomic.h +157
-0@@ -498,6 +498,23 @@ int __must_check drm_atomic_nonblocking_commit(struct drm_atomic_state *state);void drm_state_dump (struct drm_device *dev,struct drm_printer *p); +/** +* for_each_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @connector_state: &struct drm_connector_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. +*/ #define for_each_connector_in_state (__state, connector, connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -506,6 +523,20 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_oldnew_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_connector_in_state (__state, connector, old_connector_state, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -515,6 +546,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_old_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @old_connector_state: &struct drm_connector_state iteration cursor for the +* old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_connector_in_state (__state, connector, old_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -523,6 +566,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_new_connector_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @connector: &struct drm_connector iteration cursor +* @new_connector_state: &struct drm_connector_state iteration cursor for the +* new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all connectors in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_connector_in_state (__state, connector, new_connector_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->num_connector && \@@ -531,6 +586,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (connector) +/** +* for_each_crtc_in_state - iterate over all connectors in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @crtc_state: &struct drm_crtc_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_crtc_in_state (__state, crtc, crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -539,6 +611,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc_state) +/** +* for_each_oldnew_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_crtc_in_state (__state, crtc, old_crtc_state, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -548,6 +632,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_old_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @old_crtc_state: &struct drm_crtc_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_crtc_in_state (__state, crtc, old_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -556,6 +651,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_new_crtc_in_state - iterate over all CRTCs in an atomic update +* @__state: &struct drm_atomic_state pointer +* @crtc: &struct drm_crtc iteration cursor +* @new_crtc_state: &struct drm_crtc_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all CRTCs in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_crtc_in_state (__state, crtc, new_crtc_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_crtc && \@@ -564,6 +670,23 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (crtc) +/** +* for_each_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @plane_state: &struct drm_plane_state iteration cursor +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update. Note that before the +* software state is committed (by calling drm_atomic_helper_swap_state(), this +* points to the new state, while afterwards it points to the old state. Due to +* this tricky confusion this macro is deprecated. +* +* FIXME: +* +* Replace all usage of this with one of the explicit iterators below and then +* remove this macro. + */#define for_each_plane_in_state (__state, plane, plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -572,6 +695,18 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane_state) +/** +* for_each_oldnew_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking both old and +* new state. This is useful in places where the state delta needs to be +* considered, for example in atomic check functions. + */#define for_each_oldnew_plane_in_state (__state, plane, old_plane_state, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -581,6 +716,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_old_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @old_plane_state: &struct drm_plane_state iteration cursor for the old state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the old +* state. This is useful in disable functions, where we need the old state the +* hardware is still in. + */#define for_each_old_plane_in_state (__state, plane, old_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \@@ -589,6 +735,17 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p); (__i)++) \for_each_if (plane) +/** +* for_each_new_plane_in_state - iterate over all planes in an atomic update +* @__state: &struct drm_atomic_state pointer +* @plane: &struct drm_plane iteration cursor +* @new_plane_state: &struct drm_plane_state iteration cursor for the new state +* @__i: int iteration cursor, for macro-internal use +* +* This iterates over all planes in an atomic update, tracking only the new +* state. This is useful in enable functions, where we need the new state the +* hardware should be in when the atomic commit operation has completed. + */#define for_each_new_plane_in_state (__state, plane, new_plane_state, __i) \ for ((__i) = 0; \ (__i) < (__state)->dev->mode_config.num_total_plane && \
include/drm/drm_atomic.h void drm_state_dump(struct drm_device *dev, struct drm_printer *p); · line 766
Quoted 8 lines
include/drm/drm_atomic.h +1
-1@@ -603,7 +760,7 @@ void drm_state_dump(struct drm_device *dev, struct drm_printer *p);* * To give drivers flexibility &struct drm_crtc_state has 3 booleans to track * whether the state CRTC changed enough to need a full modeset cycle: -* connectors_changed, mode_changed and active_changed. This helper simply +* planes_changed, mode_changed and active_changed. This helper simply * combines these three to compute the overall need for a modeset for @state. * * The atomic helper code sets these booleans, but drivers can and should
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Patchwork
CI✗ Fi.CI.BAT: failure for series starting with [1/3] drm/doc: remove standard connector props from the csv file
In reply to Daniel Vetter== Series Details ==
== Series Details ==
Series: series starting with [1/3] drm/doc: remove standard connector props from the csv file
URL : https://patchwork.freedesktop.org/series/22023/
State : failure
== Summary ==
Series 22023v1 Series without cover letter
https://patchwork.freedesktop.org/api/1.0/series/22023/revisions/1/mbox/
Test gem_exec_suspend:
Subgroup basic-s3:
incomplete -> PASS (fi-skl-6260u)
Subgroup basic-s4-devices:
dmesg-warn -> PASS (fi-kbl-7560u) fdo#100428
Test kms_cursor_legacy:
Subgroup basic-busy-flip-before-cursor-atomic:
pass -> FAIL (fi-snb-2600)fdo#100428 https://bugs.freedesktop.org/show_bug.cgi?id=100428
fi-bdw-5557u total:278 pass:267 dwarn:0 dfail:0 fail:0 skip:11 time: 455s fi-bdw-gvtdvm total:278 pass:256 dwarn:8 dfail:0 fail:0 skip:14 time: 466s fi-bsw-n3050 total:278 pass:239 dwarn:0 dfail:0 fail:0 skip:39 time: 584s fi-bxt-j4205 total:278 pass:259 dwarn:0 dfail:0 fail:0 skip:19 time: 542s fi-bxt-t5700 total:278 pass:258 dwarn:0 dfail:0 fail:0 skip:20 time: 567s fi-byt-j1900 total:278 pass:251 dwarn:0 dfail:0 fail:0 skip:27 time: 506s fi-byt-n2820 total:278 pass:247 dwarn:0 dfail:0 fail:0 skip:31 time: 508s fi-hsw-4770 total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 439s fi-hsw-4770r total:278 pass:262 dwarn:0 dfail:0 fail:0 skip:16 time: 442s fi-ilk-650 total:278 pass:228 dwarn:0 dfail:0 fail:0 skip:50 time: 440s fi-ivb-3520m total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 515s fi-ivb-3770 total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 492s fi-kbl-7500u total:278 pass:260 dwarn:0 dfail:0 fail:0 skip:18 time: 489s fi-kbl-7560u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 596s fi-skl-6260u total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 482s fi-skl-6700hq total:278 pass:261 dwarn:0 dfail:0 fail:0 skip:17 time: 606s fi-skl-6700k total:278 pass:256 dwarn:4 dfail:0 fail:0 skip:18 time: 486s fi-skl-6770hq total:278 pass:268 dwarn:0 dfail:0 fail:0 skip:10 time: 517s fi-skl-gvtdvm total:278 pass:265 dwarn:0 dfail:0 fail:0 skip:13 time: 457s fi-snb-2520m total:278 pass:250 dwarn:0 dfail:0 fail:0 skip:28 time: 552s fi-snb-2600 total:278 pass:248 dwarn:0 dfail:0 fail:1 skip:29 time: 418s
dabd992961047cf26698036f563aa86a083284ac drm-tip: 2017y-03m-28d-15h-25m-54s UTC integration manifest 8bb1098 drm: document the all the atomic iterators
b113c9f drm: Document kms locking a bit better
3d8cbdb drm/doc: remove standard connector props from the csv file
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4328/
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx