mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +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->pages = pages;
|
||||||
pdata->device = device;
|
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;
|
return 0;
|
||||||
|
|
||||||
fail:
|
fail:
|
||||||
@ -898,8 +902,9 @@ static void exynos_free(struct exynos_data *pdata)
|
|||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
/* Disable the CRTC. */
|
/* Disable the CRTC. */
|
||||||
drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, 0,
|
if (drmModeSetCrtc(pdata->fd, pdata->drm->crtc_id, 0,
|
||||||
0, 0, &pdata->drm->connector_id, 1, NULL);
|
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);
|
clean_up_pages(pdata->pages, pdata->num_pages);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user