diff options
author | Alan Hourihane <[email protected]> | 2008-08-17 21:55:37 +0100 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2008-08-17 21:55:37 +0100 |
commit | 9bbc55116f36a357ee75d2766b0adb039eaca806 (patch) | |
tree | a410c1afc4ef0ee20561df660ad1d490be0f1f71 | |
parent | ccf1910dd4b2a8ccd04ddbdf725b6dd3f8026eee (diff) |
if we can't find a mode, return first. At least we should
see the top left portion if we've got larger screens on
other CRTC's
-rw-r--r-- | src/gallium/winsys/drm/intel/egl/intel_egl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/winsys/drm/intel/egl/intel_egl.c b/src/gallium/winsys/drm/intel/egl/intel_egl.c index b89c5c508ac..3204ed3131c 100644 --- a/src/gallium/winsys/drm/intel/egl/intel_egl.c +++ b/src/gallium/winsys/drm/intel/egl/intel_egl.c @@ -571,7 +571,7 @@ drm_find_mode(drmModeConnectorPtr connector, _EGLMode *mode) m = &connector->modes[i]; if (m->hdisplay == mode->Width && m->vdisplay == mode->Height && m->vrefresh == mode->RefreshRate) break; - m = NULL; + m = &connector->modes[0]; /* if we can't find one, return first */ } return m; @@ -654,12 +654,12 @@ drm_show_screen_surface_mesa(_EGLDriver *drv, EGLDisplay dpy, if (!scrn->fb) goto err_bo; - scrn->mode = drm_find_mode(scrn->connector, mode); - if (!scrn->mode) - goto err_fb; - for (j = 0; j < drm_drv->res->count_connectors; j++) { drmModeConnector *con = drmModeGetConnector(drm_drv->device->drmFD, drm_drv->res->connectors[j]); + scrn->mode = drm_find_mode(con, mode); + if (!scrn->mode) + goto err_fb; + for (k = 0; k < con->count_encoders; k++) { drmModeEncoder *enc = drmModeGetEncoder(drm_drv->device->drmFD, con->encoders[k]); for (i = 0; i < drm_drv->res->count_crtcs; i++) { |