Skip to content

Commit d8e214a

Browse files
author
Anton Kindestam
committed
drm_atomic: Disallow selecting cursor planes using the options
1 parent a37f4c0 commit d8e214a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

video/out/drm_atomic.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void drm_object_print_info(struct mp_log *log, struct drm_object *object)
138138
}
139139

140140
struct drm_atomic_context *drm_atomic_create_context(struct mp_log *log, int fd, int crtc_id,
141-
int connector_id, int osd_plane_id, int video_plane_id)
141+
int connector_id, int osd_plane_id, int video_plane_id)
142142
{
143143
drmModePlane *drmplane = NULL;
144144
drmModePlaneRes *plane_res = NULL;
@@ -208,7 +208,10 @@ struct drm_atomic_context *drm_atomic_create_context(struct mp_log *log, int fd,
208208
if (drm_object_get_property(plane, "TYPE", &value) == -EINVAL) {
209209
mp_err(log, "Unable to retrieve type property from plane %d\n", j);
210210
goto fail;
211-
} else {
211+
} else {
212+
if (value == DRM_PLANE_TYPE_CURSOR) // Skip cursor planes
213+
continue;
214+
212215
layercount++;
213216

214217
if ((!primary_id) && (value == DRM_PLANE_TYPE_PRIMARY))

0 commit comments

Comments
 (0)