remove drm vsync hack

This commit is contained in:
Adam Jackson 2011-06-24 13:33:52 -04:00
parent 17923e4bfc
commit 95844ed8d5
2 changed files with 97 additions and 1 deletions

View File

@ -0,0 +1,90 @@
diff -up clutter-1.6.16/clutter/glx/clutter-backend-glx.c.jx clutter-1.6.16/clutter/glx/clutter-backend-glx.c
--- clutter-1.6.16/clutter/glx/clutter-backend-glx.c.jx 2011-06-24 13:30:13.000000000 -0400
+++ clutter-1.6.16/clutter/glx/clutter-backend-glx.c 2011-06-24 13:31:25.298367259 -0400
@@ -361,29 +361,6 @@ clutter_backend_glx_get_features (Clutte
CLUTTER_NOTE (BACKEND, "glXGetVideoSyncSGI vblank setup failed");
}
-#ifdef __linux__
- /*
- * DRI is really an extreme fallback -rumoured to work with Via chipsets
- */
- if (!(flags & CLUTTER_FEATURE_SYNC_TO_VBLANK))
- {
- CLUTTER_NOTE (BACKEND, "attempting DRI vblank setup");
-
- backend_glx->dri_fd = open("/dev/dri/card0", O_RDWR);
- if (backend_glx->dri_fd >= 0)
- {
- CLUTTER_NOTE (BACKEND, "DRI vblank setup success");
-
- backend_glx->vblank_type = CLUTTER_VBLANK_DRI;
- flags |= CLUTTER_FEATURE_SYNC_TO_VBLANK;
-
- goto vblank_setup_done;
- }
-
- CLUTTER_NOTE (BACKEND, "DRI vblank setup failed");
- }
-#endif /* __linux__ */
-
CLUTTER_NOTE (BACKEND, "no use-able vblank mechanism found");
vblank_setup_done:
diff -up clutter-1.6.16/clutter/glx/clutter-stage-glx.c.jx clutter-1.6.16/clutter/glx/clutter-stage-glx.c
--- clutter-1.6.16/clutter/glx/clutter-stage-glx.c.jx 2011-06-14 08:37:35.000000000 -0400
+++ clutter-1.6.16/clutter/glx/clutter-stage-glx.c 2011-06-24 13:30:55.684264807 -0400
@@ -48,10 +48,6 @@
#include <fcntl.h>
#include <errno.h>
-#ifdef HAVE_DRM
-#include <drm.h>
-#endif
-
static void clutter_stage_window_iface_init (ClutterStageWindowIface *iface);
static void clutter_event_translator_iface_init (ClutterEventTranslatorIface *iface);
@@ -311,24 +307,6 @@ clutter_stage_glx_add_redraw_clip (Clutt
stage_glx->initialized_redraw_clip = TRUE;
}
-#ifdef HAVE_DRM
-static int
-drm_wait_vblank(int fd, drm_wait_vblank_t *vbl)
-{
- int ret, rc;
-
- do
- {
- ret = ioctl(fd, DRM_IOCTL_WAIT_VBLANK, vbl);
- vbl->request.type &= ~_DRM_VBLANK_RELATIVE;
- rc = errno;
- }
- while (ret && rc == EINTR);
-
- return rc;
-}
-#endif /* HAVE_DRM */
-
static void
wait_for_vblank (ClutterBackendGLX *backend_glx)
{
@@ -347,17 +325,7 @@ wait_for_vblank (ClutterBackendGLX *back
}
else
{
-#ifdef HAVE_DRM
- drm_wait_vblank_t blank;
-
- CLUTTER_NOTE (BACKEND, "Waiting for vblank (drm)");
- blank.request.type = _DRM_VBLANK_RELATIVE;
- blank.request.sequence = 1;
- blank.request.signal = 0;
- drm_wait_vblank (backend_glx->dri_fd, &blank);
-#else
CLUTTER_NOTE (BACKEND, "No vblank mechanism found");
-#endif /* HAVE_DRM */
}
}

View File

@ -1,6 +1,6 @@
Name: clutter
Version: 1.6.16
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Open Source software library for creating rich graphical user interfaces
Group: Development/Libraries
@ -13,6 +13,7 @@ Patch1: 0001-docs-Use-const-instead-G_CONST_RETURN.patch
Patch2: 0002-cogl-Use-const-instead-G_CONST_RETURN.patch
Patch3: 0003-cally-Use-const-instead-G_CONST_RETURN.patch
Patch4: 0004-clutter-Use-const-instead-G_CONST_RETURN.patch
Patch5: clutter-1.6.16-no-drm-hax.patch
BuildRequires: glib2-devel mesa-libGL-devel pkgconfig pango-devel
BuildRequires: cairo-gobject-devel gdk-pixbuf2-devel atk-devel
@ -62,6 +63,7 @@ This package contains documentation for clutter.
%patch2 -p1 -b .const-2
%patch3 -p1 -b .const-3
%patch4 -p1 -b .const-4
%patch5 -p1 -b .no-drm-hax
%build
(if ! test -x configure; then NOCONFIGURE=1 ./autogen.sh; CONFIGFLAGS=--enable-gtk-doc; fi;
@ -110,6 +112,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%{_datadir}/gtk-doc/html/cally
%changelog
* Fri Jun 24 2011 Adam Jackson <ajax@redhat.com> 1.6.16-3
- clutter-1.6.16-no-drm-hax.patch: Remove the insane DRM-banging fallback for
sync to vblank.
* Fri Jun 17 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.6.16-2
- Fix G_CONST_RETURN usage