Comment 10 for bug 345796

Revision history for this message
In , Jesse Barnes (jbarnes-virtuousgeek) wrote :

I think this is fixed upstream already, can you try git master or this patch on top of your 2.6.3 driver?

commit 74d0713e002a9781ed00fdd10eb6f75907ae796c
Author: Kalev Lember <email address hidden>
Date: Fri Mar 20 02:21:41 2009 +0200

    Fix VT switch with XV overlay video enabled.

    drm_intel_bo_unpin() was called with NULL argument.

    Signed-off-by: Kalev Lember <email address hidden>

diff --git a/src/i830_video.c b/src/i830_video.c
index 3c6fbf3..3f3aaac 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -1048,11 +1048,14 @@ I830StopVideo(ScrnInfoPtr pScrn, pointer data, Bool shut
        if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
            i830_overlay_off(pScrn);
        }
- if (!pPriv->textured)
- drm_intel_bo_unpin(pPriv->buf);
- drm_intel_bo_unreference(pPriv->buf);
- pPriv->buf = NULL;
- pPriv->videoStatus = 0;
+
+ if (pPriv->buf) {
+ if (!pPriv->textured)
+ drm_intel_bo_unpin(pPriv->buf);
+ drm_intel_bo_unreference(pPriv->buf);
+ pPriv->buf = NULL;
+ pPriv->videoStatus = 0;
+ }
     } else {
        if (pPriv->videoStatus & CLIENT_VIDEO_ON) {
            pPriv->videoStatus |= OFF_TIMER;