On Fri, Sep 21, 2007 at 07:54:03PM +0200, Helko Glathe wrote:
> Hi.
> 
> I've installed google-earth. Everytime starting googleearth the complete 
> system freezes after few minutes while googleearth is running.
> My computer has an Intel 82945GM (945GM GMCH) graphic device.
> I've also tried to use the intel driver and i810 driver in my xorg.conf. But 
> behaviour of googleearth is the same.
> 
> System version:
> FreeBSD FreeBSD_TWS29. 6.2-STABLE FreeBSD 6.2-STABLE #1: Sat Apr 28 15:25:05 
> CEST 2007     [EMAIL PROTECTED]:/usr/obj/usr/src/sys/MYKERNEL62  i386
> 
> Port version:
> google-earth-4.2.198.2451
> 
> Graphics device: 
> agp0: <Intel 82945GM (945GM GMCH) SVGA controller> port 0x1800-0x1807 mem 
> 0xd8100000-0xd817ffff,0xc0000000-0xcfffffff,
> 0xd8200000-0xd823ffff irq 16 at device 2.0 on pci0
> 
> XORG configuration:
> Section "ServerLayout"
>       Identifier     "X.org Configured"
>       Screen         "Screen0"
>       InputDevice    "Mouse0" "CorePointer"
>       InputDevice    "Keyboard0" "CoreKeyboard"
> #Option         "AIGLX" "True"
> EndSection
> 
> Section "Files"
>       RgbPath      "/usr/local/lib/X11/rgb"
>       ModulePath   "/usr/local/lib/xorg/modules"
>       FontPath     "/usr/local/lib/X11/fonts/misc/"
>       FontPath     "/usr/local/lib/X11/fonts/TTF/"
>       FontPath     "/usr/local/lib/X11/fonts/Type1/"
>       FontPath     "/usr/local/lib/X11/fonts/CID/"
>       FontPath     "/usr/local/lib/X11/fonts/75dpi/"
>       FontPath     "/usr/local/lib/X11/fonts/100dpi/"
> EndSection
> 
> Section "Module"
>         Load  "dri"
>         Load  "glx"
>         Load  "dbe"
>       Load  "vbe"
>         Load  "extmod"
>         Load  "type1"
>         Load  "freetype"
>         Load  "i2c"
>       Load  "bitmap"
>       Load  "ddc"
>       Load  "int10"
> # Originals commented out
>         #Load  "speedo"
> #       SubSection "extmod"
> #                         Option "omit xfree86-dga"
> #       EndSubSection
> EndSection
> 
> Section "InputDevice"
>       Identifier  "Keyboard0"
>       Driver      "kbd"
>         Option     "XkbModel" "pc105"
>         Option      "XkbLayout" "de_DE"
>         Option      "XkbRules" "xorg"
> EndSection
> 
> Section "InputDevice"
>    Identifier      "Mouse0"
>    Driver          "mouse"
>    Option          "Protocol" "auto"
>    Option          "Device" "/dev/sysmouse"
>    Option          "Buttons" "5"
>    Option          "ZAxisMapping" "4 5"
> EndSection         
> 
> Section "Monitor"
>         Identifier   "Generic Monitor"
>         HorizSync 28-64
>         VertRefresh 43-60
>         DisplaySize     264 165
>         Option            "DPMS"
> EndSection
> 
> Section "Device"
>         ### Available Driver options are:-
>         ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
>         ### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
>         Identifier    "Intel Corporation Mobile Integrated Graphics 
> Controller"
>       Driver          "i810"
>       BusID           "PCI:0:2:0"
>         Option                "DRI" "on"
> Option      "XAANoOffscreenPixmaps"  "true"
> EndSection
> 
> Section "Screen"
>       Identifier "Screen0"
>       Device     "Intel Corporation Mobile Integrated Graphics Controller"
>       Monitor    "Generic Monitor"
>         DefaultDepth 24
>         SubSection "Display"
>                 Depth   1
>                 Modes   "1280x800"
>         EndSubSection
>       SubSection "Display"
>               Depth   4
>               Modes   "1280x800"
>       EndSubSection
>       SubSection "Display"
>               Depth   8
>               Modes   "1280x800"
>       EndSubSection
>       SubSection "Display"
>               Depth   15
>               Modes   "1280x800"
>       EndSubSection
>       SubSection "Display"
>               Depth   16
>               Modes   "1280x800"
>       EndSubSection
>       SubSection "Display"
>               Depth   24
>               Modes   "1280x800"
> #             Virtual 1440 900
>       EndSubSection
> EndSection
> 
> Section "DRI"
>   Mode         0666
> EndSection
> 
> Section "Extensions"
> Option        "Composite" "true"
> EndSection

Does dmesg show anything suspicious while running application ?
Also, just in case, try the patch below and report whether it helps.

diff --git a/sys/dev/drm/i915_dma.c b/sys/dev/drm/i915_dma.c
index 16955bd..69854b4 100644
--- a/sys/dev/drm/i915_dma.c
+++ b/sys/dev/drm/i915_dma.c
@@ -366,20 +366,14 @@ static int i915_emit_cmds(drm_device_t * dev, int __user 
* buffer, int dwords)
        for (i = 0; i < dwords;) {
                int cmd, sz;
 
-            if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], sizeof(cmd))) {
-
-                       return DRM_ERR(EINVAL);
-             }
+               cmd = buffer[i];
                if ((sz = validate_cmd(cmd)) == 0 || i + sz > dwords)
                        return DRM_ERR(EINVAL);
 
                OUT_RING(cmd);
 
                while (++i, --sz) {
-                       if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i],
-                                                        sizeof(cmd))) {
-                               return DRM_ERR(EINVAL);
-                       }
+                       cmd = buffer[i];
                        OUT_RING(cmd);
                }
        }
@@ -400,10 +394,7 @@ static int i915_emit_box(drm_device_t * dev,
        drm_clip_rect_t box;
        RING_LOCALS;
 
-       if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) {
-               return EFAULT;
-       }
-
+       box = boxes[i];
        if (box.y2 <= box.y1 || box.x2 <= box.x1 || box.y2 <= 0 || box.x2 <= 0) 
{
                DRM_ERROR("Bad box %d,%d..%d,%d\n",
                          box.x1, box.y1, box.x2, box.y2);
@@ -603,6 +594,7 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS)
        drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *)
            dev_priv->sarea_priv;
        drm_i915_batchbuffer_t batch;
+       size_t cliplen;
        int ret;
 
        if (!dev_priv->allow_batchbuffer) {
@@ -618,14 +610,25 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS)
 
        LOCK_TEST_WITH_RETURN(dev, filp);
 
+       DRM_UNLOCK();
+       cliplen = batch.num_cliprects * sizeof(drm_clip_rect_t);        
        if (batch.num_cliprects && DRM_VERIFYAREA_READ(batch.cliprects,
-                                                      batch.num_cliprects *
-                                                      sizeof(drm_clip_rect_t)))
+                                                      cliplen)) {
+               DRM_LOCK();
                return DRM_ERR(EFAULT);
-
+       }
+       ret = vslock(batch.cliprects, cliplen);
+       if (ret) {
+               DRM_ERROR("Fault wiring cliprects\n");
+               DRM_LOCK();
+               return DRM_ERR(EFAULT);
+       }
+       DRM_LOCK();
        ret = i915_dispatch_batchbuffer(dev, &batch);
-
        sarea_priv->last_dispatch = (int)hw_status[5];
+       DRM_UNLOCK();
+       vsunlock(batch.cliprects, cliplen);
+       DRM_LOCK();
        return ret;
 }
 
@@ -637,6 +640,7 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS)
        drm_i915_sarea_t *sarea_priv = (drm_i915_sarea_t *)
            dev_priv->sarea_priv;
        drm_i915_cmdbuffer_t cmdbuf;
+       size_t cliplen;
        int ret;
 
        DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_i915_cmdbuffer_t __user *) data,
@@ -647,22 +651,38 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS)
 
        LOCK_TEST_WITH_RETURN(dev, filp);
 
+       DRM_UNLOCK();
+       cliplen = cmdbuf.num_cliprects * sizeof(drm_clip_rect_t);
        if (cmdbuf.num_cliprects &&
-           DRM_VERIFYAREA_READ(cmdbuf.cliprects,
-                               cmdbuf.num_cliprects *
-                               sizeof(drm_clip_rect_t))) {
+           DRM_VERIFYAREA_READ(cmdbuf.cliprects, cliplen)) {
                DRM_ERROR("Fault accessing cliprects\n");
+               DRM_LOCK();
                return DRM_ERR(EFAULT);
        }
-
-       ret = i915_dispatch_cmdbuffer(dev, &cmdbuf);
+       ret = vslock(cmdbuf.cliprects, cliplen);
        if (ret) {
-               DRM_ERROR("i915_dispatch_cmdbuffer failed\n");
-               return ret;
+               DRM_ERROR("Fault wiring cliprects\n");
+               DRM_LOCK();
+               return DRM_ERR(EFAULT);
        }
-
-       sarea_priv->last_dispatch = (int)hw_status[5];
-       return 0;
+       ret = vslock(cmdbuf.buf, cmdbuf.sz);
+       if (ret) {
+               vsunlock(cmdbuf.cliprects, cliplen);
+               DRM_ERROR("Fault wiring cmds\n");
+               DRM_LOCK();
+               return DRM_ERR(EFAULT);
+       }
+       DRM_LOCK();
+       ret = i915_dispatch_cmdbuffer(dev, &cmdbuf);
+       if (ret == 0)
+               sarea_priv->last_dispatch = (int)hw_status[5];
+       else
+               DRM_ERROR("i915_dispatch_cmdbuffer failed\n");
+       DRM_UNLOCK();
+       vsunlock(cmdbuf.buf, cmdbuf.sz);
+       vsunlock(cmdbuf.cliprects, cliplen);
+       DRM_LOCK();
+       return (ret);
 }
 
 static int i915_do_cleanup_pageflip(drm_device_t * dev)

Attachment: pgpEtJWKyxTTO.pgp
Description: PGP signature

Reply via email to