summaryrefslogtreecommitdiff
path: root/include/drm/drm_crtc.h
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-02 01:06:33 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-06-02 18:20:25 +0300
commitb8b5342b699b9b3d1b3455861a68b96424146959 (patch)
treeed4b33b83374d67bd8f6f1822e8d179815db44a3 /include/drm/drm_crtc.h
parent63e83c1dba5490de84c2d558a2425730db7fb134 (diff)
downloadlinux-b8b5342b699b9b3d1b3455861a68b96424146959.tar.xz
drm: Consolidate plane arrays in drm_atomic_state
It's kinda pointless to have 2 separate mallocs for these. And when we add more per-plane state in the future it's even more pointless. Right now there's no such thing planned, but both Gustavo's per-crtc fence patches, and some nonblocking commit helpers I'm playing around with will add more per-crtc stuff. It makes sense to also consolidate planes, just for consistency. In the future we can use this to store a pointer to the preceeding state, making an atomic update entirely free-standing. This will be needed to be able to queue them up with a depth > 1. Cc: Gustavo Padovan <gustavo@padovan.org> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1464818821-5736-11-git-send-email-daniel.vetter@ffwll.ch
Diffstat (limited to 'include/drm/drm_crtc.h')
-rw-r--r--include/drm/drm_crtc.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 751990a3bc7a..821398ce52d0 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1693,6 +1693,11 @@ struct drm_bridge {
void *driver_private;
};
+struct __drm_planes_state {
+ struct drm_plane *ptr;
+ struct drm_plane_state *state;
+};
+
struct __drm_connnectors_state {
struct drm_connector *ptr;
struct drm_connector_state *state;
@@ -1704,8 +1709,7 @@ struct __drm_connnectors_state {
* @allow_modeset: allow full modeset
* @legacy_cursor_update: hint to enforce legacy cursor IOCTL semantics
* @legacy_set_config: Disable conflicting encoders instead of failing with -EINVAL.
- * @planes: pointer to array of plane pointers
- * @plane_states: pointer to array of plane states pointers
+ * @planes: pointer to array of structures with per-plane data
* @crtcs: pointer to array of CRTC pointers
* @crtc_states: pointer to array of CRTC states pointers
* @num_connector: size of the @connectors and @connector_states arrays
@@ -1717,8 +1721,7 @@ struct drm_atomic_state {
bool allow_modeset : 1;
bool legacy_cursor_update : 1;
bool legacy_set_config : 1;
- struct drm_plane **planes;
- struct drm_plane_state **plane_states;
+ struct __drm_planes_state *planes;
struct drm_crtc **crtcs;
struct drm_crtc_state **crtc_states;
int num_connector;