drm/atomic: Allow drivers to subclass drm_atomic_state, v3
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 18 May 2015 08:06:40 +0000 (10:06 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 18 May 2015 14:39:41 +0000 (16:39 +0200)
commit036ef5733ba433760a3512bb5f7a155946e2df05
tree45fa24bd9722b147d1449e572e5f0e1e7433bd0b
parent744b058827b3db9a4f6027522dd9c73a208c2d31
drm/atomic: Allow drivers to subclass drm_atomic_state, v3

Drivers may need to store the state of shared resources, such as PLLs
or FIFO space, into the atomic state. Allow this by making it possible
to subclass drm_atomic_state.

Changes since v1:
- Change member names for functions to atomic_state_(alloc,clear)
- Change __drm_atomic_state_new to drm_atomic_state_init
- Allow free function to be overridden too, in case extra memory is
  allocated in alloc.
Changes since v2:
- Rename *_default_free to default_release, to make clear it doesn't
  free the state object itself.

Cc: dri-devel@lists.freedesktop.org
Acked-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_atomic.c
include/drm/drm_atomic.h
include/drm/drm_crtc.h