Date: Fri, 21 Sep 2007 22:06:11 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Helko Glathe <Helko.Glathe@freenet.de> Cc: ports@freebsd.org, flz@freebsd.org Subject: Re: FreeBSD Port: google-earth-4.1.7076.4458 Message-ID: <20070921190611.GA87366@deviant.kiev.zoral.com.ua> In-Reply-To: <200709211954.04286.Helko.Glathe@freenet.de> References: <200709211954.04286.Helko.Glathe@freenet.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--tKW2IUtsqtDRztdT Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 21, 2007 at 07:54:03PM +0200, Helko Glathe wrote: > Hi. >=20 > I've installed google-earth. Everytime starting googleearth the complete= =20 > 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=20 > behaviour of googleearth is the same. >=20 > System version: > FreeBSD FreeBSD_TWS29. 6.2-STABLE FreeBSD 6.2-STABLE #1: Sat Apr 28 15:25= :05=20 > CEST 2007 kater@FreeBSD_TWS29:/usr/obj/usr/src/sys/MYKERNEL62 i386 >=20 > Port version: > google-earth-4.2.198.2451 >=20 > Graphics device:=20 > agp0: <Intel 82945GM (945GM GMCH) SVGA controller> port 0x1800-0x1807 mem= =20 > 0xd8100000-0xd817ffff,0xc0000000-0xcfffffff, > 0xd8200000-0xd823ffff irq 16 at device 2.0 on pci0 >=20 > XORG configuration: > Section "ServerLayout" > Identifier "X.org Configured" > Screen "Screen0" > InputDevice "Mouse0" "CorePointer" > InputDevice "Keyboard0" "CoreKeyboard" > #Option "AIGLX" "True" > EndSection >=20 > 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 >=20 > 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 >=20 > Section "InputDevice" > Identifier "Keyboard0" > Driver "kbd" > Option "XkbModel" "pc105" > Option "XkbLayout" "de_DE" > Option "XkbRules" "xorg" > EndSection >=20 > Section "InputDevice" > Identifier "Mouse0" > Driver "mouse" > Option "Protocol" "auto" > Option "Device" "/dev/sysmouse" > Option "Buttons" "5" > Option "ZAxisMapping" "4 5" > EndSection =20 >=20 > Section "Monitor" > Identifier "Generic Monitor" > HorizSync 28-64 > VertRefresh 43-60 > DisplaySize 264 165 > Option "DPMS" > EndSection >=20 > 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 Controll= er" > Driver "i810" > BusID "PCI:0:2:0" > Option "DRI" "on" > Option "XAANoOffscreenPixmaps" "true" > EndSection >=20 > 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 >=20 > Section "DRI" > Mode 0666 > EndSection >=20 > 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 __u= ser * buffer, int dwords) for (i =3D 0; i < dwords;) { int cmd, sz; =20 - if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], sizeof(cmd))) { - - return DRM_ERR(EINVAL); - } + cmd =3D buffer[i]; if ((sz =3D validate_cmd(cmd)) =3D=3D 0 || i + sz > dwords) return DRM_ERR(EINVAL); =20 OUT_RING(cmd); =20 while (++i, --sz) { - if (DRM_COPY_FROM_USER_UNCHECKED(&cmd, &buffer[i], - sizeof(cmd))) { - return DRM_ERR(EINVAL); - } + cmd =3D 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; =20 - if (DRM_COPY_FROM_USER_UNCHECKED(&box, &boxes[i], sizeof(box))) { - return EFAULT; - } - + box =3D boxes[i]; if (box.y2 <=3D box.y1 || box.x2 <=3D box.x1 || box.y2 <=3D 0 || box.x2 <= =3D 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 =3D (drm_i915_sarea_t *) dev_priv->sarea_priv; drm_i915_batchbuffer_t batch; + size_t cliplen; int ret; =20 if (!dev_priv->allow_batchbuffer) { @@ -618,14 +610,25 @@ static int i915_batchbuffer(DRM_IOCTL_ARGS) =20 LOCK_TEST_WITH_RETURN(dev, filp); =20 + DRM_UNLOCK(); + cliplen =3D batch.num_cliprects * sizeof(drm_clip_rect_t);=09 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 =3D vslock(batch.cliprects, cliplen); + if (ret) { + DRM_ERROR("Fault wiring cliprects\n"); + DRM_LOCK(); + return DRM_ERR(EFAULT); + } + DRM_LOCK(); ret =3D i915_dispatch_batchbuffer(dev, &batch); - sarea_priv->last_dispatch =3D (int)hw_status[5]; + DRM_UNLOCK(); + vsunlock(batch.cliprects, cliplen); + DRM_LOCK(); return ret; } =20 @@ -637,6 +640,7 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS) drm_i915_sarea_t *sarea_priv =3D (drm_i915_sarea_t *) dev_priv->sarea_priv; drm_i915_cmdbuffer_t cmdbuf; + size_t cliplen; int ret; =20 DRM_COPY_FROM_USER_IOCTL(cmdbuf, (drm_i915_cmdbuffer_t __user *) data, @@ -647,22 +651,38 @@ static int i915_cmdbuffer(DRM_IOCTL_ARGS) =20 LOCK_TEST_WITH_RETURN(dev, filp); =20 + DRM_UNLOCK(); + cliplen =3D 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 =3D i915_dispatch_cmdbuffer(dev, &cmdbuf); + ret =3D 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 =3D (int)hw_status[5]; - return 0; + ret =3D 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 =3D i915_dispatch_cmdbuffer(dev, &cmdbuf); + if (ret =3D=3D 0) + sarea_priv->last_dispatch =3D (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); } =20 static int i915_do_cleanup_pageflip(drm_device_t * dev) --tKW2IUtsqtDRztdT Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4 (FreeBSD) iD8DBQFG9BYiC3+MBN1Mb4gRAsmJAJ979g0BygOFrJg9WVo/6A/Eth39XgCg6BW4 N6Q2qV93CHlnWAPEdeIhZGg= =+4Qn -----END PGP SIGNATURE----- --tKW2IUtsqtDRztdT--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070921190611.GA87366>