mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
exynos_gfx: handle drmModeSetCrtc failing
This shouldn't happen anymore after the connector ID fix, but the checks don't hurt and protect us from future mishaps.
This commit is contained in:
parent
551123d4d6
commit
cf3eea13df
@ -874,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:
|
||||
@ -898,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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user