diff options
author | Chris Michael <cp.michael@samsung.com> | 2017-03-27 10:50:52 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2017-04-07 09:37:02 -0400 |
commit | b34584e8fdff88f2d4b8a67e85d3460441b06639 (patch) | |
tree | c07c82d42823fcac0e5d2e453c92cb972f9f0ed2 | |
parent | 0b0f276cc9eb9a035be38713fb2a160318f8e5ac (diff) | |
download | efl-b34584e8fdff88f2d4b8a67e85d3460441b06639.tar.gz |
ecore-drm2: Add support for plane formats
Small patch to store supported formats on a given plane state. This
will be used for assigning dmabuf clients to a hardware plane based on
size and supported format.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_device.c | 3 | ||||
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_private.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c index 03f21d8238..6d7c1ff78f 100644 --- a/src/lib/ecore_drm2/ecore_drm2_device.c +++ b/src/lib/ecore_drm2/ecore_drm2_device.c @@ -546,6 +546,9 @@ _drm2_atomic_state_fill(Ecore_Drm2_Atomic_State *state, int fd) pstate = &state->plane_states[i]; pstate->obj_id = pres->planes[i]; pstate->mask = plane->possible_crtcs; + pstate->num_formats = plane->count_formats; + memcpy(pstate->formats, plane->formats, + plane->count_formats * sizeof(plane->formats[0])); sym_drmModeFreePlane(plane); diff --git a/src/lib/ecore_drm2/ecore_drm2_private.h b/src/lib/ecore_drm2/ecore_drm2_private.h index 5e806f17f0..19c8df295d 100644 --- a/src/lib/ecore_drm2/ecore_drm2_private.h +++ b/src/lib/ecore_drm2/ecore_drm2_private.h @@ -647,6 +647,9 @@ typedef struct _Ecore_Drm2_Plane_State * so that we do not have to refetch properties when iterating planes */ uint32_t rotation_map[6]; uint32_t supported_rotations; + + uint32_t num_formats; + uint32_t formats[]; } Ecore_Drm2_Plane_State; struct _Ecore_Drm2_Atomic_State |