xf86-video-intel: src/drmmode_display.c src/i830_driver.c src/i830.h
Jesse Barnes
jbarnes at kemper.freedesktop.org
Tue Oct 13 10:52:33 PDT 2009
src/drmmode_display.c | 15 +++++++++++++++
src/i830.h | 1 +
src/i830_driver.c | 1 +
3 files changed, 17 insertions(+)
New commits:
commit fcc2ee48b866b81c79315ff10189b56fc201539d
Author: Albert Damen <albrt at gmx.net>
Date: Wed Oct 7 21:55:42 2009 +0200
Drop frontbuffer from crtc in I830CloseScreen
By dropping the frontbuffer from the crtc, the new frontbuffer
can be properly added to the crtc when the xserver is reset.
Signed-off-by: Albert Damen <albrt at gmx.net>
diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index c2ef514..472bc74 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -1429,3 +1429,18 @@ drmmode_crtc_id(xf86CrtcPtr crtc)
return drmmode_crtc->mode_crtc->crtc_id;
}
+
+void drmmode_closefb(ScrnInfoPtr scrn)
+{
+ xf86CrtcConfigPtr xf86_config;
+ drmmode_crtc_private_ptr drmmode_crtc;
+ drmmode_ptr drmmode;
+
+ xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
+
+ drmmode_crtc = xf86_config->crtc[0]->driver_private;
+ drmmode = drmmode_crtc->drmmode;
+
+ drmModeRmFB(drmmode->fd, drmmode->fb_id);
+ drmmode->fb_id = 0;
+}
diff --git a/src/i830.h b/src/i830.h
index 7a64f00..2d7fc5b 100644
--- a/src/i830.h
+++ b/src/i830.h
@@ -330,6 +330,7 @@ Bool I830DRI2ScreenInit(ScreenPtr pScreen);
void I830DRI2CloseScreen(ScreenPtr pScreen);
extern Bool drmmode_pre_init(ScrnInfoPtr scrn, int fd, int cpp);
+extern void drmmode_closefb(ScrnInfoPtr scrn);
extern int drmmode_get_pipe_from_crtc_id(drm_intel_bufmgr * bufmgr,
xf86CrtcPtr crtc);
extern int drmmode_output_dpms_status(xf86OutputPtr output);
diff --git a/src/i830_driver.c b/src/i830_driver.c
index 47bc4df..8b5e946 100644
--- a/src/i830_driver.c
+++ b/src/i830_driver.c
@@ -1519,6 +1519,7 @@ static Bool I830CloseScreen(int scrnIndex, ScreenPtr screen)
}
if (intel->front_buffer) {
i830_set_pixmap_bo(screen->GetScreenPixmap(screen), NULL);
+ drmmode_closefb(scrn);
i830_free_memory(scrn, intel->front_buffer);
intel->front_buffer = NULL;
}
More information about the xorg-commit
mailing list