Since splash screen is shown only on the first scanout, there is no need to allocate resources for next connectors.
Signed-off-by: Vasyl Vavrychuk <[email protected]> --- psplash-drm.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/psplash-drm.c b/psplash-drm.c index 2468cf1..5e56286 100644 --- a/psplash-drm.c +++ b/psplash-drm.c @@ -39,6 +39,8 @@ #include <xf86drmMode.h> #include "psplash-drm.h" +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + struct modeset_dev; static int modeset_find_crtc(int fd, drmModeRes *res, drmModeConnector *conn, struct modeset_dev *dev); @@ -196,8 +198,10 @@ static int modeset_prepare(int fd) return -errno; } - /* iterate all connectors */ - for (i = 0; i < res->count_connectors; ++i) { + /* ~iterate all connectors~ - Use first connector if present. It is + optimization related workaround since psplash supports drawing splash + screen on one scanout anyway. */ + for (i = 0; i < MIN(res->count_connectors, 1); ++i) { /* get information for each connector */ conn = drmModeGetConnector(fd, res->connectors[i]); if (!conn) { -- 2.30.2
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#56868): https://lists.yoctoproject.org/g/yocto/message/56868 Mute This Topic: https://lists.yoctoproject.org/mt/90680292/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
