]> git.baikalelectronics.ru Git - kernel.git/commit
drm/atomic: Add helpers for state-subclassing drivers
authorThierry Reding <treding@nvidia.com>
Wed, 28 Jan 2015 13:54:32 +0000 (14:54 +0100)
committerThierry Reding <treding@nvidia.com>
Thu, 2 Apr 2015 16:48:32 +0000 (18:48 +0200)
commitb4f8af6d24a1149a71f14ecb95bb5a085d7523e9
tree820a100556fa6062025f6cf3b4f64d735ce9892d
parent032579cae2ef221f3c4faafc55808753508ebedb
drm/atomic: Add helpers for state-subclassing drivers

Drivers that subclass CRTC, plane or connector state need to carefully
duplicate the code that the atomic helpers have. This is bound to cause
breakage eventually because it requires auditing all drivers and update
them when code is added to the helpers.

In order to avoid that, implement new helpers that perform the required
steps when copying and destroying state. These new helpers are exported
so that state-subclassing drivers can use them. The default helpers are
implemented using them as well, providing a single location that needs
to be changed when adding to base atomic states.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/drm_atomic_helper.c
include/drm/drm_atomic_helper.h