return FALSE;
}
+ if (!ms->api)
+ ms->api = drm_api_create();
+
if (!ms->screen) {
ms->screen = ms->api->create_screen(ms->api, ms->fd, NULL);
xf86CrtcPtr crtc = output->crtc;
if (crtc && crtc->enabled) {
- crtc->funcs->mode_set(crtc, pScrn->currentMode, pScrn->currentMode, x,
- y);
+ crtc->funcs->set_mode_major(crtc, pScrn->currentMode,
+ RR_Rotate_0, x, y);
crtc->x = output->initial_x + x;
crtc->y = output->initial_y + y;
}
if (ms->exa)
xorg_exa_close(pScrn);
- if (ms->api->destroy)
+ if (ms->api && ms->api->destroy)
ms->api->destroy(ms->api);
ms->api = NULL;