]> 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)
commit1b557d1c3f2e8549159a479b01808408e99e93c5
tree820a100556fa6062025f6cf3b4f64d735ce9892d
parentb1ad144da6f79a93a594fc13bb9e955bddff58c3
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