Return primary plane already associated with the CRTC if it exists
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sun, 16 Apr 2017 16:07:40 +0000 (19:07 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 21 Apr 2017 12:36:59 +0000 (15:36 +0300)
commitcfc1318f7ac480622f5bd70f1f9fbf97fe7d906d
tree91bdbf77bb4f7d455e91888edadadfcd4f417759
parent66f161d0032ede1890e9f1a67387a76cadbe2ffa
Return primary plane already associated with the CRTC if it exists

The Crtc::get_primary_plane() method returns the first primary plane
that supports the CRTC. While being correct, this could lead to multiple
primary planes being associated with the CRTC, which can confuse
applications. To avoid that, return insead the primary plane already
associated with the CRTC if one exists, otherwise keep the current
behaviour.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kms++/src/crtc.cpp