clutter/clutter-1.6.16-no-drm-hax.patch

91 lines
2.7 KiB
Diff
Raw Normal View History

2011-06-24 17:33:52 +00:00
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 */
}
}