From: Tomi Valkeinen Date: Thu, 30 Mar 2017 11:35:06 +0000 (+0300) Subject: resmgr: fix reserve_plane() X-Git-Url: https://git.ti.com/gitweb?p=android%2Fexternal-libkmsxx.git;a=commitdiff_plain;h=3db1349b163b9d9291db3d0f001664968f5f9943;hp=273494aa2d3836110d6a2c73c9e00503c711b01c resmgr: fix reserve_plane() reserve_plane() had inverted check, and looked for any plane type but the one that was requested. Signed-off-by: Tomi Valkeinen --- diff --git a/kms++util/src/resourcemanager.cpp b/kms++util/src/resourcemanager.cpp index f751147..c4bf7f8 100644 --- a/kms++util/src/resourcemanager.cpp +++ b/kms++util/src/resourcemanager.cpp @@ -138,7 +138,7 @@ Plane* ResourceManager::reserve_plane(Crtc* crtc, PlaneType type, PixelFormat fo 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))