summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/via_driver.c7
-rw-r--r--src/via_lvds.c3
2 files changed, 9 insertions, 1 deletions
diff --git a/src/via_driver.c b/src/via_driver.c
index 1d3b78e..139a0c3 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -874,18 +874,25 @@ via_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height)
ret = xf86CrtcSetMode(crtc, &crtc->mode, crtc->rotation,
crtc->x, crtc->y);
if (!ret) {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "SetMode !ret so we reset front_bo\n");
drmmode->front_bo = old_front;
drmmode->fb_id = old_fb_id;
break;
#ifdef HAVE_DRI
} else {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "SetMode ret so we cleanup old front_bo\n");
if (pVia->KMS && old_fb_id)
drmModeRmFB(drmmode->fd, old_fb_id);
#endif
}
}
+
if (ret) {
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "More cleanup old front_bo\n");
drm_bo_unmap(scrn, old_front);
drm_bo_free(scrn, old_front);
return ret;
diff --git a/src/via_lvds.c b/src/via_lvds.c
index e4e5cdf..0dcc64a 100644
--- a/src/via_lvds.c
+++ b/src/via_lvds.c
@@ -1295,6 +1295,7 @@ ViaPanelLookUpModeIndex(int width, int height)
static xf86OutputStatus
via_lvds_detect(xf86OutputPtr output)
{
+ static const char xoId[] = "OLPC XO 1.5";
xf86OutputStatus status = XF86OutputStatusDisconnected;
ViaPanelInfoPtr panel = output->driver_private;
ScrnInfoPtr pScrn = output->scrn;
@@ -1302,7 +1303,7 @@ via_lvds_detect(xf86OutputPtr output)
vgaHWPtr hwp = VGAHWPTR(pScrn);
/* Hardcode panel size for the XO */
- if (pVia->Id->String == "OLPC XO 1.5") {
+ if(strcmp(pVia->Id->String, xoId) == 0) {
panel->NativeWidth = 1200;
panel->NativeHeight = 900;
status = XF86OutputStatusConnected;