resmgr: fix reserve_plane()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 30 Mar 2017 11:35:06 +0000 (14:35 +0300)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 30 Mar 2017 11:36:50 +0000 (14:36 +0300)
reserve_plane() had inverted check, and looked for any plane type but
the one that was requested.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
kms++util/src/resourcemanager.cpp

index f751147799ececcc50f6ee8bcdd587dab3143324..c4bf7f86a7e9d188ff5435067150149641635724 100644 (file)
@@ -138,7 +138,7 @@ Plane* ResourceManager::reserve_plane(Crtc* crtc, PlaneType type, PixelFormat fo
                return nullptr;
 
        for (Plane* plane : crtc->get_possible_planes()) {
                return nullptr;
 
        for (Plane* plane : crtc->get_possible_planes()) {
-               if (plane->plane_type() == type)
+               if (plane->plane_type() != type)
                        continue;
 
                if (format != PixelFormat::Undefined && !plane->supports_format(format))
                        continue;
 
                if (format != PixelFormat::Undefined && !plane->supports_format(format))