[cogl] Remove old fallback for vblank wait via manual drm ioctl
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl] Remove old fallback for vblank wait via manual drm ioctl
- Date: Thu, 5 Jan 2012 20:37:39 +0000 (UTC)
commit 3bc70687ac92b237febeb0f369394e8e6bea9d53
Author: Robert Bragg <robert linux intel com>
Date: Thu Jan 5 20:21:51 2012 +0000
Remove old fallback for vblank wait via manual drm ioctl
This workaround code has just been incrementally carried forward since
Cogl was integrated with Clutter but really we have no idea when this
code path was ever tested. Since the work around is from before the time
of the current Cogl developers we don't know anything about the
circumstances which led to this extreme workaround instead of pushing to
fix a driver.
It seems pretty likely we can push to fix any drm based drivers so
we're removing the workaround.
https://bugzilla.gnome.org/show_bug.cgi?id=667009
Reviewed-by: Neil Roberts <neil linux intel com>
cogl/winsys/cogl-winsys-glx.c | 50 -----------------------------------------
1 files changed, 0 insertions(+), 50 deletions(-)
---
diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c
index 8779af6..113d4d9 100644
--- a/cogl/winsys/cogl-winsys-glx.c
+++ b/cogl/winsys/cogl-winsys-glx.c
@@ -61,12 +61,6 @@
#include <GL/glx.h>
#include <X11/Xlib.h>
-#ifdef HAVE_DRM
-#include <drm.h>
-#include <sys/ioctl.h>
-#include <errno.h>
-#endif
-
#define COGL_ONSCREEN_X11_EVENT_MASK StructureNotifyMask
#define MAX_GLX_CONFIG_ATTRIBS 30
@@ -432,20 +426,6 @@ update_winsys_features (CoglContext *context, GError **error)
COGL_WINSYS_FEATURE_VBLANK_WAIT,
TRUE);
-#ifdef HAVE_DRM
- /* drm is really an extreme fallback -rumoured to work with Via
- * chipsets... */
- if (!glx_renderer->pf_glXWaitVideoSync)
- {
- if (glx_renderer->dri_fd < 0)
- glx_renderer->dri_fd = open("/dev/dri/card0", O_RDWR);
- if (glx_renderer->dri_fd >= 0)
- COGL_FLAGS_SET (context->winsys_features,
- COGL_WINSYS_FEATURE_VBLANK_WAIT,
- TRUE);
- }
-#endif
-
if (glx_renderer->pf_glXCopySubBuffer || context->glBlitFramebuffer)
COGL_FLAGS_SET (context->winsys_features,
COGL_WINSYS_FEATURE_SWAP_REGION, TRUE);
@@ -1097,24 +1077,6 @@ _cogl_winsys_onscreen_bind (CoglOnscreen *onscreen)
glx_context->current_drawable = drawable;
}
-#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
_cogl_winsys_wait_for_vblank (void)
{
@@ -1133,18 +1095,6 @@ _cogl_winsys_wait_for_vblank (void)
(current_count + 1) % 2,
¤t_count);
}
-#ifdef HAVE_DRM
- else
- {
- drm_wait_vblank_t blank;
-
- COGL_NOTE (WINSYS, "Waiting for vblank (drm)");
- blank.request.type = _DRM_VBLANK_RELATIVE;
- blank.request.sequence = 1;
- blank.request.signal = 0;
- drm_wait_vblank (glx_renderer->dri_fd, &blank);
- }
-#endif /* HAVE_DRM */
}
static guint32
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]