Eric Engestrom <eric.engest...@intel.com> writes: > + /* if there's a plane is active on the connector's crtc, pick it */ > + for (size_t i = 0; i < plane_res->count_planes; i++) { > + drmModePlane *plane = drmModeGetPlane(wsi->fd, plane_res->planes[i]); > + if (!plane) > + continue;
I think you can do these three operations in a single walk of the planes; it's obviously not performance critical, but I think squashing them together would reduce the amount of duplicate code and make it at least shorter to read. Just find three plane ids -- one in use on the crtc, one compatible with the crtc and one idle one, then select the one to use after the loop is over. -- -keith
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev