Merge pull request #1430 from tobiasjakobi/fixes

exynos_gfx fixes
This commit is contained in:
Twinaphex 2015-02-20 15:12:02 +01:00
commit 7f10904809

View File

@ -1,5 +1,5 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2013-2014 - Tobias Jakobi
* Copyright (C) 2013-2015 - Tobias Jakobi
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@ -743,6 +743,7 @@ static int exynos_init(struct exynos_data *pdata, unsigned bpp)
}
drm->crtc_id = drm->encoder->crtc_id;
drm->connector_id = drm->connector->connector_id;
drm->orig_crtc = drmModeGetCrtc(fd, drm->crtc_id);
if (!drm->orig_crtc)
RARCH_WARN("video_exynos: cannot find original crtc\n");
@ -873,13 +874,17 @@ static int exynos_alloc(struct exynos_data *pdata)
}
}
/* Setup CRTC: display the last allocated page. */
if (drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, pages[pdata->num_pages - 1].buf_id,
0, 0, &pdata->drm->connector_id, 1, pdata->drm->mode))
{
RARCH_ERR("video_exynos: initial crtc setup failed\n");
goto fail;
}
pdata->pages = pages;
pdata->device = device;
/* Setup CRTC: display the last allocated page. */
drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, pages[pdata->num_pages - 1].buf_id,
0, 0, &pdata->drm->connector_id, 1, pdata->drm->mode);
return 0;
fail:
@ -897,8 +902,9 @@ static void exynos_free(struct exynos_data *pdata)
unsigned i;
/* Disable the CRTC. */
drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, 0,
0, 0, &pdata->drm->connector_id, 1, NULL);
if (drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, 0,
0, 0, &pdata->drm->connector_id, 1, NULL))
RARCH_WARN("video_exynos: failed to disable the crtc\n");
clean_up_pages(pdata->pages, pdata->num_pages);
@ -910,6 +916,9 @@ static void exynos_free(struct exynos_data *pdata)
exynos_bo_destroy(pdata->buf[i]);
pdata->buf[i] = NULL;
}
exynos_device_destroy(pdata->device);
pdata->device = NULL;
}
#if (EXYNOS_GFX_DEBUG_LOG == 1)