device->drmFD = drmFD;
if (!intel_init_driver(device)) {
- printf("EGL: failed to initalize device\n");
free(device);
+ return NULL;
}
return device;
}
}
-static void
-print_modes(drmModeConnectorPtr connector)
-{
- struct drm_mode_modeinfo *m;
- int i;
-
- for (i = 0; i < connector->count_modes; i++) {
- m = &connector->modes[i];
- printf("dfm %p %i %i %i\n", m, m->hdisplay, m->vdisplay, m->vrefresh);
- }
-}
-
static EGLBoolean
drm_initialize(_EGLDriver *drv, EGLDisplay dpy, EGLint *major, EGLint *minor)
{
- printf("%s enter\n", __FUNCTION__);
_EGLDisplay *disp = _eglLookupDisplay(dpy);
struct drm_driver *drm_drv = (struct drm_driver *)drv;
struct drm_screen *screen = NULL;
DRM_BO_FLAG_NO_EVICT,
DRM_BO_HINT_DONT_FENCE, &scrn->buffer);
- if (ret) {
- printf("failed to create framebuffer (ret %d)\n", ret);
+ if (ret)
return EGL_FALSE;
- }
prettyColors(drm_drv->device->drmFD, scrn->buffer.handle, pitch);
goto err_bo;
scrn->mode = drm_find_mode(scrn->connector, mode);
- if (!scrn->mode) {
- printf("oh noes, no matching mode found\n");
+ if (!scrn->mode)
goto err_fb;
- }
ret = drmModeSetCrtc(
drm_drv->device->drmFD,
_eglMain(_EGLDisplay *dpy, const char *args)
{
struct drm_driver *drm;
- printf("%s enter\n", __FUNCTION__);
drm = (struct drm_driver *) calloc(1, sizeof(struct drm_driver));
if (!drm) {