Add more basic debugging to KMS/EGL.

This commit is contained in:
Themaister 2013-02-15 10:26:45 +01:00
parent a131f484ef
commit 076f7ea22e
1 changed files with 5 additions and 1 deletions

View File

@ -288,7 +288,7 @@ static bool gfx_ctx_init(void)
g_connector = NULL;
}
// TODO: Figure out what index for crtcs to use ...
// TODO: Figure out what index for crtcs to use for orig_crtc ...
g_orig_crtc = drmModeGetCrtc(g_drm_fd, g_resources->crtcs[0]);
if (!g_orig_crtc)
RARCH_WARN("[KMS/EGL]: Cannot find original CRTC.\n");
@ -302,6 +302,7 @@ static bool gfx_ctx_init(void)
for (int i = 0, area = 0; i < g_connector->count_modes; i++)
{
drmModeModeInfo *current_mode = &g_connector->modes[i];
//RARCH_ERR("[KMS/EGL]: Found mode: \"%s\".\n", current_mode->name);
int current_area = current_mode->hdisplay * current_mode->vdisplay;
if (current_area > area)
{
@ -310,6 +311,7 @@ static bool gfx_ctx_init(void)
}
}
if (!g_drm_mode)
{
RARCH_ERR("[KMS/EGL]: Couldn't find DRM mode.\n");
@ -381,6 +383,8 @@ static struct drm_fb *drm_fb_get_from_bo(struct gbm_bo *bo)
unsigned stride = gbm_bo_get_stride(bo);
unsigned handle = gbm_bo_get_handle(bo).u32;
RARCH_LOG("[KMS/EGL]: New FB: %ux%u (stride: %u).\n", width, height, stride);
int ret = drmModeAddFB(g_drm_fd, width, height, 24, 32, stride, handle, &fb->fb_id);
if (ret < 0)
{