diff --git a/cogl.spec b/cogl.spec index 80bbde3..950295a 100644 --- a/cogl.spec +++ b/cogl.spec @@ -6,13 +6,14 @@ Name: cogl Version: 1.22.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A library for using 3D graphics hardware to draw pretty pictures Group: Development/Libraries License: LGPLv2+ URL: http://www.clutter-project.org/ Source0: http://download.gnome.org/sources/cogl/1.22/cogl-%{version}.tar.xz +Patch0: fix-black-login-screen.patch BuildRequires: cairo-devel BuildRequires: chrpath @@ -88,6 +89,7 @@ This package contains the installable tests for %{cogl}. %prep %setup -q +%patch0 -p1 -b .fix-black-login-screen %build CFLAGS="$RPM_OPT_FLAGS -fPIC" @@ -153,6 +155,10 @@ chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libcogl-pango.so %endif %changelog +* Wed Oct 21 2015 Ray Strode 1.22.0-2 +- Fix black login screen + Resolves: #1272737 + * Wed Sep 16 2015 Kalev Lember - 1.22.0-1 - Update to 1.22.0 diff --git a/fix-black-login-screen.patch b/fix-black-login-screen.patch new file mode 100644 index 0000000..14e16d3 --- /dev/null +++ b/fix-black-login-screen.patch @@ -0,0 +1,106 @@ +From 8aced2158d389d3dcb75710f92db0cee97ad397f Mon Sep 17 00:00:00 2001 +From: Ray Strode +Date: Wed, 21 Oct 2015 15:47:01 -0400 +Subject: [PATCH] kms-winsys: don't wait for a flip when page flipping fails + +If we get EACCES from drmPageFlip we're not going to get +a flip event and shouldn't wait for one. + +This commit changes the EACCES path to silently ignore the +failed flip request and just clean up the fb. +--- + cogl/winsys/cogl-winsys-egl-kms.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/cogl/winsys/cogl-winsys-egl-kms.c b/cogl/winsys/cogl-winsys-egl-kms.c +index 20c325c..b460907 100644 +--- a/cogl/winsys/cogl-winsys-egl-kms.c ++++ b/cogl/winsys/cogl-winsys-egl-kms.c +@@ -563,81 +563,82 @@ setup_crtc_modes (CoglDisplay *display, int fb_id) + CoglRendererKMS *kms_renderer = egl_renderer->platform; + GList *l; + + for (l = kms_display->crtcs; l; l = l->next) + { + CoglKmsCrtc *crtc = l->data; + + int ret = drmModeSetCrtc (kms_renderer->fd, + crtc->id, + fb_id, crtc->x, crtc->y, + crtc->connectors, crtc->count, + crtc->count ? &crtc->mode : NULL); + if (ret) + g_warning ("Failed to set crtc mode %s: %m", crtc->mode.name); + } + } + + static void + flip_all_crtcs (CoglDisplay *display, CoglFlipKMS *flip, int fb_id) + { + CoglDisplayEGL *egl_display = display->winsys; + CoglDisplayKMS *kms_display = egl_display->platform; + CoglRendererEGL *egl_renderer = display->renderer->winsys; + CoglRendererKMS *kms_renderer = egl_renderer->platform; + GList *l; + gboolean needs_flip = FALSE; + + for (l = kms_display->crtcs; l; l = l->next) + { + CoglKmsCrtc *crtc = l->data; +- int ret; ++ int ret = 0; + + if (crtc->count == 0 || crtc->ignore) + continue; + + needs_flip = TRUE; + + if (!kms_renderer->page_flips_not_supported) + { + ret = drmModePageFlip (kms_renderer->fd, + crtc->id, fb_id, + DRM_MODE_PAGE_FLIP_EVENT, flip); + if (ret != 0 && ret != -EACCES) + { + g_warning ("Failed to flip: %m"); + kms_renderer->page_flips_not_supported = TRUE; + break; + } + } + +- flip->pending++; ++ if (ret == 0) ++ flip->pending++; + } + + if (kms_renderer->page_flips_not_supported && needs_flip) + flip->pending = 1; + } + + static void + crtc_free (CoglKmsCrtc *crtc) + { + g_free (crtc->connectors); + g_slice_free (CoglKmsCrtc, crtc); + } + + static CoglKmsCrtc * + crtc_copy (CoglKmsCrtc *from) + { + CoglKmsCrtc *new; + + new = g_slice_new (CoglKmsCrtc); + + *new = *from; + new->connectors = g_memdup (from->connectors, from->count * sizeof(uint32_t)); + + return new; + } + + static CoglBool + _cogl_winsys_egl_display_setup (CoglDisplay *display, + CoglError **error) + { +-- +2.5.0 +